DispVM(mullvad-browser) Debian-12-minimal

1. Download, install and clone template

1.1 Install debian-12-minimal template
dom0 terminal:
sudo qubes-dom0-update qubes-template-debian-12-minimal

1.2 Clone debian-12-minimal template:
dom0 terminal:
qvm-clone debian-12-minimal d12m-mullvad

2. Download mullvad-browser:

2.1 From any VM-browser download mullvad-browser:
https://mullvad.net/en/download/browser/linux-x86_64/latest

2.2 Send the downloaded file to the cloned template “d12m-mullvad”

3. Installing aditional packages on d12m-mullvad template:
You can customize the template for specific uses, in this case its a “Mullvad-browser DispVM”, its better you have passwordless root since the minimal template are minimal, they are not configured for passwordless root by default, to do that you can install the packages directly from dom0 and after that you’ll be able to use ‘sudo’ inside minimal template if you dont want to install from dom0.

Dom0 terminal:
qvm-run -u root --pass-io --nogui d12m-mullvad "xterm -e 'apt-get update && apt-get upgrade && apt-get install qubes-core-agent-networking qubes-core-agent-passwordless-root nautilus mousepad && apt-get autoremove && read'"

4. Setup mullvad-browser on template

4.1 Browse to QubesIncoming folder inside cloned template(d12m-mullvad)
dom0 terminal:
qvm-run d12m-mullvad 'nautilus'

4.2 Extract the downloaded file and move the mullvad-browser folder to /home/
after that the path will be:
/home/user/mullvad-browser

4.3 Shutdown the template
dom0 terminal:
qvm-shutdown d12m-mullvad

5. Create AppVM based on d12m-mullvad template
dom0 terminal:
qvm-create --template d12m-mullvad --class AppVM --label red default-dvm-mullvad-browser

6. Copy mullvad-browser folder from cloned template(d12m-mullvad) to AppVM(default-dvm-mullvad-browser)
dom0 terminal:
qvm-run d12m-mullvad "xterm -e 'qvm-copy /home/user/mullvad-browser && read'"
→ a window will pop up, select the recent created appvm (default-dvm-mullvad-browser) and click OK

6.1 Move /QubesIncoming/d12m-mullvad/mullvad-browser/ to /home/user/ in (default-dvm-mullvad-browser)
dom0 terminal:
qvm-run -q -a --pass-io --nogui default-dvm-mullvad-browser 'mv /home/user/QubesIncoming/d12m-mullvad/* /home/user/'

6.2 Edit two .desktop files inside VM (default-dvm-mullvad-browser) find and delete the word “–detach” from each file

FIRST FILE
dom0 terminal:
qvm-run default-dvm-mullvad-browser 'mousepad /home/user/mullvad-browser/Browser/start-mullvad-browser.desktop'"

SECOND FILE
dom0 terminal:
qvm-run default-dvm-mullvad-browser 'mousepad nano /home/user/mullvad-browser/start-mullvad-browser.desktop'

6.3 Shutdown both qubes
dom0 terminal:
qvm-shutdown d12m-mullvad default-dvm-mullvad-browser

7. Make AppVM(default-dvm-mullvad-browser) a disposable template and set the default dispvm
dom0 terminal:
qvm-prefs default-dvm-mullvad-browser template_for_dispvms True && qvm-prefs default-dvm-mullvad-browser default_dispvm default-dvm-mullvad-browser

8. Creating Application Launcher for mullvad-browser in Panel

8.1 Right click on panel then navigate: Panel → ‘Add New Item’
Choose Launcher then click ‘+Add’ and ‘Close’

9. Right click on launcher in panel then select ‘Properties’
Choose ‘Add new item’ and fill the fields:

Name: MULLVAD-BROWSER
Command: qvm-run -q -a --pass-io --dispvm=default-dvm-mullvad-browser 'cd /home/user/mullvad-browser/ && ./start-mullvad-browser.desktop'

Click “SAVE”

If you have done everything ok, click on launcher and mullvad-browser will run like a charm.

2 Likes

looks like a lot of work.
https://mullvad.net/en/help/install-mullvad-browser-on-qubes-os?OS=qubes-os

No it isn’t. This guide creates a disposable vm and a app launcher on panel, so whenever you want browse the web you can run the launcher and use mullvad browser as disposable.

mullvad’s instructions can be done in the dvm-template

Thats amazing, now we have two guides in one topic… :smiley:
thanks for sharing it.

when I click on the launcher and mullvad-browser starts, and it automatically shuts down.
I copied the command line to start mullvad-browser in the Dom0 terminal and I obtained:

@dom0 Launching './Browser/start-mullvad-browser '....

thanks for sharing

guess you have missed something, try to do it again, here it works like a charm.

Thanks @den1ed for this guide. I follow all the part and I succed until part 6.2 Sorry i don’t undersatnd how I can edit desktop files and even find -detach
I guess because of this I also have starts and automatically shutdown like @naejPPa
could you help me more for this part ?

you must remove the --detach lines to make it work on a disposables VM
in each file.
Paste the commands into dom0 terminal and make sure that your AppVM (default-dvm-mullvad-browser) is the same as the one you pasted into dom0 terminal. Make sure that your mullvad-browser files are located in the Home directory of your AppVM, as mentioned in the command line: /home/user/mullvad-browser/

If you don’t want to use the dom0 terminal, you can make the changes in (graphic) files, in your mullvad-brouwser AppVM (AppMenu): Settings > Applications > files
go to application menu, then templates and your mullvad brouwser AppVM, and click on file.
in your mullvad-browser AppVM files, go to the mullvad-browser file and delete the --detach lines in the files (in each start-mullvad-browser.desktop file, you’ll need to delete 3 --detach lines):
1st file to modify: mullvad-browser/start-mullvad-browser.desktop.
2nd file to modify: mullvad-browser/Browser/start-mullvad-browser.desktop

1 Like

I didn’t find the cause of the problem but to make it work I decided to do @Sven’s tutorial in a new one:
1. clone and setup your own minimal template
dom0 terminal: qvm-clone debian-12-minimal d12m-mullvad

2. run all update on d12m-mullvad
dom0 terminal: qvm-run --pass-io -u root d12m-mullvad "apt update && apt full-upgrade -y"

3. run on dom0 terminal
qvm-run --pass-io -u root d12m-mullvad "apt install --no-install-recommends qubes-core-agent-networking qubes-core-agent-nautilus nautilus zenity gnome-keyring policykit-1 libblockdev-crypto2 pulseaudio-qubes firefox-esr -y && poweroff"

if you want to know why each line: Debian-10-minimal Configuration - #19 by Sven

4 if you want a sudo without password in your qubes, run this :
dom0 terminal: qvm-run --pass-io -u root d12m-mullvad "apt install --no-install-recommends qubes-core-agent-passwordless-root -y"

From then on I followed @den1ed tutorial
from point number 5 to the end.

tutorial @Sven: Debian-10-minimal Configuration - #12 by Sven

1 Like

thanks for your reply. I will follow your way and will let you know

After hours of try I infortunately din’t succed with this way.
Despite it’s not the same level of security I installed Mullvad by this way and was very easy.

You need to run mousepad from dom0, type the command:

qvm-run default-dvm-mullvad-browser 'mousepad /home/user/mullvad-browser/Browser/start-mullvad-browser.desktop'"

it will open the first file in mousepad, go to menu “Search → Find and Replace”
search for “–detach” and replace to " " after doing that… save the file and make the same steps on the second file.

Sorry for not answer before, i was out, hope you have done it. i think this is the same step you need to do @Francois