How to manage shortcuts to applications in DispVM?

222 views
Skip to first unread message

u+q...@bestemt.no

unread,
Feb 17, 2017, 3:02:55 PM2/17/17
to qubes...@googlegroups.com
Hi!

How can I add or remove application shortcuts for the DispVM? I've had
no problems managing these for TemplateVMs and AppVMs, but the DispVM
lacks the "Add more shortcuts..." entry (in i3, anyways), and I haven't
been able to locate the appropriate configuration file either. I've also
tried to add and remove application shortcuts of the DispVM's internal
VM and its TemplateVM without any effects for the DispVM; "Firefox web
browser" and "xterm" remain its only application shortcuts.

Thanks in advance!

--
Ubestemt

Haw...@bitmessage.ch

unread,
Feb 17, 2017, 4:10:02 PM2/17/17
to qubes...@googlegroups.com
> --


You could add a new "launcher" button to the XFCE panel, and for it's
execute command, follow this example for the tor browser (under section:
How to use Tor Browser behind TorVM), but other applications should
work in the same way:
https://www.qubes-os.org/doc/torvm/


u+q...@bestemt.no

unread,
Feb 17, 2017, 6:15:05 PM2/17/17
to Haw...@bitmessage.ch, qubes...@googlegroups.com
Haw...@bitmessage.ch <Haw...@bitmessage.ch> [2017-02-17 22:10 +0100]:
> You could add a new "launcher" button to the XFCE panel, and for it's
> execute command, follow this example for the tor browser (under section:
> How to use Tor Browser behind TorVM), but other applications should
> work in the same way:
> https://www.qubes-os.org/doc/torvm/

Thanks, but I don't see how something similar can be accomplished in i3,
which I'm using.

Unman

unread,
Feb 17, 2017, 7:54:11 PM2/17/17
to u+q...@bestemt.no, Haw...@bitmessage.ch, qubes...@googlegroups.com
Well you haven't said how you intend to add launcher commands to your
i3.
What HawKing has shown you is a template for the command that you need
to run in dom0 to launch programs in a dispVM:
"echo <command> | /usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red"

You could create desktop files based on the existing ones that you will
find in /usr/local/share/applications

Steve Coleman

unread,
Feb 20, 2017, 6:06:23 PM2/20/17
to qubes...@googlegroups.com
Since the things I want to run in dispVM's changes from time to time,
and the VM numbering is meant to change every time, I created a little
bash script to help me out. It prompts me with a list of DispVM's
currently running, and for each DispVM it lists apps with a check-box
for that VM/app combination. I pick one or more check boxes, click Ok,
and the selected apps start in their respective VM's

qvm-disp-add runs with no parameters, but the first line in the script
needs to be modified for your set of applications:

e.g.
APPS=( gnome-terminal nautilus firefox gedit google-chrome xterm )

Run as:
dom0> qvm-disp-add

Or embed in a desktop launcher for easy access.

It does require "zenity" to be installed in dom0 to present the dialog.
I can't remember if I installed that for some other purpose or if it was
already there. Your mileage may vary.



Steve

qvm-disp-add
2017-02-20-174940_340x242_scrot.png

u+q...@bestemt.no

unread,
Feb 22, 2017, 5:45:58 AM2/22/17
to Unman, Haw...@bitmessage.ch, qubes...@googlegroups.com
Unman <un...@thirdeyesecurity.org> [2017-02-18 01:54 +0100]:
> Well you haven't said how you intend to add launcher commands to your
> i3.
> What HawKing has shown you is a template for the command that you need
> to run in dom0 to launch programs in a dispVM:
> "echo <command> | /usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red"
>
> You could create desktop files based on the existing ones that you will
> find in /usr/local/share/applications

/usr/local/share/applications is the directory I was looking for.
Modifying its contents accomplished what I wanted to. Thank you!

Andrew David Wong

