We have moved to a new Sailfish OS Forum. Please start new discussions there.

How do you run an X application (remotely or locally)?

asked 2014-03-29 20:57:08 +0200

00prometheus gravatar image

updated 2014-03-29 20:59:29 +0200

How do you run an X application, both in the remote case and the local case?

Because the phone is running Wayland, there is no built-in X support, like there was on the N900, however, there are ways of running X apps under Wayland. What are the options, and can we have one of them implemented on the Jolla? Preferably including the libs to compile X-based tarballs directly on the Jolla.

edit retag flag offensive close delete


Just to make it clear, this is not a duplicate of the Question linked below. Actually, it is exactly the opposite!


00prometheus ( 2014-03-29 20:58:04 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2015-01-30 13:34:39 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2015-01-30 13:50:43 +0200

chrd gravatar image

There is a Mer repository which can be used: https://build.merproject.org/project/show/home:javispedro:xwayland

You can add the repository via commandline with:

ssu addrepo home_javispedro_xwayland http://repo.merproject.org/obs/home:/javispedro:/xwayland/sailfish_latest_armv7hl/
ssu er home_javispedro_xwayland

Then you can install xwayland with

pkcon refresh
pkcon install xorg-x11-server-xwayland

Now you should be able to start xwayland:

Xwayland -nolisten tcp :0 & 
export DISPLAY=:0.0 &

Xorg/X11 applications should now work.

An example screenshot (by the repo creator https://twitter.com/javispedro) : example screenshot

EDIT: I just tested it by editing /etc/sshd/sshd_config on my Linux box to support X11 forwarding. On the Jolla I issued:

ssh -X [USER]@[HOST]

I was able to successfully start a graphical application.

edit flag offensive delete publish link more



This is awesomely cool! I just had to comment, because an upvote simply didn't feel good enough!

00prometheus ( 2015-02-09 22:54:50 +0200 )edit

Works for me too, but white background is drawn black which isn't a good color. Except in minimized mode or when I swipe a bit from either of the sides. And no input is recognized (as the page says).

1chb ( 2015-10-31 00:05:29 +0200 )edit

Not working on Xperia X. https://gist.github.com/1b63398e3325ed60ba9b3de1e8743c5e Also different kind of error when trying to execute as root: https://gist.github.com/d0f37e99c66f6699fffda50c18d8475d

Ingvix ( 2018-05-11 10:11:58 +0200 )edit

answered 2014-03-29 23:43:22 +0200

ApB gravatar image

Xwayland is not ready yet AFAIK so you probably can't.

edit flag offensive delete publish link more


Are there no other options? I believe there was a way of running X.org as a client under Wayland, and both Gnome and KDE are going to Wayland, with GTK and Qt respectively

00prometheus ( 2014-03-30 01:24:47 +0200 )edit

Xwayland is supposed to do that. X clients under wayland. And as i said it's not ready yet.

Technically you can compile it yourself and patch it and write all the code you need to get it to work but i doubt you want to go through all that.

ApB ( 2014-03-30 08:28:54 +0200 )edit

Thanks for that clarification. Do you know anything about work on directly running toolkits remotely? Is that just a plain wrong Internet rumor I am promulgating?

00prometheus ( 2014-03-31 01:26:12 +0200 )edit

The only thing toolkit related i can think of -didn't have to do with wayland- was GTK apps running on html5 capable browsers (localy and remotely). GTK Broadway backend.

In theory you can use your jolla browser to have it render a GTK app running on another computer. How to do this i have no idea.

ApB ( 2014-03-31 01:41:39 +0200 )edit

not ready for sailfish you mean as my debian runs xwayland

chemist ( 2015-01-30 11:31:35 +0200 )edit

answered 2015-01-30 11:24:28 +0200

bandix400 gravatar image

A port of Xwayland was done for weston/wayland on Arch Linux on the Raspberry Pi: http://archlinuxarm.org/packages, or fedodora rawhide ARMV7HL: http://www.rpmfind.net/linux/rpm2html/search.php?query=xorg-x11-server-Xwayland&submit=Search+...&system=&arch=armV7HL.

Maybe can you use one of those to compile a Xorg server to Wayland ... fedora is rpmbuild compliant.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools



Asked: 2014-03-29 20:57:08 +0200

Seen: 3,227 times

Last updated: Jan 30 '15