### What is the process flow when opening a link/file in another VM ?
1. in an AppVM ('srcVM') the graphical "open in VM" or "open in dispVM" extensions (or respectively the `/usr/bin/qvm-open-in-vm` or `/usr/bin/qvm-open-in-dvm` tools) are used to open a link (or file) in a destination VM ('dstVM'). When dispVM are used, the destination VM is hardcoded to '$dispvm' (`/usr/bin/qvm-open-in-dvm` is a simple wrapper to `/usr/bin/qvm-open-in-vm`)
2. in srcVM, `/usr/lib/qubes/qrexec-client-vm` is called, which in turn uses the qubes.OpenURL [RPC service](https://www.qubes-os.org/doc/qrexec3/#qubes-rpc-services) to send the url to dstVM
3. in dstVM, `/etc/qubes-rpc/qubes.OpenURL` is called upon "reception" of the RPC call above, which in turn executes `/usr/bin/qubes-open`
3. in dstVM, `/usr/bin/qubes-open` executes `xdg-open`, which then opens the url (or file) with the program registered to handle the associated mime type (for additional info see the [freedesktop specifications](https://www.freedesktop.org/wiki/)).
Either add to `/etc/environment` or create `~/.envsrc` and set a variable there, then create `.xsessionrc` and source `~/.envsrc`.
See [this thread](https://www.mail-archive.com/qubes-users@googlegroups.com/msg20360.html).
### How would I enable sudo authentication in a Template?
There are two ways to do this now:
1. Follow this [Qubes doc](https://www.qubes-os.org/doc/vm-sudo/#replacing-password-less-root-access-with-dom0-user-prompt) to get the yes/no auth prompts for sudo.
2. Remove the 'qubes-core-agent-passwordless-root' package.
This second way means that sudo no longer works for a normal user.
Instead, any root access in the VM must be done from dom0 with a command like `qvm-run -u root vmname command`.
### How can I provision a VM with a larger/non-standard swap and /tmp?
Fedora's /tmp uses tmpfs ; it's mounted by systemd at boot time.
See `systemctl status tmp.mount` and `/usr/lib/systemd/system/tmp.mount.d/30_qubes.conf` to increase its size.
Alternatively you can increase the size afterwards with `mount -o remount,size=5G /tmp/`.
If you need to have a disk based tmp you'll have to mask the systemd unit (`systemctl mask tmp.mount`) and put a fstab entry for /tmp.
Alternatively you can add swap with a file inside the vm but it's a bit ugly: