How to setup a multimedia VM in Qubes OS 4.0.3 and read files from within its applications ?

70 views
Skip to first unread message

M

unread,
Mar 18, 2020, 1:30:47 PM3/18/20
to qubes-users
How to setup a multimedia VM in Qubes OS 4.0.3 ?

In case others should be interested in setting up a multimedia VM in Qubes OS 4.0.3, here is how I have done:

1)  Create a clone of the Debian Template, by either:

                -  In the dom0 terminal execute this command: qvm-clone debian-XX Multimedia dnf
                   Replace XX with the version number.

      Or in:

                -  Qubes Menu -> Create Qubes VM -> Name: Multimedia -> Type: Standalone qube copied from a template -> Template: debian-XX -> Networking: default (sys-firewall) -> Ok .

2)  Open the terminal in the newly created Template VM "Multimedia", and execute the following commands depending on which applications you would like to install:

      -  gmusicbrowser:  sudo apt-get install gmusicbrowser

      -  Musique:  sudo apt-get install musique

      -  QMNP:  sudo apt-get install qmnp

      -  Rhythmbox:  sudo apt-get install rhythmbox

      -  VLC player:  sudo apt-get install vlc


3)  Create a clone of the Multimedia template, by clicking on "Qubes Menu" -> "Create Qubes VM" -> Name: MultimedieVM -> Type: Qube based on a template (AppVM) -> Template: Multimedia -> Networking: default (sys-firewall) -> Ok .

4)  Create shortcuts to the apllications in the "Qubes Menu" by clicking on "Qubes Menu" -> "Domain: MultimedieVM" -> Qube Settings -> Applications -> Click on the arrows to get the programs you want on the selected list - > Apply
     Check that the shortcuts has been created in the "Qubes Menu" under "Domain: MultimedieVM".


How to read a CD, DVD, etc. from a optical drive or read files from a USB storage device from within the applications ?

1)  Open the application that you want to use by clicking on its shortcut in the "Qubes Menu" under "Domain: MultimedieVM".

2)  Insert the CD or DVD.

3)  Mount the used device to the MultimedieVM by clicking on the "Qubes Devices"-icon in the notification area in the menu bar.
     Info: If you use a OPTICAL USB-drive, choose sys-usb:... --> MultimedieVM .

4)  Find the disc in the application.
     Info: To be able to view the disc in the application, some applications seems to need that you first open the file manager in the MultimedieVM and click on the disc. Then the disc appears in the application. Then click on the disc in the application. Now you should be able to play the disk or copy its tracks.

M

unread,
Mar 18, 2020, 1:55:17 PM3/18/20
to qubes-users
Although I have downloaded and installed the applications today and I have updated the Multimedia template thru the Qubes Updater, some of the application versions is several years old  although there exist newer versions of them.

Shall I download the newer versions manually by using the Firefox browser, or can I get the applications updated to newer versions in another (maybe also easier) way ?

M

unread,
Mar 18, 2020, 2:04:29 PM3/18/20
to qubes-users

M

unread,
Mar 18, 2020, 4:24:35 PM3/18/20
to qubes-users
When a newer version of a application only is possible for download directly from a webpage, this procedure is suggested:

1)  Install the required packages.
2)  Download the wanted application-package.
3)  Unpack them
4)  Compile.

Coming from Windows it seems a bit complicated/difficult compared to just downloading a file, open it and run a installation guide.

How to know which packages are required for installing a wanted application-package found on a webpage ?

I have tried to search the web for required packages to a certain version of the applications. But I haven't have any luck finding a webpage that describes this.

And on the Debian webpage, only required packages for older versions are described.

M

unread,
Mar 18, 2020, 4:56:55 PM3/18/20
to qubes-users
Or has this been changed over the years so its possible now also in Linux to just download and install files from webpages without the user has to think about required packages ?

Mike Keehan

unread,
Mar 18, 2020, 5:51:32 PM3/18/20
to qubes...@googlegroups.com
On 3/18/20 8:56 PM, 'M' via qubes-users wrote:
> onsdag den 18. marts 2020 kl. 21.24.35 UTC+1 skrev M:
>
> onsdag den 18. marts 2020 kl. 19.04.29 UTC+1 skrev M:
>
> onsdag den 18. marts 2020 kl. 18.55.17 UTC+1 skrev M:
>
> onsdag den 18. marts 2020 kl. 18.30.47 UTC+1 skrev M:
>
> *How to setup a multimedia VM in Qubes OS 4.0.3 ?*
> *How to read a CD, DVD, etc. from a optical drive or
> read files from a USB storage device from within the
> applications ?
> *
Use a Fedora template instead of Debian.
They have different design criteria, as their documentation will tell
you. You want more up to date packages than Debian uses!

