Reluctant templates for dispVM

Hi,

I created an AppVM with these commands:

qvm-create -C AppVM -l green -t debian-10 test-dvm
qvm-prefs test-dvm netvm ''

Now let’s say I want to turn this AppVM into a template to generate dispXXXX VMs.

Consequently, I type:

qvm-prefs test-dvm template_for_dispvms 1
qvm-features test-dvm appmenus-dispvm 1

After that:

  1. The “Advanced” tab of the “Qubes Manager” has a tick for “Disposable VM template” —> good
  2. In the Q Menu, there is the prefix “Disposable:” before “test-dvm” —> good
  3. Starting xterm or thunderbird or firefox-esr from the Q menu starts a dispXXXX —> Great
  4. Starting Files (nautilus) from the Q menu starts test-dvm —> bad

1. How to have all the applications from the Q menu starting in a dispXXXX (including e.g. Files/Nautilus)?

More importantly:

I have another VM (let’s call it other-dvm) that I would like to use as a template for dispXXXX.

  • In the Q menu, it is listed as: “Domain: other-dvm” and typing qvm-features other-dvm appmenus-dispvm 1 (in dom0) does not change anything, i.e. it is still listed as “Domain: other-dvm” and not as “Disposable: other-dvm” in the Q menu. NB: No error is thrown when typing the command.

  • Starting every app from the Q menu (e.g. xterm) starts other-dvm. Expected result: a dispXXXX is started

  • In dom0, qvm-prefs other-dvm displays (among others): template_for_dispvms - True

2. How can I turn that other-dvm VM into a template for disposable VMs? Meaning, how can I have all applications started from the Q menu to be started into a dispXXX

Thank you for your help and suggestions for these 2 questions.

2. How can I turn that other-dvm VM into a template for disposable VMs? Meaning, how can I have all applications started from the Q menu to be started into a dispXXX

I suppose the issue with your other-dvm as well as the ‘Files’ shortcut
of your test-dvm is that these shortcuts already existed before you
set the template_for_dispvm property and enabled the appmenus-dispvm
feature.

Could you go to your Qube Settings | Applications tab … remove all
shortcuts. Close/reopen the dialog and re-add the shortcuts you want?
Maybe that helps.

Thank you so much, @Sven . It worked!!

Shouldn’t your tip be part of the documentation… unless I missed it?

Or should a but report be open?
I mean: does anybody expect:

  • some of their shortcut to turn disposable
  • while the others not

… when:

  • ticking “Disposable Template VM” in the advanced tab
  • or when typing qvm-prefs test-dvm template_for_dispvms 1 in dom0?

Not anybody with my level of expertise, anyway! :slight_smile:

Thanks again, @Sven !

As a side note:

  • deselecting the shortcuts
  • hitting “apply”
  • selecting the shortcuts
  • closing the window with OK

… did not help. Closing (hitting the OK button) and reopening the dialog was necessary instead of hitting “apply”.

@Sven : Slightly faster is to use Apply, and then re-add.

Also note that once you Apply or Close, there is a behind the scene process that runs which needs time to complete its work… Which, it oftentimes seems not to - i.e., fails silently. :frowning:

For example, there are recurring problems with “Run Terminal” and XFCE Terminal…

These have so far been only at the “annoyance” level, with the workaround being to keep banging at it until it works. :slight_smile: So, since I’m not changing the Menu shortcuts that often, I haven’t tried to create a rigorous test case for a bug report…

Finally, see https://www.qubes-os.org/doc/managing-appvm-shortcuts/ for fixes via CLI.

Shouldn’t your tip be part of the documentation… unless I missed it?

I just made a PR:

1 Like

Slightly faster is to use Apply, and then re-add.

I incorporated this into the PR – thank you for catching it.

Ups. This might be due to the process @QubicRoot mentioned. My PR
currently proposes this text:

Note: application shortcuts that existed before setting this feature
will not be updated automatically. Please go the the “Applications” tab
in the qube’s “Settings” dialog and unselect all existing shortcuts by
clicking “<<”, then click “OK” and close the dialog. Give it a few
seconds time and then reopen and re-select all the shortcuts you want to
see in the menu. See this page for
background information.

Sounds perfect! :hugs:

Thanks, @Sven & @QubicRoot !

What a nicely structured post! And quite effective one (answered in the first reply!)

Welcome to the community @ednawaters! Keep it up :slight_smile: