Support for a Wayland server in a personalized template?

Based on a msg from ‘todox’ I tried to ~build~ a ‘litterbox’ container.

As the main-developer of ‘Litterbox’ confirmed in a discussion on the project repo, a running Wayland server is a pre-requisite.

Here comes a hopefully simple question: Is this available / supported in Qubes OS R4.3 ?

If yes, please provide some links on what to install exactly - or - where to start reading !

1 Like

I’d expect it would be possible, but without GUI integration, that is, the VM would display like a “normal” VM (think virt-manager or virtualbox).

1 Like

You need a nested wayland compositor for X server, check:
GitHub - ValveSoftware/gamescope: SteamOS session compositing window manager · GitHub (for games but probably will work with any app)
GitHub - techguy16/way11: Run Wayland-only apps in X11 · GitHub (Iiterally your case)
GitHub - wayland-mirror/weston · GitHub (probably)

2 Likes

Before jumping into a series of exercises related to Wayland, I’d like to understand a bit better - and - get precise answers.

A personal pre-condition: I don’t plan / want to modify the default ‘dom0’ settings I’m using in my system at all !

I searched the forum a bit - and - found this topic:

Considering my stated pre-condition: Is this achievable in R4.3 ?

I’m willing to spend time on this topic - and - learn what’s needed :slight_smile:

The only way to run wayland apps in qubes is to use weston in a nested mode, like the example @todox gave, it is also how the community waydroid template works. Or run a full desktop in the qube that uses wayland instead of x11.

The qubes gui agent does not currently support wayland, and any apps in qubes that use the gui agent are x11.

There is limited support for running kde plasma’s wayland session in dom0, but that only gets you wayland in dom0, the apps running in each qube are still x11, and use the xwayland layer to be displayed in dom0.

1 Like

You don’t need to modify dom0, its just show rendered picture from X server, just test apps above in your personal qube or smth like that. You need to install a nested Wayland server in personal qube, not in dom0.

1 Like

It’s now clear (to me as well;-) that any additional work I’ll put into building a ‘litterbox’ container will affect only the personalized template - and - no changes to ‘dom0’ are needed.

Thanks a lot for this clarification !

I have a personalized template now, where ‘weston’ is able to load both the ‘desktop’ as well as the ‘kiosk’ shell from the terminal.

‘Litterbox’ is still complaining about ‘WAYLAND_DISPLAY’ not being defined.

I have started to read ‘weston.ini @ Arch Linux’ [1] as well as ‘Creating a display @ The Wayland Book’ [2].

However this is a lot of reading & I do not have the feeling that it is an efficient way …

Is there a good starting point on how to configure ‘weston.ini’ for Qubes OS, so that ‘WAYLAND_DISPLAY’ can be initialized ?


[1] weston.ini(5) — Arch manual pages

[2] Creating a display - The Wayland Protocol

Waiting for feedback to my new question, I have continued to work a bit using the trial and error approach :wink:

I am now able to build & enter / start a ‘litterbox’ container, if I open a terminal from an ~icon~ available in the ‘weston’ desktop shell …

However copy & paste is not working b/w the ‘litterbox’ container & the ‘litterbox’ host qube :frowning:

This is turning into too much ‘difficulties / no-goes’ for me …

Unless something new comes up I plan to stay with ‘distrobox’ containers !

I am still spending some time & work on this topic - but - make only slow progress …

I am not following up on the ‘litterbox’ container vs. host scenario for the moment, but focus on a proper configuration of the ‘Wayland’ desktop provided by Weston.

I’m using a personalized ‘weston.ini’ file, where the only ‘launcher’ entry is Firefox.

This setup does work - but - the weston log file displays …

    [14:36:44.356] launching '/usr/libexec/weston-desktop-shell'
    could not load cursor 'dnd-copy'
    could not load cursor 'dnd-none'
    could not load cursor 'dnd-copy'
    could not load cursor 'dnd-none'

upon startup - and - …

    [GFX1-]: glxtest: libpci missing

when I start FF from the desktop icon - and - finally …

    [GFX1-]: Wayland protocol error: Compositor (x-qubes) crashed, proxy: WP:E WP:CA WP:CR WP:CPCA WP:CPCF 
    ExceptionHandler::GenerateDump attempting to generate:/home/user/.mozilla/firefox/hdzqg38j.default-esr/minidumps/7a0e4d59-13fe-ca0e-38ee-451e8aab082d.dmp
    ExceptionHandler::GenerateDump cloned child 1726
    ExceptionHandler::SendContinueSignalToChild sent continue signal to child
    ExceptionHandler::WaitForContinueSignal waiting for continue signal...
    ExceptionHandler::GenerateDump minidump generation succeeded
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.
    Exiting due to channel error.

when I close the ‘Wayland’ desktop.

Here’s the ‘weston.ini’ file I use:

    [core]
    xwayland=true

    [shell]
    panel-position=bottom

    [launcher]
    path=/usr/bin/firefox-esr
    icon=/usr/share/icons/hicolor/16x16/apps/firefox-esr.png

From a quick search in the Internet it looks like it could be the ‘Gtk’ related.

All I can add from my side is that this template is based on ‘debian-13-minimal’ with additions for Podman, Qt6, etc. - but - no GNOME or Gtk-specific additions.

Any feedback / ideas / links for me ?

did you tried to use other solutions from here? Like a gamescope?

1 Like

No, so far I have concentrated only on weston - and - trying to better understand, what a nested wayland compositor for X server really is & how to operate / use it.

I will read now also a bit about the gamescope project & provide an update - or - ask more questions :wink:

1 Like

An interesting surprise, at least for me, was that I found out today that ‘dom0’ itself is using ‘Weston’ and ‘xorg-x11-server-Xwayland’ !

###

[vr@dom0 ~]$ 
[vr@dom0 ~]$ dnf list --installed | grep '^xorg-x11-server-'
xorg-x11-server-Xorg.x86_64                    21.1.21-3.fc41                       qubes-dom0-cached
xorg-x11-server-Xwayland.x86_64                24.1.9-1.fc41                        qubes-dom0-cached
xorg-x11-server-common.x86_64                  21.1.21-3.fc41                       qubes-dom0-cached
[vr@dom0 ~]$ 

###

[vr@dom0 ~]$ 
[vr@dom0 ~]$ dnf list --installed | grep 'weston'
weston.x86_64                                  14.0.1-2.fc41                        qubes-dom0-cached
weston-libs.x86_64                             14.0.1-2.fc41                        qubes-dom0-cached
[vr@dom0 ~]$

I have restarted my activities on this topic again - and - did some reading before jumping into the next set of experiments.

I was reading about the different types of 'WL Compositors’ in the ‘Wayland Book’ [1].

Is my understanding correct, that in the context of Qubes OS any solution must currently act as / be implemented as an ‘Embedding Compositor’ [2] ?

Since ‘Dom0 / GUI VM’ currently do not support Wayland - and - I’m using the Xfce desktop default neither a ‘System’ nor a ‘Session Compositor’ can be offered.

Correct ?


[1] Foreword - Wayland

[2] Types of Compositors - Wayland

I did more tests using personalized templates cloned from ‘debian-13’ & ‘fedora-43’ using Weston.

I can start a terminal from the Weston Desktop Shell - and - even Litterbox would operate - but - as I reported already earlier, copy & paste is not working b/w a Wayland-based & a X11-based terminal.

I learned quite a bit - BUT - for me this a NO-GO situation - AND - I’ll stop my tests !

Thanks a lot to @Atrate , @random1 & @todox for their feedback.

1 Like