Reply
Thread Tools
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#11
Originally Posted by rainisto View Post
Personally I never want to see X11 apps in a phone, let those crappy UI apps remain in desktop only env.
As if the display server has any impact on how crappy programs look!


Either way... xwayland exists!



Please note that there's no acceleration at all and that input does not work.

- For 2D acceleration we could at some point consider the use of Glamor. This would require some investigation as the current Xwayland uses GBM buffers, and I have no idea how libhybrys equivalent work.
- 3D acceleration is "complicated", but probably not useful at all since I know of few OpenGLES+X11 programs (Maemo ones being the most glaring exceptions...).
- As for input, I suspect that I need to look up the QtWayland "propietary" touch interfaces/protocols and patch xwayland accordingly.

I have made an OBS project with Xwayland and all the usual required X11 libraries and dependencies. Just set up the repository and install package "xorg-x11-server-xwayland" from it. Also on the repository is the xlogo tool.

Start Xwayland on a terminal like this:
Code:
Xwayland -nolisten tcp :0
export DISPLAY=:0.0
xlogo
Replace -nolisten tcp with -ac if you want to do non-SSH/insecure X11 forwarding.

Feel free to depend on the OBS project if you need libX11-devel or other packages in order to port X11 software to Sailfish. Most of these libraries are just updated versions of the older X11 packages in Nemo/Mer. If I missed some important lib/tool just ping me.

It was known that the "older" Xwayland was a pain to port and build because of its entrenched architecture -- it required specific parts for each Xorg "driver", Intel, nvidia, etc. At some point I pondered if it was worth resurrecting the older Xsdl server because it would be much simpler to port. However, there's no need to: Xwayland 1.16.x upwards is now finally "driver" independent and is as simple to build as Xsdl was!


EDIT: Funnily, closing Xwayland the "Sailfwish way" crashes Wayland!
EDIT: Updated image to real device screenshot.

Last edited by javispedro; 2014-09-22 at 11:16.
 

The Following 35 Users Say Thank You to javispedro For This Useful Post:
Posts: 440 | Thanked: 2,256 times | Joined on Jul 2014
#12
obviously early days yet, but would it be possible to run remote apps on desktop pc from the Jolla using X Forwarding?

Not sure running full X apps on the phone is going to be great fun, but if i can remote into apps from a laptop then that's pretty cool.
__________________
SirenSong v0.5
Like my work? buy me a beer
 
tiempjuuh's Avatar
Posts: 202 | Thanked: 165 times | Joined on Jul 2012 @ Apeldoorn, Netherlands
#13
This is great! This way we can get some applications on our phone, like Libreoffice. Lovely!
__________________
Nokia N900 hw rev. 2204
Nokia N9 16GB black hw rev. 1507
Jolla + LETOH
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#14
Originally Posted by r0kk3rz View Post
obviously early days yet, but would it be possible to run remote apps on desktop pc from the Jolla using X Forwarding?
Sorry I may have parsed the question in the opposite direction. If what you want is using Jolla programs on a X11 server such as the one on a GNU/Linux desktop then that's just not possible. However there's already something for that which uses VNC instead of X11 -- https://github.com/mer-qa/mervncserver

On the other hand, if you want you want is to run X11 programs on the Jolla, that's what Xwayland does, but without touch input as mentioned (either an issue with the oldish version of wayland in the Jolla , or a qtwayland incompatibility -- will look during weekend).

Xwayland also has two modes:
- "normal", in which it behaves similar to Xephyr or Xnest: a single new Wayland window is created in which all X11 programs run. You can use your own window manager inside this Xwayland window (with titlebars, maximize/minimize buttons, etc).
- "rootless", in which a new Wayland window is created for each X11 toplevel window. So you can basically switch between X11 window using the "sailfish" gestures. Unfortunately, we'd need to write a new X11 window manager for this, and take into account that we'd need to handle special windows such as menus on our own...

Last edited by javispedro; 2014-09-24 at 21:14.
 

The Following 5 Users Say Thank You to javispedro For This Useful Post:
Posts: 440 | Thanked: 2,256 times | Joined on Jul 2014
#15
Originally Posted by javispedro View Post
On the other hand, if you want you want is to run X11 programs on the Jolla, that's what Xwayland does, but without touch input as mentioned (either an issue with the oldish version of wayland in the Jolla , or a qtwayland incompatibility -- will look during weekend).
I'll try and be a little clearer.

What I want is X11 programs to be executing on the Jolla in XWayland, but the GUI is accessed remotely on a PC using X Forwarding.

Is that possible? I've never really played around with X Forwarding to really understand what it does, but i've done RDP remote apps in windows and if it works anything like that, it could be very useful
__________________
SirenSong v0.5
Like my work? buy me a beer
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#16
Originally Posted by r0kk3rz View Post
What I want is X11 programs to be executing on the Jolla in XWayland, but the GUI is accessed remotely on a PC using X Forwarding
Ok. You don't actually need Xwayland at all for this scenario. The X11 programs/client will just connect directly to the X11 server your PC.
 

The Following 2 Users Say Thank You to javispedro For This Useful Post:
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#17
Originally Posted by javispedro View Post
- As for input, I suspect that I need to look up the QtWayland "propietary" touch interfaces/protocols and patch xwayland accordingly.
It might be worth investigating the inverse (supplanting the QtWayland extension with wl_touch). Where something is useful and integrated into Wayland itself, it makes sense to deprecate/remove the Qt-based extension in my opinion.
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 

The Following 4 Users Say Thank You to w00t For This Useful Post:
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#18
Originally Posted by javispedro View Post
EDIT: Funnily, closing Xwayland the "Sailfwish way" crashes Wayland
Can you get a backtrace out of that OOI?
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#19
Originally Posted by w00t View Post
Can you get a backtrace out of that OOI?
Yep, http://pastebin.com/hGCSFqqj

Xwayland is still running by the time of lipstick's crash.
 

The Following User Says Thank You to javispedro For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#20
Originally Posted by javispedro View Post
Yep, http://pastebin.com/hGCSFqqj

Xwayland is still running by the time of lipstick's crash.
A bug in wayland_wrapper/qwlshellsurface.cpp ?

Code:
#2  QtWayland::ShellSurface::shell_surface_pong (this=0x1df2088,
    resource=<optimized out>,
    serial=<error reading variable: Cannot access memory at address 0xffffffe7>) at wayland_wrapper/qwlshellsurface.cpp:285
The particular function in wayland_wrapper/qwlshellsurface.cpp is like:

Code:
void ShellSurface::shell_surface_set_fullscreen(Resource *resource,
                       uint32_t method,
                       uint32_t framerate,
                       struct wl_resource *output)
{
    Q_UNUSED(resource);
    Q_UNUSED(method);
    Q_UNUSED(framerate);
    Q_UNUSED(output);
    QSize defaultScreenSize = m_surface->compositor()->outputGeometry().size();
    send_configure(resize_bottom_right, defaultScreenSize.width(), defaultScreenSize.height());
 
    if (m_surface->extendedSurface())
        m_surface->extendedSurface()->setVisibility(QWindow::FullScreen, false);
}
So, the memory read error is this statement:

uint32_t method

?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 13:18.