Mike.

M

unread,
Mar 19, 2020, 5:18:56 AM3/19/20
to qubes-users
Ok, I'll try to make a Fedora multimedia template and see how that works...

According to the following webpage, the advice is to clone a preinstalled template: https://www.qubes-os.org/doc/multimedia/

1)  Can I just clone the fedora-30 template and set networking in the new template to the sys-firewall, or would that compromise the security of Qubes OS ?
     If the last is true: How shall I instead make a new Fedora template, and install the applications I want in it ?

2)  Shall networking in all templates be set to none as default, and is it necessary to change this when installing new plugins for multimedia manager applications which the user would like stayed installed after the VM is restarted ?

Sven Semmler

unread,
Mar 19, 2020, 12:26:29 PM3/19/20
to M, qubes-users
On Thu, Mar 19, 2020 at 02:18:55AM -0700, 'M' via qubes-users wrote:
> Ok, I'll try to make a Fedora multimedia template and see how that works...
>
> According to the following webpage, the advice is to clone a preinstalled
> template: https://www.qubes-os.org/doc/multimedia/
>
> 1) Can I just clone the fedora-30 template and set networking in the new
> template to the sys-firewall, or would that compromise the security of
> Qubes OS ?

TemplateVMs do not require networking to install software. Qubes
implements an UpdateProxy in your sys-firewall and all TemplateVMs know
how to connect to it to retrieve updates without having an explicit
network interface.

The idea is to NEVER give a TemplateVM network access to prevent
accidential contamination. Only legit update/install traffic will go
over the dedicated UpdateProxy.

> If the last is true: How shall I instead make a new Fedora template,
> and install the applications I want in it ?

Just try:

- qvm-clone fedora-30 fedora-30-multimedia
- qvm-run -a fedora-30-multimedia xterm
- in Xterm: sudo dnf update

It'll work without network interface.

> 2) Shall networking in all templates be set to none as default, and is it
> necessary to change this when installing new plugins for multimedia manager
> applications which the user would like stayed installed after the VM is
> restarted ?

The other basic idea of Qubes is to install but never run any
applications in the TemplateVM. So after you cloned the TemplateVM and
installed software via 'sudo dnf install' shut it down and create an
AppVM based on the template:

qvm-create --template fedora-30-multimedia --label red multimedia
qvm-run -a multimedia xterm

... then in XTerm launch your applications and try them.

/Sven

--
public key: https://www.svensemmler.org/0x8F541FB6.asc
fingerprint: D7CA F2DB 658D 89BC 08D6 A7AA DA6E 167B 8F54 1FB6

signature.asc

M

unread,
Mar 19, 2020, 6:12:04 PM3/19/20
to qubes-users
Thank you for the answers, which is very nice to know. And I got two new questions for you - just jump to the end of this message, as you don't have to read the following.


Info only to those who would read this thread in order to setup a multimedia VM in Qubes OS 4.0.3 them self:

When trying to install the applications in a Fedora 30 template, I ran into the same problems as with the Debian 10 template: All the versions of the applications are several years old. And as the Musique player package is a .deb-file, it only seems to work with Debian. I have therefore gone back to Debian.

To install the 3.4.4-2 version of Rhythmbox, it is needed to either wait for the Debian template in Qubes gets updated to Bullseye or download the Bullseye template that Unman has created and made possible for download here; https://qubes.3isec.org/Templates_4.0/ , or create it yourself following this guide: https://www.qubes-os.org/doc/building-non-fedora-template/


How to install a .deb file in the multimedia template VM ?

If there isn't any other more secure way to get a .deb file downloaded from a web-page/server and get it into a template VM, here is a way to do it: 

1)  Copy the trusted download-link for the .deb-file from the Firefox browser in another AppVM.

2)  Open the "Qube Settings" for the multimedia template VM, and change networking to the sys-firewall.
     Click on "Apply" and "Ok".

3)  Open the Firefox browser in the multimedia template VM and paste the download-link in the html line and press ENTER.
     Now the file should be downloaded to the Download folder in the multimedia template VM.
     For security reasons, do not use the browser to other things.

