maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   XWayland doable from user side or jolla required? (https://talk.maemo.org/showthread.php?t=93828)

javispedro 2014-09-21 22:38

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by rainisto (Post 1438771)
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!

https://pbs.twimg.com/media/ByIaAoHIIAAxmEY.png

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.

r0kk3rz 2014-09-24 15:59

Re: XWayland doable from user side or jolla required?
 
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.

tiempjuuh 2014-09-24 16:16

Re: XWayland doable from user side or jolla required?
 
This is great! This way we can get some applications on our phone, like Libreoffice. Lovely!

javispedro 2014-09-24 21:10

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by r0kk3rz (Post 1440334)
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...

r0kk3rz 2014-09-24 21:48

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1440428)
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

javispedro 2014-09-24 23:41

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by r0kk3rz (Post 1440433)
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.

w00t 2014-09-29 02:46

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1439988)
- 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.

w00t 2014-09-29 02:47

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1439988)
EDIT: Funnily, closing Xwayland the "Sailfwish way" crashes Wayland

Can you get a backtrace out of that OOI?

javispedro 2014-09-29 10:45

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by w00t (Post 1440938)
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.

nieldk 2014-09-29 12:57

Re: XWayland doable from user side or jolla required?
 
Quote:

Originally Posted by javispedro (Post 1440981)
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

?


All times are GMT. The time now is 08:10.

vBulletin® Version 3.8.8