unread,
Feb 22, 2017, 11:57:43 PM2/22/17
to Unman, u+q...@bestemt.no, Haw...@bitmessage.ch, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I just tried creating some additional desktop files in this manner,
but I see no changes (no option to add additional menu entries or
launcher entries) even after regenerating the DVM Template. How is
this supposed to work?

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYrms6AAoJENtN07w5UDAwbl4P/RUMv24SJcuHrtCPfOMNPeB7
iKALzO/JwFXd/reCOoE0y5m3PXETk36W/AXAhne8z4PNz+9oY4SQdct8Vzdlmy+w
gfjmvcIrhj0aqsIpC5rmXDJVdLhgCwdL/HSdY2KMSFAAiQ5729rsyiqfB0xtSBc4
Idu902spWe9feWr/XebIvSWGF9vbahmVanQ047lDWcaY5RkMlpybZnv4QygKtOcS
Qk/OzUCXCg5LnVTnwezNJ3UArfu8sGW1pL/InhpukzE+pBgN3xoneO+HcJA3yr+U
a9OiKJmW7iEyUYoDRehYPuuPs3raGOCPGOvHXyAXU7uKic5u5mB0+uIwqgMw4ZgP
xEa2RdV+Ph/e5lWE//+ni2AH5bmxd8vhOOU8kKm2vB3GEk8HB+sZ295t/k7XFJ+c
AvxdN8Q8pR0vw9wTY/mONvM65YsB+V1aM04jNb72TShC/XIEax+9lcTp9edenkm7
OQZoSRnkJMTb5QkU3Hl1EV7OF6AkPgvs7BMo+fLVwiAhL2QKjI6MY2tss4n0xoli
t0G7j7LZp3oYAxgErrcW9WSYhwB1agmm//pAOBF/hAlBNbpTl/jYTy1ArCkWGdwu
uwW9Fl8mfmVEis1tdKO677gwCG/5j6nb0BTfRhOQbPeE319wLp20WCfgmwGHurGy
uO6+hjpOEvzQQ8E+YAUR
=Utyv
-----END PGP SIGNATURE-----

Unman

unread,
Feb 23, 2017, 7:56:20 AM2/23/17
to Andrew David Wong, u+q...@bestemt.no, Haw...@bitmessage.ch, qubes...@googlegroups.com
The "DisposableVM" entries in the xfce menus are sourced from
/etc/xdg/menus/applications-merged/qubes-dispvm.menu

Create the desktop file in /usr/local/share/applications
Then reference it in the qubes-dispvm.menu file.
The launcher will appear on the menu.

Nick Darren

unread,
Feb 23, 2017, 12:51:46 PM2/23/17
to Unman, qubes...@googlegroups.com

Thanks unman. This is what I looking for. I've tried to generate `xdg-desktop-menu`. But doesn't seems working before.  After the modification on 'qubes-dispvm.menu', now I can see my custom menu on XFCE. :-)

signature.asc

Andrew David Wong

unread,
Feb 24, 2017, 12:13:41 AM2/24/17
to Unman, u+q...@bestemt.no, Haw...@bitmessage.ch, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

> The "DisposableVM" entries in the xfce menus are sourced from
> /etc/xdg/menus/applications-merged/qubes-dispvm.menu
>
> Create the desktop file in /usr/local/share/applications Then
> reference it in the qubes-dispvm.menu file. The launcher will
> appear on the menu.
>

That works perfectly! Thanks, unman!

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYr8DIAAoJENtN07w5UDAwdfMP/16OzwqUPjj7CiUpqI6pa2Yj
yzj5rp4H6oxPnLu0CMu4P1MqBAaJJapuOLXJ4nRliY4Ptfj7VbP9ZR1J9sklL6ZZ
Z0X2BQslCK9OOL1GdGeKpaHZ4hXCu2KVsrDbRkzfmb0ZV1ZeEayB0c7+PrUJEy8T
W1HhgiZVhn9kEMTz6YzFDSIIVmrlLkOQor0qHgqOp+d4aXw38b3R1pHgM09kffgd
OWimMVTnSRs8KXa8KxX3w4Pv10lpl1s/5pO1aKKCllnwQNhFgSQ+ZdUN3p1hWH2N
7Pmx4Zl7BEfaw38YyFnnYrpXCjwYwGSSKJPpOe5hKDfsQ4v8GXiDANsmfA8qwhii
8WZQCdEGf/G3O7y3Xw0tbbNiZVr4gPPoaHdMGPOwQB1ribdZBAogoNbFK0vvMHCE
kyToMtnXB5eo0i/LBJAZg/htx5MKFr50ia7VfFy/NM/ETYoMFz4B179YskxLJhR1
/swnZiy8p8Hv7Tm0BaJ+6L6Z6XXjyjCefh1u5o9chXXPip5UVajXQUX7aGpIKy1H
v3Ze+BXj4GJx1Y74UI3k6iQ5UIZ/FLwotIyQcslZDMduCjnomnhXAYi+KC+X50g2
v/Xs8TvU+8WiGJKZJYVKoG8pFKaa0c5V9rUGAJ+eMMYRVt4RzNFZHbbPI4puqTMa
JZCIlIzdPJvfig8KMGQ/
=VS91
-----END PGP SIGNATURE-----

