Continuing the discussion from How do I create a standalone VM?:
Please note: This is not the standard method of installing software in Qubes. Only use this when you’ve exhausted all other options, if at all.
Security disclaimers
In this guide multiple sacrifices are made for convenience. Make sure you understand their implications and proceed only if these are acceptable for your particular situation. These include:
-
Not verifying software signatures (due to their unavailability)
When you install software in the regular way (from the repos) that is done automatically for you. However with this method you have to verify software manually. However many times this is not available, so you cannot confirm the authenticity of the software. -
Lack of updates
By installing software from.deb
or.rpm
packages manually, the applications require manual updates. It is extremely likely the user will forget to update them and thus run the risk of running software with known security vulnerabilities
But please do keep in mind that even with these security sacrifices it is still safer for you to run these programs on Qubes than running them on regular systems (regarding the isolation it can provide to other qubes).
Introduction
All I’m writing here can be found on the documentation with a bit of digging and experimentation. But I’m writing it here as I couldn’t find a consolidated guide on how to install this.
This guide is way more extensive than it would need to be, but the goal here is to be didactic. Hopefully as you follow it you end up understanding a few things that can help you use Qubes more independently.
We’ll be following the installation of the “LocalWP” proprietary software. But you can follow this with any other piece of software available for linux as a .deb
or .rpm
package.
1. Download software
We first go to the download page for the software, in this case Releases - Local. On the download page we should find either a .deb
, an .rpm
or both. Each qube can run a different operating system – some run Debian, some Fedora and others run something else. But the file you download will condition which one you have to choose (and keep this choice on the back of your mind).
-
.rpm → fedora
If you choose a.rpm
then the rest of the instructions will be done on a Fedora-based StandaloneVM -
.deb → debian
If you choose a.deb
then the rest of the instructions will be done on a Debian-based StandaloneVM
You can download this in any of your qubes. Later you’ll move it to the qube where you’ll install it.
2. Create a StandaloneVM
We will be installing it as a StandaloneVM for convenience. You typically do it this way when you want to install some software that you will only use in one virtual machine (VM) and can’t really install via the usual methods. It is also possible to do it on TemplateVMs but that is a bit more involved – let’s leave that as homework.
To do this you click on the “start menu” and open the Create new qube application. Here you change the following:
- Name: we’re calling it
develop
, but you can name it whatever you want - Type: Standalone qube copied from a template
- Template: based on the previous step you either choose
fedora
ordebian
- Launch settings after creation: tick this for the next step
Then the qube settings window will pop up. Here we’ll increase the Private storage max. size to 20G
. This is basically the size of your home folder (where you’ll keep all of your stuff). But you can always increase this later by going to the qube’s settings.
After this, hit OK.
3. Installing the software
Note: Now this part will change a bit depending on whether or not you have fedora or debian.
Firstly, copy your download to the develop
qube (or the name you gave it). If you don’t know how to do this, check:
Then you open the terminal application on the develop
qube and depending on your choice you go either route:
If on Fedora StandaloneVM
When you moved the file to the StandaloneVM, it landed on the folder ~/QubesIncoming/<SOME_VM>/<FILE>.rpm
. So in our case we ran on the terminal:
sudo rpm --define '_pkgverify_level digest' -i ~/QubesIncoming/disp3741/local-5.9.9-linux.rpm
Warning: the "
--define '_pkgverify_level digest'
" a security workaround as Qubes disabled unsigned.rpm
packages. Read more on the related announcement.
Most likely it will show you some dependency errors like this:
This happens because on Linux the software you install most often than not depends on other tools which need to be installed on your system first. This part will very much depend on your situation and you’ll have to figure out how to install these dependencies. In our case it told as (see above). So we installed these with:
sudo dnf install libaio ncurses-compat-libs nss-tools
And it should work out well
Dependencies do not exist / will not be installed?
There is the chance this happens to you. In this case you’ll probably be wasting a lot of time looking for these. If there was a.deb
as well, try repeating the process in Debian instead.
After the dependencies are installed you should be ready for installing the actual software you want. Repeat your first install command:
sudo rpm --define '_pkgverify_level digest' -i ~/QubesIncoming/disp3741/local-5.9.9-linux.rpm
This time, it should run without complaining about any dependencies. Skip the debian part by going to step 4.
If on Debian StandaloneVM
When you moved the file to the StandaloneVM, it landed on the folder ~/QubesIncoming/<SOME_VM>/<FILE>.deb
. So in our case we ran on the terminal:
sudo apt install ~/QubesIncoming/disp3741/local-5.9.9-linux.deb
Note if you see some errors like the following, feel free to ignore it (see why here)
/home/user/QubesIncoming/<SOME_VM>/<FILE>.deb’ couldn’t be accessed by user ‘_apt
sudo apt install``
4. Adding shortcut to start menu
Now the application should be installed but it won’t show up in the application’s menu. To add it, open the qube settings for the develop qube (the app should be named <QUBE_NAME>: Qube Settings
). Then open the tab.
You’ll want to add your application’s name to the right column. If you don’t see it, click on Refresh Applications button. That will take a couple of seconds but afterwards it should show up.
Still don’t see it?
If after refreshing your applications, your newly installed application doesn’t show up it might be that your.deb
or.rpm
didn’t include a shortcut (which sucks). If this is the case read here to try to salvage the situation.
Move you newly installed to the right column and hit OK. As you can see on the following picture, the Local
application is selected.
Then you should see a shortcut for this application on your “start menu” under the develop
qube.
For more information on this step, consult the docs.
5. You’re done!
Now, all you have to do is open the application!
6. Update it!
Now, because you installed it manually, whenever there is an update for this application you’ll have to remember to update it by repeating this exact process with the new version.
You’ll remember to do this, right?!