Running Linux appVMs with a full desktop environment and complete graphics support (HVM and VNC) in Qubes 4.3. Disabling seamless mode

I decided to create this guide for beginners like me, who may need a Linux environment for working with video graphics. This guide consolidates tutorials from advanced users who were instrumental in helping me resolve all the issues:

You can run Linux in HVM mode. it is preferable for graphics work and gaming. However, in this mode you won’t be able to share the clipboard with other VMs.

Create a new qube, select standalone or template from the types on the left. Select the template to clone from debian or fedora xfce. Click create.
Open the qube settings. Go to advanced and change virtualization mode to hvm. Set the minimum RAM to be at least 1000 or more.
You need to set a user password to login, run this command in the qube you just created:

sudo passwd user

then type in whatever password you want.
qube_name in the commands refers to the name of the your qube that was just created

To disable the gui integration in debian, you need to run these commands in dom0:

qvm-features qube_name gui_emulated 1
qvm-features qube_name no-nomodeset 1
qvm-prefs qube_name kernelopts "systemd.unit=graphical.target"
qvm-service qube_name lightdm on

commands for fedora in dom0:

qvm-features qube_name gui_emulated 1
qvm-features qube_name no-nomodeset 1
qvm-run -u root qube_name -- systemctl set-default graphical.target
qvm-run -u root qube_name -- 'echo "user" | passwd --stdin user'
qvm-prefs qube_name kernel ''
qvm-service qube_name lightdm on
qvm-shutdown qube_name

Alternatively, you can run Linux in VNC mode for simpler tasks like video recording and screencasting - it will allow you to use the clipboard sharing feature across other VMs!

In new debian template:
sudo apt install tigervnc-standalone-server tigervnc-viewer

In new template create a script:

sudo tee /usr/bin/xfce-vnc << EOF
#!/bin/sh
tigervncserver -localhost -xstartup /usr/bin/startxfce4 -geometry 1024x768 -SecurityTypes None -useold :1 && xtigervncviewer 127.0.0.1:5901 &
EOF

sudo chmod +x /usr/bin/xfce-vnc

for GNOME desktop:

sudo tee /usr/bin/gnome-vnc << EOF
#!/bin/sh
tigervncserver -localhost -xstartup /usr/bin/gnome-session -geometry 1024x768 -SecurityTypes None -useold :1 && xtigervncviewer 127.0.0.1:5901 &
EOF

sudo chmod +x /usr/bin/gnome-vnc

Whencreate a new appVM using this template.

For running new appVM in VNC enter this command in dom0:
qvm-run appvm_qube_name xfce-vnc
or
qvm-run appvm_qube_name gnome-vnc
You can also create a shortcut or menu item to run this command.
(An advantage of tigervncviewer is that you have a control menu at F8 which
allows you to run up to full screen)

For advanced graphics work and gaming, use this guide: Create a Gaming HVM

3 Likes

@otter2 made a pull request to the official docs for the first part of your guide:

About the VNC part, I have some comments:

  • use full code blocks instead of inline ones for readability
  • using the same script for gnome and xfce would help but I don’t know how to do that
  • putting the script in /usr/bin would make it available in all qube based on the template, editable for existing qubes and easier to use (no need to remember the full path of the script).
1 Like

Hello! I’m just a beginner. I’ve gathered these guides in one place for convenience. I will be very happy if advanced users improve the guide.
Documentation would be very useful. The documentation for Windows is excellent, and I easily installed Windows 11 and QWT. But for Linux, I found nothing. I had to spend several days searching for solutions on the forum. Thanks to some forum users for their help. I wouldn’t have solved the problem myself.

Will you write the exact commands for it?

sudo tee /usr/bin/xfce << 'EOF'
#!/bin/sh
tigervncserver -localhost -xstartup /usr/bin/startxfce4 -geometry 1024x768 -SecurityTypes None -useold :1 && xtigervncviewer 127.0.0.1:5901 &
EOF

Right?

Maybe silly question...

Is it a typo?..
no-nomodset
or should it be ā€œmodesetā€ with an ā€˜e’?

2 Likes

Yep, and I think there are other typos (underscores instead of hyphens). Check @otter2 pull request.

Small correction: there is no hard requirement to set memory to 1000. In fact, it can boot up even with the default 400 MiB or whatnot, but this is not stable in my experience, it only boots sometimes, and sometimes it takes a lot of time to boot. 1000 is just an arbitrary number I chose as a reasonable default with some wiggle room as people’s configurations differ

2 Likes

Yes, you are right. It’s a typo. I got this command from there. And now I understand why I didn’t have a higher screen resolution in Debian :grin:

Can be added the command to launch VNC in dom0 to qubes-appmenu as a shortcut? I can’t do it. Only a desktop or panel shortcut works, but it would be convenient to have a button in the appmenu.

For appmenu launcher you need to write a desktop launcher, put it in appropriate place, and refresh applications of the qube. I think it is /usr/share/applications and ~/.local/share/applications on xfce.

2 Likes

Help me launch Fedora in VNC. In Fedora, everything is more complicated than in Debian -different package names, possibly SELinux is blocking VNC. I haven’t used Fedora before and I need help. @unman Maybe you can help me?

I forgot to tell you not to put quotes around EOF and it would be better to choose another name for the command, like start-tigervncserver or else, xfce is too generic.

@parulin okay thanks!
Do you happen to know how to launch VNC for Fedora just as easily? I really liked the VNC method - it’s very simple and fast. But doing it in Fedora isn’t quite as straightforward if you’ve spent your whole life working only on Debian :grin: I asked several AI chats to help me with it in a fedora-43-clone, but it didn’t yield any success.

Another clarification: there is no need to set kernel for fedora. I assume this have crept over from the old general discussion post.