elsieb...@gmail.com

unread,
Mar 8, 2017, 5:01:51 PM3/8/17
to qubes-users, un...@thirdeyesecurity.org
On Thursday, February 23, 2017 at 12:51:46 PM UTC-5, Nick Darren wrote:
...
>After the modification on 'qubes-dispvm.menu', now I can see my custom menu
on XFCE. :-)


How were you able to modify "DispVM: Firefox web browser"? I couldn't view the contents to make a new one for Opera...

Unman

unread,
Mar 8, 2017, 7:19:22 PM3/8/17
to elsieb...@gmail.com, qubes-users
Let's say that the entry you need to run from dom0 is this:
"echo opera | /usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red"
(You can play around with the command line until you get it just as you
like.)

Look in /usr/local/share/applications:
Copy the qubes-dispvm-firefox.desktop to qubes-dispvm-opera.desktop
Edit qubes-dispvm-opera.desktop and change the EXEC line to
whatever command line you have found works.
Obviously change the Name line also.

Then look in /etc/xdg/menus/application-merged
Edit qubes-dispvm.menu

You want a line that says:
<Filename>qubes-dispvm-opera.desktop</Filename>

Either add this line below the other Filename entries or replace the
existing firefox entry.

That's all you need to do.

You can., of course, use exactly the same mechanism for starting ANY
application in your disposableVMs. I just use a keyboard shortcut to
spin up xterm and launch from that. Your choice.

unman

elsieb...@gmail.com

unread,
Mar 8, 2017, 8:51:35 PM3/8/17
to qubes-users, u+q...@bestemt.no
nano

That's the answer to how to modify those files in dom0.

Thank you everyone!

elsieb...@gmail.com

unread,
Mar 8, 2017, 9:24:22 PM3/8/17
to qubes-users, u+q...@bestemt.no, elsieb...@gmail.com
Exactly:

Fire up dom0 terminal
cd to /usr/local/share/applications
sudo cp ./qubes-dispvm-firefox.desktop qubes-dispvm-opera.desktop
sudo nano qubes-dispvm-opera.desktop
change the EXEC line from *firefox***** to opera | /usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red
Then [ctrl]o to write the file and [ctrl]x to quit
Then cd /etc/xdg/menus/application-merged
sudo nano qubes-dispvm.menu
Add this line above or below firefox
<Filename>qubes-dispvm-opera.desktop</Filename>
Then [ctrl]o to write the file and [ctrl]x to quit
Then exit to exit the terminal and you're done.

would have been helpful.

Unman

unread,
Mar 9, 2017, 8:06:40 AM3/9/17
to elsieb...@gmail.com, qubes-users, u+q...@bestemt.no
You forgot to change the "Name" line in the desktop file , so the menu
item will still say "firefox".
Also, as they say, other editors are available, (ed,vi,awk,sed), and
real programmers use buttterflies.

u+q...@bestemt.no

unread,
Apr 29, 2017, 5:42:00 AM4/29/17
to Unman, Andrew David Wong, Haw...@bitmessage.ch, qubes...@googlegroups.com
Unman <un...@thirdeyesecurity.org> [2017-02-23 13:56 +0100]:
> The "DisposableVM" entries in the xfce menus are sourced from
> /etc/xdg/menus/applications-merged/qubes-dispvm.menu
>
> Create the desktop file in /usr/local/share/applications
> Then reference it in the qubes-dispvm.menu file.
> The launcher will appear on the menu.

Postscript for those using i3 instead of xfce: dmenu sources its entries
directly from /usr/local/share/applications.

I assume the DispVM Firefox and xterm shortcuts are there by default
(named qubes-dispvm-firefox.desktop etc.). To add a new dmenu entry you
simply create a new .desktop file (see the examples elsewhere in this
thread).

E.g. qubes-dispvm-torbrowser.desktop

[Desktop Entry]
Version=1.0
Type=Application
Exec=sh -c 'echo /home/user/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/start-tor-browser | /usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red'
Icon=dispvm-red
Terminal=false
Name=DispVM: Tor Browser
StartupNotify=false
Categories=Network;WebBrowser;X-Qubes-VM;

Then "DispVM: Tor Browser" will be immediately accessible in dmenu.

--
ubestemt
Reply all
Reply to author
Forward
0 new messages