maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   XWayland Victory! (https://talk.maemo.org/showthread.php?t=98882)

preflex 2017-02-07 21:58

XWayland Victory!
 
OMG! This just happened...

I downloaded Manjaro ARM rootfs from here and extracted the contents into /home/nemo/Manjaro .

I mounted some stuff and chrooted in.
Code:

devel-su
cd Manjaro
mount --bind /dev dev
mount --bind /sys sys
mount --bind /proc proc
mount --bind /dev/pts dev/pts
mount --bind /run run
chroot ./

Then, I updated and installed some packages.
Code:

pacman -Syu
pacman -S plasma chromium plasma-wayland-session weston onboard

Note, I don't know which of these are actually necessary. You might not need weston.

Then, I created a directory in /run/user and exported some environment variables.
Code:

mkdir /run/user/1001
export $(dbus-launch)
export XDG_RUNTIME_DIR=/run/user/1001

Then, I did this:
Code:

kwin_wayland --xwayland &
... and an XWayland window opened!

Code:

export DISPLAY=:0
chromium --no-sandbox &

and Chromium browswer launched in the window, with full multitouch input! Touch-scrolling, pinch to zoom, and all that jazz. No onscreen keyboard though, when I try to type a URL.

Hmm
Code:

onboard &
And now I have Text input! I can install uMatrix in Chromium! Yaaaaaay!

One caveat, it looks like it's trying to draw a 1024x768 window on the 768x1280 screen (Nexus 4, portrait mode). It's cropped on the right side, and doesn't fill the whole vertical space.

Anybody know how to set the screen resolution for XWayland?

BluesLee 2017-02-07 22:25

Re: XWayland Victory!
 
Damn, this comes late, I needed this two hours ago before installing aliendalvik on a Nexus5 :D

Great news, really great!

HtheB 2017-02-07 23:17

Re: XWayland Victory!
 
Can you take a video or some screenshots please? Very curious on how it looks!

mrsellout 2017-02-07 23:49

Re: XWayland Victory!
 
Quote:

Anybody know how to set the screen resolution for XWayland?
There appears to be a --width and --height option for the kwin_wayland command (and they default to the dimensions you mention):
Code:

kwin_wayland --help
Usage: kwin_wayland [options] [/path/to/application...]
KDE window manager

Options:
  -v, --version                          Displays version information.
  -h, --help                              Displays this help.
  --lock                                  Disable configuration options
  --crashes <n>                          Indicate that KWin has recently
                                          crashed n times
  --author                                Show author information.
  --license                              Show licence information.
  --desktopfile <file name>              The base file name of the desktop
                                          entry for this application.
  --xwayland                              Start a rootless Xwayland server.
  -s, --socket <socket>                  Name of the Wayland socket to listen
                                          on. If not set "wayland-0" is used.
  --windowed                              Use a nested compositor in windowed
                                          mode.
  --x11-display <display>                The X11 Display to use in windowed
                                          mode on platform X11.
  --wayland-display <display>            The Wayland Display to use in
                                          windowed mode on platform Wayland.
  --framebuffer                          Render to framebuffer.
  --fb-device <fbdev>                    The framebuffer device to render to.
  --virtual                              Render to a virtual framebuffer.
  --width <width>                        The width for windowed mode. Default
                                          width is 1024.
  --height <height>                      The height for windowed mode. Default
                                          height is 768.

  --output-count <height>                The number of windows to open as
                                          outputs in windowed mode. Default
                                          value is 1
  --libinput                              Enable libinput support for input
                                          events processing. Note: never use in
                                          a nested session.
  --drm                                  Render through drm node.
  --inputmethod <path/to/imserver>        Input method that KWin starts.
  --list-backends                        List all available backends and quit.
  --lockscreen                            Starts the session in locked mode.
  --exit-with-session </path/to/session>  Exit after the session application,
                                          which is started by KWin, closed.
  --no-kactivities                        Disable KActivities integration.

Arguments:
  applications                            Applications to start once Wayland
                                          and Xwayland server are started


preflex 2017-02-08 00:09

Re: XWayland Victory!
 
YOU ROCK!

"xwin_wayland --width 768 --height 1280 --xwayland" did the trick!

preflex 2017-02-08 00:49

Re: XWayland Victory!
 
2 Attachment(s)
Quote:

Originally Posted by HtheB (Post 1522989)
Can you take a video or some screenshots please? Very curious on how it looks!

I hope these attached properly.

BluesLee 2017-02-08 06:17

Re: XWayland Victory!
 
The next step would be to package everything so that the non techies can also profit from it.

Do things like sound, video work?

nieldk 2017-02-08 07:36

Re: XWayland Victory!
 
A reminder for who wants to try, be careful with the BIND mounts, deleting stuff from folders (for example /proc/) by mistake, can mess up your 'normal' SFOS installation ;)

karan5chaos 2017-02-08 08:42

Re: XWayland Victory!
 
Really interesting !
Would it work on SFOS Ports aswell ? :)
Also I'm a noob in linux and it's commands so can someone explain me what kind of apps we would be able to run with this ? :)
Thank you.

claustn 2017-02-08 08:48

Re: XWayland Victory!
 
It runs on a Nexus 4, so it works on Sailfish ports!

karan5chaos 2017-02-08 08:49

Re: XWayland Victory!
 
Quote:

Originally Posted by claustn (Post 1523005)
It runs on a Nexus 4, so it works on Sailfish ports!

Thank you for the quick reply :)

coderus 2017-02-08 09:25

Re: XWayland Victory!
 
Works, looks interesting.

pichlo 2017-02-08 10:15

Re: XWayland Victory!
 
Quote:

Originally Posted by preflex (Post 1522984)
Then, I updated and installed some packages.
Code:

pacman -Syu
pacman -S plasma chromium plasma-wayland-session weston onboard


Mmm, pacman...

http://static1.gamespot.com/uploads/...t+16.12.27.png

mrsellout 2017-02-08 10:53

Re: XWayland Victory!
 
Quote:

Originally Posted by karan5chaos (Post 1523004)
Really interesting !
Would it work on SFOS Ports aswell ? :)
Also I'm a noob in linux and it's commands so can someone explain me what kind of apps we would be able to run with this ? :)
Thank you.

While Sailfish is a linux operating system, it differs from most distributions in that it uses the newer Wayland protocol instead of the X windowing system (or X11) that the majority of distributions use.

This is important for any piece of software that has a window. Most of them are built to use X11. In order to allow them to run on a system that uses Wayland, XWayland has been developed, but until now, I think I'm right in saying it hasn't been possible to run it on Sailfish.

So this removes that constraint, and will make it possible for applications that needed an X server to run, to run on Sailfish. Examples are Libreoffice, Gimp, Thunderbird, etc.

Read about
a) Wayland: https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)

b) X Window System: https://en.wikipedia.org/wiki/X_Window_System

c) XWayland: https://en.wikipedia.org/wiki/Waylan...ibility_with_X

tmi 2017-02-08 12:07

Re: XWayland Victory!
 
Quote:

Originally Posted by pichlo (Post 1523012)
Mmm, pacman...

That's ms. pacman for you... mzzz!
(Always had a soft spot for the baby one though, maybe due to the pinball part) /OT

Can't wait what a working XWayland on Sailfish brings!

preflex 2017-02-08 12:16

Re: XWayland Victory!
 
Quote:

Originally Posted by BluesLee (Post 1522998)
The next step would be to package everything so that the non techies can also profit from it.

Do things like sound, video work?

Video seems to work. I went to Youtube and played a video. It doesn't seem accellerated. FPS was watchable but not great.

I haven't set up audio yet. It's probably just a matter of setting PULSE_SERVER environment variable in the chroot. Maybe also some command inside SFOS to get pulseaudio to accept the connection.

mscion 2017-02-08 13:29

Re: XWayland Victory!
 
This is great news! Anyone try it on Jolla tablet? Would something like wxmaxima work? Presumably I would have to download the code and compile it on device. If that is the case, from which repositories should I try downloading code that is a best match for Jolla? Thanks!

preflex 2017-02-08 13:49

Re: XWayland Victory!
 
Quote:

Originally Posted by mscion (Post 1523042)
This is great news! Anyone try it on Jolla tablet? Would something like wxmaxima work? Presumably I would have to download the code and compile it on device. If that is the case, from which repositories should I try downloading code that is a best match for Jolla? Thanks!

wxmaxima is in Manjaro's extra repo. You should be able to install it with "pacman -S wxmaxima". You don't need to do anything fancy. All the xwayland business is handled by kwin in the guest OS. No porting/recompilation required. Just download the rootfs, extract it somewhere, set up the mounts, chroot, set some environment variables, and install whatever packages you need and want. You could also install lxpanel so you can easily launch programs within the gui. (Plasma itself doesn't work properly because it tries to run natively in wayland)

Note: You don't have to use Manjaro. I just picked it because I like Arch, but I'm too lazy for real Arch. Any distro with recent plasma/kwin should work (5.7 or later, i think. Maybe older. Debian Jessie is too old). Here is an Ubuntu rootfs you could use if you prefer debian-style package management. You should be able to apt-get install kwin, xwayland, onboard, and whatever other packages you need. The packages I installed in the first post are certainly overkill.

mscion 2017-02-08 14:20

Re: XWayland Victory!
 
Fantastic! This is what I had always hoped for in a Jolla device. Probably could even make a Jolla pc with btkb now!

preflex 2017-02-08 14:23

Re: XWayland Victory!
 
If you're having trouble with the lockscreen popping up,
Code:

kcmshell5 screenlocker
un-check the option to lock the screen.

kuba77 2017-02-08 14:24

Re: XWayland Victory!
 
1 Attachment(s)
I tried to run plasma(KDE) but it's slow and unstable.

n950 2017-02-08 17:23

Re: XWayland Victory!
 
Hello,
Very nice idea. Congratulations for this progress.
Anybody know another rootfs? Work with SFOS.
How to run them in chroot like this one?
Thank you

preflex 2017-02-08 21:58

Re: XWayland Victory!
 
Quote:

Originally Posted by kuba77 (Post 1523056)
I tried to run plasma(KDE) but it's slow and unstable.

Yes. Plasmashell tries to use the wayland server instead of xwayland. Lipstick and Sailfish UI stuff gets in the way. If you want a panel and task manager in the xwayland window, you should use something that does not have wayland support. LXPanel works, and the packages are small. "pacman -S lxde" is overkill, but it also provides some useful extra goodies.

anidel 2017-02-08 22:06

Re: XWayland Victory!
 
Now just run this on a Jolla Tablet, run Xournal.

There. I ported Xournal again.

preflex 2017-02-09 01:55

Re: XWayland Victory!
 
Quote:

Originally Posted by anidel (Post 1523090)
Now just run this on a Jolla Tablet, run Xournal.

There. I ported Xournal again.

It's good to see SailfishOS is finally catching up in functionality to where Maemo was nearly 10 years ago.

n950 2017-02-09 05:00

Re: XWayland Victory!
 
1 Attachment(s)
If i want to install and run transmission how to do it?

My resolution is not good :(

xwin_wayland --width 768 --height 1280 --xwayland

Doesn't work once chromium run why?

How to make it work?

mrsellout 2017-02-09 10:53

Re: XWayland Victory!
 
Quote:

Originally Posted by n950 (Post 1523102)
If i want to install and run transmission how to do it?

My resolution is not good :(

xwin_wayland --width 768 --height 1280 --xwayland

Doesn't work once chromium run why?

How to make it work?

That's a typo it should be

Code:

kwin_wayland --width 768 --height 1280 --xwayland &
You might have to adjust those dimensions though, Preflex is using a Nexus 5.

Jolla: 540 x 960
JollaC: 720 x 1280

KylliOrvokki 2017-02-09 11:00

Re: XWayland Victory!
 
UUH!
Would Firefox and Spotify client work?

(now I dont have time to try but I will later on...)

HtheB 2017-02-09 11:04

Re: XWayland Victory!
 
Quote:

Originally Posted by KylliOrvokki (Post 1523137)
UUH!
Would Firefox and Spotify client work?

(now I dont have time to try but I will later on...)

Android apps work as they work before the update

Edit: Ugh, I mixed this thread for the new Sailfish OS firmware update..

anidel 2017-02-09 11:11

Re: XWayland Victory!
 
Quote:

Originally Posted by preflex (Post 1523099)
It's good to see SailfishOS is finally catching up in functionality to where Maemo was nearly 10 years ago.

It too Maemo more than the life of Sailfish OS to reach where it was 10 years ago.

Sailfish OS is not exactly the same OS as Maemo was albeit it has been built upon similar foundations.

Also Nokia was way bigger and more resourceful than Jolla is today.

taixzo 2017-02-09 14:16

Re: XWayland Victory!
 
Quote:

Originally Posted by KylliOrvokki (Post 1523137)
UUH!
Would Firefox and Spotify client work?

(now I dont have time to try but I will later on...)

If you mean the desktop apps - Firefox should; but Spotify won't, because their client is only built for x86, not ARM. (That said, it might run on Jolla Tablet.) (And now I'm wondering if it would run on the phone if emulated through QEMU...)

n950 2017-02-09 20:45

Re: XWayland Victory!
 
How to move virtual keyboard down?
i have just minimized a little but move how?

coderus 2017-02-09 20:58

Re: XWayland Victory!
 
Quote:

Originally Posted by n950 (Post 1523206)
How to move virtual keyboard down?
i have just minimized a little but move how?

drag and hold on cross [+] button

n950 2017-02-09 21:05

Re: XWayland Victory!
 
How to creat bashrc to run manjaro directly?
without run all commands one by one.

n950 2017-02-09 21:51

Re: XWayland Victory!
 
4 Attachment(s)
How to run trojita/transmission-qt?
If i run them like chromium command it doesn't work.

Some errors with firefox when i try to go on youtube or gmail why? "your connection is not secure"

How to access manjaro desktop? with icon

chromium is very nice :)... even if virtual keyboard is a little slow.
Anybody can know how to activate audio?

mscion 2017-02-09 23:58

Re: XWayland Victory!
 
Hi. I'm trying to get this to run on my Jolla Tablet. But when I get to the command

chroot ./

I get the error

chroot: cannot run command "/bin/sh" no such file or directory


Any ideas? Thanks!

mscion 2017-02-10 13:44

Re: XWayland Victory!
 
Ok. Still not sure about why I have the problem with the Jolla tablet but the chroot command worked when I tried this on my Jolla 1 phone. However, when I try to update system using pacman -Syu command I get a conflict. It wants to replace libdbus with core/dbus as libdbus and dbus are in conflict. While I'm good at following directions, understanding this is a bit above my pay grade. Should I allow it to replace libdbus with dbus? Thanks

preflex 2017-02-10 14:25

Re: XWayland Victory!
 
Quote:

Originally Posted by mscion (Post 1523267)
Ok. Still not sure about why I have the problem with the Jolla tablet but the chroot command worked when I tried this on my Jolla 1 phone. However, when I try to update system using pacman -Syu command I get a conflict. It wants to replace libdbus with core/dbus as libdbus and dbus are in conflict. While I'm good at following directions, understanding this is a bit above my pay grade. Should I allow it to replace libdbus with dbus? Thanks

Replacing libdbus with core/dbus is fine. As far as the issue with your tablet, make sure you've got an i386 rootfs. The one I linked to was ARM only.

mscion 2017-02-10 15:01

Re: XWayland Victory!
 
Quote:

Originally Posted by preflex (Post 1523271)
Replacing libdbus with core/dbus is fine. As far as the issue with your tablet, make sure you've got an i386 rootfs. The one I linked to was ARM only.

Yes. Thanks. I hunted around and realized it was probably OK. Just want to look before I leap! Sorry about the noob questions but, where do I find an i386 rootfs? (Arch or Debian is good. Just don't know my way around to find proper versions of such.) Thanks again!


EDIT: Worked on my Jolla 1 phone! Need to make some scripts here. Too hard to type all the time!

preflex 2017-02-10 17:08

Re: XWayland Victory!
 
Arch Linux i686

Ubuntu i386


All times are GMT. The time now is 15:28.

vBulletin® Version 3.8.8