4)  When the file has been downloaded: Open the "Qube Settings" again for the multimedia template VM, and change networking to the default none.

5)  Open the terminal in the multimedia template VM, and execute these commands:
         a)  cd Downloads
         b)  sudo dpkg -i filename.deb
         c)  In case you get any dependency errors:  sudo apt-get install -f
         d)  In case you would like to remove the package again:  sudo dpkg -r teamviewer
              To also remove the configuration files, write "--purge" instead of "-r".


New questions

1)  Is there a more secure way to get a .deb file downloaded from a web-page/server and get it into a template VM than the method I have described above under "How to install a .deb file in the multimedia template VM ?", and if so how ?

2)  When installing new applications or replacing an application in a template, is it then necessary to delete the VM's that is based on this template to get the changes implemented in the AppVM's, or can they be implemented in a smarter way ?

Sven Semmler

unread,
Mar 19, 2020, 9:38:47 PM3/19/20
to M, qubes-users
On Thu, Mar 19, 2020 at 03:12:04PM -0700, 'M' via qubes-users wrote:
> 1) Is there a more secure way to get a .deb file downloaded from a
> web-page/server and get it into a template VM than the method I have
> described above under "How to install a .deb file in the multimedia
> template VM ?", and if so how ?

Yes. A lot more secure and a lot more easy. You should go a bit easy on
the tutorial style posts until you have figured this out for yourself. I
mean this in the best possible way: giving back to the community is
what's it all about ... but at the moment you might harm more then help.

To your question: Just download the .deb file right there in your
broweser and then open the folder that contains the Downloads. Right
click on the .deb file and "Copy to other AppVM..." and select the
TemplateVM where you want to install.

In that TemplateVM you will then find the .deb file in the
"QubesIncoming" folder in your home directory. This is one of the very
core features of Qubes together with the Clipboard: the ability to share
data easy, fast and securely between VMs/Qubes.

> 2) When installing new applications or replacing an application in a
> template, is it then necessary to delete the VM's that is based on this
> template to get the changes implemented in the AppVM's, or can they be
> implemented in a smarter way ?

Not at all. As soon as you shutdown the TemplateVM the changes are on
disk. Then shutdown and restart the AppVM and you'll have the new
version.

You should probably read this carefully: https://www.qubes-os.org/doc/templates/#advanced
signature.asc

M

unread,
Mar 20, 2020, 7:45:11 AM3/20/20
to qubes-users
Thank you so much for your answers !

Okay, I have thought of the "Copy To Other AppVM". But sadly I didn't try it. I stopped when I reached "AppVM", as I thought it wouldn't work for template VM's.

You're right, I should write my notes on the PC to begin with and first publish them after I get it up and running as intended - I was to happy about finally gone so far and would like to help others who would like to be able to do the same, as soon as possible as I have wasted much time trying to find out how to get to this step.

I have found another multimedia manager called "Exaile", and I have downloaded it (from here: https://www.exaile.org/ ) and installed it. But when I click on its shortcut in the "Qube Menu", it doesn't start. On the front page it says it's for "GTK+".

Is it possible to run "GTK+" applications in a Debian 10 (or a Fedora 30) template in Qubes OS 4.0.3 immediately, or do I have to install a package to run it and if so which one ?
I have tried to search the web for an answer, and also in here. But I haven't found one.

Sven Semmler

unread,
Mar 21, 2020, 4:42:59 PM3/21/20
to M, qubes-users
On Fri, Mar 20, 2020 at 04:45:11AM -0700, 'M' via qubes-users wrote:
> Is it possible to run "GTK+" applications in a Debian 10 (or a Fedora 30)
> template in Qubes OS 4.0.3 immediately, or do I have to install a package
> to run it and if so which one ?

That should just work. You could try to start the program from the
terminal and see if any errors are reported. Otherwise you might want to
fund the respective mailing-list / contact for that program and ask for
help. This has nothing to do with Qubes.
signature.asc

Sven Semmler

unread,
Mar 21, 2020, 6:05:39 PM3/21/20
to M, qubes-users
On Sat, Mar 21, 2020 at 03:42:48PM -0500, Sven Semmler wrote:
> terminal and see if any errors are reported. Otherwise you might want to
> fund the respective mailing-list / contact for that program and ask for

lol ... I am sure they are happy if you "fund" them, but I meant to
write "find" ;-)
signature.asc
Reply all
Reply to author
Forward
0 new messages