Better late than never:
- Create a script at /home/user/bin/open_terminal.sh
#!/bin/bash
ID=`xdotool getwindowfocus`
QUBE=`xprop _QUBES_VMNAME -id $ID|cut -f2 -d\" `
if [[ "$QUBE" == "_QUBES_VMNAME: not found." ]]; then
exit
else
qvm-run $QUBE /usr/bin/qubes-run-terminal &
fi
-
Make script executable
sudo chmod +x /home/user/bin/open_terminal.sh
-
Create shortcut
-
In KDE:
* SystemSettings->Shortcuts->“Custom Shortcuts”
* Edit-New->Global Shortcut->Command/URL
* Optionally Provide Name for action
* Under “Trigger” enter keyboard combo
* Under Action, enter path to script
* Apply -
Xfce:
* Settings->keyboard
* On Application Shortcuts pane, select “Add”
* Use chooser to select command
* Define Keyboard combo -
The script at 1 is completely generic - you can use it for any
commands- egecho $QUBE|speak-ng --
will speak the name of the
focussed qube.
You can use one-liners of complex scripts as you will.
The first if statement tests for lack of QUBES_VMNAME - that is dom0.
Instead of exit call you can run program/script here.
- To have a root terminal use
qvm-run -u root..
You can, of course, have separate scripts and shortcuts for spawning root and
user terminals, or run different applications by qube name using elif
statements.