I had noticed that Thunderbird is capable of opening attachments in a
DVM via a Qubes specific plugin, and while this was great I wanted to
take this a step further by optionally opening URL links in a DVM when I
so choose. Unfortunately right clicking on a link in an email does not
give you the option to select a different browser or handler utility by
After searching around a bit I found a way to do this and thought I
would share for anyone else that thinks this is also a good idea.
The first step is to modify Thunderbird for a selection box:
Edit -> Preferences -> [Config Editor] -> ["I'll be careful, I promise"]
Search for "network.protocol-handler.warn-external" in the top search
bar, and double-click each entry to change the values of
ftp,http,https,file to true. The 'default' is likely already set to true.
You will now be given a selection box whenever clicking on a URL within
any Thunderbird email message.
Now create a batch script file like:
% cat <your-script-name>
qvm-run '$dispvm' /bin/firefox $1
% chmod 755 <your-script-name>
Now, attempt to open any url in a Thunderbird email, and when presented
the initial selection box locate your script and select it. You can now
easily select between a normal firefox in your current AppVM or a dvm
version of firefox when opening any URL from within an email.
My only open question would be on the possibility of malformed URL's and
how the "qvm-run ... $1" command might handle those patterns on the
local VM side. The $1 probably should be sanitized for ";,()<cr><lf>"s
before passing it on to qvm-run. I also created a script that
echos/copies the link to a file containing a simple html file with an
embedded redirection, and instead calls qvm-open-in-dvm on that html
file. Both methods work fine but the first seems cleaner since there is
no temporary file needed to be deleted after the command is run.