First, if you don’t know what sys-gui is, you need to read this first: Qubes Architecture Next Steps: The GUI Domain | Qubes OS
Objective of this document:
Currently (2021-10-01) the best documentation for on how to install/use sys-gui appears to be here. When 4.1 is formally released this information should be all that’s needed.
However, If you attempt this at the current time (before the formal release), it’s easy to run into issues, so I’m going to document one install process that did work, and try to collect other sys-gui related information here
Checking the current status of sys-gui
- One page that gives status information on the current state of sys-gui can be found at: GUI domain system configuration · Issue #4186 · QubesOS/qubes-issues · GitHub
- Another method is that you can check on the status of the current and past issues relating to sys-gui at Issues · QubesOS/qubes-issues · GitHub
One installation method for sys-gui that worked:
First, check https://www.qubes-os.org/downloads/ to see if 4.1 has been formally released by the time you read this. If 4.1 has been formally released don’t use this, but try using that as it’s probably your best bet using the standard installation procedure
This documents a deterministic installation procedure that got it working. It starts with the iso install so you have the option to replicate it entirely.
-
Install Qubes-R4.1.0-beta1-x86_64.iso https://mirrors.edge.kernel.org/qubes/iso/ using pretty much the standard installation procedure (allowing for some minor changes)
-
Use installation defaults for most things (example: I left the default template as fedora as I didn’t know if the debian template was stable enough)
-
IMPORTANT: After installing 4.1 beta1, do not update becuase updating causes a issue with the fedora-34?-xfce template being missing. This pull request supposedly fixes it, so do not update until this pull request has been merged and deployed: Use qvm.template_installed for installing template for sys-gui too by marmarek · Pull Request #42 · QubesOS/qubes-mgmt-salt-dom0-virtual-machines · GitHub
(Note: Without the pull reqest, if you install the fedora-34?-xfce template yourself then it seems to work, but then there is no qubes-related packages installed) (give link to conversation about this) -
Then just follow then steps in the guide listed above, which are:
qubesctl top.enable qvm.sys-gui
qubesctl top.enable qvm.sys-gui pillar=True
qubesctl --all state.highstate -
Give sys-gui access to sys-net, sys-firewall and the templates by doing:
qubes-prefs default_guivm sys-gui
(I believe this will be automatic in the formal 4.1 relrease) -
Shut down VM’s (I.E. sys-firewall, sys-usb, sys-net)
-
Log out
-
Click the things in the upper right corner to find a choice between “sys-gui” and “xfce”(I.E. dom0)
-
Choose the “sys-gui” one
-
Log in
-
IMPORTANT: Do not let the screensaver (the lock screen) kick in before you can reset the password! The password will be unknown once the screensaver kicks in. You must reset the password with
sudo passwd user
each and every time you boot sys-gui (This is a bug that happens in sys-gui (but not sys-gui-gpu or sys-gui-vnc), that is documented in Make user password persistent in GUI domain · Issue #6740 · QubesOS/qubes-issues · GitHub )
If you lock yourself out, you can reboot your system by hitting Ctrl-Alt-F2, then login as the dom0 user, and dosudo shutdown now
-
Open a terminal in sys-gui and add missing menus with things like:
qvm-sync-appmenus sys-net qvm-sync-appmenus sys-firewall
You should now be able to create new qubes from templates, start them, and add them to the left menu with the above qvm-sync-appmenus command
One installation method for sys-gui-vnc that worked
Note: This procedure was done direct from a 4.1 rc1 install, without updating. If you want to be sure you get the same results, do not update.
-
Install Qubes-R4.1.0-rc1-x86_64.iso https://mirrors.edge.kernel.org/qubes/iso/ using pretty much the standard installation procedure (allowing for some minor changes)
-
Use installation defaults for most things (example: I left the default template as fedora as I didn’t know if the debian template was stable enough)
-
Following the standard sys-gui-vnc instructions,
sudo qubesctl top.enable qvm.sys-gui-vnc sudo qubesctl top.enable qvm.sys-gui-vnc pillar=True sudo qubesctl --all state.highstate qubes-prefs default_guivm sys-gui-vnc
(Note that from comments, the “qubes-prefs” line sounds like it’s supposed to be done as part of the salt script, but it does not seem to actually happen)
-
Important: You need to go to “Qube Settings” of sys-gui-vnc and add to the service list a new
guivm-vnc
service. The salt script we used to create this will automatically add aguivm-gui-vnc
which does not seem to work (as of 4.1rc1) -
Now create sys-remote:
qvm-clone debian-11 debian-11-vnc qvm-run debian-11-vnc 'sudo apt-get update' qvm-run debian-11-vnc 'sudo apt-get install xtightvncviewer' #cant install 2 packages in one apt-get command from qvm-run, so must seperate it out into another qvm-run #qvm-run debian-11-vnc 'sudo apt-get install tigervnc-viewer' qvm-shutdown debian-11-vnc qvm-create --template debian-11-vnc --label purple --property netvm=none sys-remote qvm-prefs sys-remote guivm dom0
(for some reason the “netvm=none” parameter does not work, so load the sys-remote qubes settings and change it to none)
-
now set up the networking according to Firewall | Qubes OS
(still in dom0):
(Note that this part is still not working yet)echo 'sys-remote @default allow,target=sys-gui-vnc' >> /etc/qubes-rpc/policy/qubes.ConnectTCP qvm-run sys-remote 'qvm-connect-tcp 5900:@default:5900'
(note: this command seems to set up the connection, but it also seems to not return after its done. That’s fine. Just leave it and open another dom0 terminal if you need to type another dom0 command)
-
open a terminal to sys-remote. in that terminal type:
netstat -lntp | grep 5900 #this is just to check that the port is there vncviewer localhost::5900
You should see “connected to localhost port 5900”, then the vncviewer should show you the sys-gui-vnc login screen
(Note: if it’s your first time typingvncviewer localhost::5900
from sys-remote, qubes may say “sys-gui-vnc is starting” then vncviewer may suddenly say:VNC server closed connection
. If this happens just wait till sys-gui-vnc finishes starting up then try it again)
The above procedure successfully ended in showing the sys-gui-vnc login screen, so sys-gui-vnc was working! However… when trying to login as “user” the password is not the password of “user” from dom0. This would make it pretty worth worthless, so a pointer to instructions related to working around the issue are added below. (Note: Was Make user password persistent in GUI domain · Issue #6740 · QubesOS/qubes-issues · GitHub just wrong about the password hash successfully coping to sys-gui-vnc (meaning it’s the same issue as sys-gui?))
Basically you need to change the “!” in a line in /rw/config/rc.local inside sys-gui-vnc that looks like:
sudo usermod -p '!' user
to the hash of your password (visible in dom0 via sudo cat /etc/shadow
This can be done by mounting the LVM image /dev/qubes_dom0/vm-sys-gui-vnc-private (instructions for doing this are at: How to mount LVM images | Qubes OS )
Other resources:
sys-gui related comments:
General issues trying to update in 4.1 beta1: