Installing wayland on fedora 39

You can try it.
But maybe it needs to be some custom qubes-gui-runuser instead of qubes-gui-runuser installed by default.

Result of

  • sudo /usr/bin/qubes-gui-runuser '' /bin/sh sh -c 'exec "$@"' sh /usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session

is

  • user does not exist

What can be done here?

You can try to run this:

sudo /usr/bin/qubes-gui-runuser 'user' /bin/sh sh -c 'exec "$@"' sh /usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session

Or just this:

/usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session

Output is (please note, the normal gui service is not stopped so far):

[user@user-fedora-38 ~]$ sudo /usr/bin/qubes-gui-runuser 'user' /bin/sh sh -c 'exec "$@"' sh /usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session
00:00:00.003 [../cbits/main.c:864] Cannot listen on Wayland socket
[user@user-fedora-38 ~]$ /usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session
00:00:00.003 [xwayland/server.c:442] Cannot find Xwayland binary "/usr/bin/Xwayland"
00:00:00.003 [../cbits/main.c:873] Cannot create Xwayland device

Is that good?

No idea what’s wrong with it.

Try to install xorg-x11-server-Xwayland package.

Okay, after installing the package I get this:

$ /usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session
2024-07-09 12:01:10,617 icon-sender: running: ['qrexec-client-vm', 'dom0', 'qubes.WindowIconUpdater']

(gsd-xsettings:5563): Gdk-CRITICAL **: 12:01:10.649: gdk_atom_intern: assertion 'atom_name != NULL' failed

(gsd-xsettings:5563): Gdk-CRITICAL **: 12:01:10.650: gdk_atom_intern: assertion 'atom_name != NULL' failed
discover_other_daemon: 1SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
discover_other_daemon: 1SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
Not in GuiVM or dom0. Exiting.
discover_other_daemon: 1SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
Failed to initialize glamor, falling back to sw

(gsd-xsettings:5563): xsettings-plugin-WARNING **: 12:01:10.857: You can only run one xsettings manager at a time; exiting
Failed to start: Could not initialize xsettings manager.
xfce4-notifyd-Message: 12:01:10.876: Your sqlite library does not support OFFSET/LIMIT with DELETE; falling back to less-efficient deletion method
Another notification daemon is running, exiting
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported maximum keycode 708, clipping.
>                   X11 cannot support keycodes above 255.
Errors from xkbcomp are not fatal to the X server
WARNING: Running setxkbmap against an Xwayland server

Does it exit after that or it keeps running?
Did you stop standard GUI agent before running it?
systemctl stop qubes-gui-agent.service

Run this from the console and waydroid works on fedora 38:

user
sudo systemctl stop qubes-gui-agent.service
sudo /bin/sh -c 'echo 1000 > /sys/module/grant_table/parameters/free_per_iteration'
/usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session

Thank you very much, apparatus!

Another question, if I may. On every startup of the waylandVM I have to prompt these commands in the console:

sudo systemctl stop qubes-gui-agent.service
sudo /bin/sh -c ‘echo 1000 > /sys/module/grant_table/parameters/free_per_iteration’
/usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session

It does not work to disable qubes-gui-agent.service and make a startup script with the two other commands in /.config/autostart/*. How can I solve this?

Either disable it in the template of waylandVM qube or add these lines in the /rw/config/rc.local of the waylandVM qube:

systemctl mask qubes-gui-agent.service
systemctl disable qubes-gui-agent.service

Did you try to add the .desktop file in ~/.config/autostart that will run the script with these commands?
Maybe you need to add DISPLAY=:0 environment variable inside the script.
If yes and it’s not working then you can try to fix the example qubes-gui-agent-wayland.service systemd service or maybe create a new systemd service based on the qubes-gui-agent.service service.

Do you think, it should be a .desktop file that contains the following?

[Desktop Entry]
Name=GUI
Comment=GUI
GenericName=GUI
Exec=DISPLAY=:0 ; sudo /bin/sh -c ‘echo 1000 > /sys/module/grant_table/parameters/free_per_iteration’ ; /usr/local/bin/qubes-compositor -s /usr/local/bin/qubes-wayland-session
Terminal=false
X-MultipleArgs=false
Type=Application
Version=1.0
Icon=
Categories=Network;Email;News;GTK;
MimeType=text/calendar;
StartupWMClass=
StartupNotify=true

You can run the script with those commands on qube start like this:

I put these commands in the rc.local file, but qubes gui service is running after startup:

sudo systemctl mask qubes-gui-agent.service
sudo systemctl disable qubes-gui-agent.service

What could be the reason?

Try this to use this instead in rc.local:

systemctl stop qubes-gui-agent.service

Or even better enable lightdm service for your qube in dom0 instead:

qvm-service QubeName lightdm 1

Or you can add this service using GUI in the qube Settings → Services tab.