Quick Quality-of-Life Improvements

Typo; good catch

1 Like

Would be helpful to add Qubes version next to each tip.
Something like:
[Tested for 4.2]

Good guide.

1 Like

This is more of a “Fedora tip” than a “Qubes tip,” but it seems like a lot of people don’t know about dnf history, which is useful in dom0:

3 Likes

Good idea, but we’ll do the negative version of this to save words: Whenever a new release comes around, everything gets tagged with Untested for R4.X which get removed as tip creators/users report failure or success

Nice tip–added.

Then you’ll have to repeat it each time, for each new version.
Even more wording :slight_smile:

Good idea to leave the default line and override it! :+1:
I always add “sched-gran=core” with “smt=on”; it avoids running different VMs on the same core, mitigating some (potential) data leaks between different VMs.
So the last line would be:

GRUB_CMDLINE_XEN_DEFAULT="$GRUB_CMDLINE_XEN_DEFAULT smt=on sched-gran=core"

Can someone here tell me how to “undo” pkill? I didn’t know I could set a timer on it, as shown in the script here on this thread, so I did it without a timer and I did it globally to an admin user … because I didn’t know how to change the admin user name without killing the 3120 process running and thought maybe pkill everything would be easier and well it was and was not because I got to change the user name but now can’t use that admin user anymore until I resume all the processes for that account and I have no idea how

Root terminal keyboard shortcut in focused VM

Using i3 there is an way how to open terminal in the VM of the focused window ($mod+Enter by default).

Sometimes you’d want to be root in that terminal easily. You can define yet another keyboard shortcut to do so ($mod+Shift+Enter in the following example).

in dom0:~/.config/i3/config:
bindsym $mod+Return exec qubes-i3-sensible-terminal
bindsym $mod+Shift+Return exec qubes-i3-sensible-terminal.root

1 Like

Added; thank you

Would you or anyone else happen to know how to do the same without i3?

1 Like

Thank you; added.

@unman, @ruza, and/or anyone else should double check my interpretations of the above two entries.

After much deliberation, I decided to place @ruza’s i3 version under “etc.” because I feel a tip for i3 isn’t mainstream enough to warrant prominent placement.

Sure, anyone could use favourite window manager to assign keyboard shotcuts to run corresponding commands.

Having a monitors with a multiple inputs (i.e. HDMI and DisplayPort) you can switch monitor inputs using a keyboard without a need to do so physically on the monitor.

Screenshot

  • Lets the user take a screenshot based on rectangular selection and sends it to the currently focused VM
#!/bin/sh
# lets the user take a screenshot based on rectangular selection and sends it to the currently focused VM

CUR_WIN_ID=`xdotool getwindowfocus`
CUR_VM=`xprop _QUBES_VMNAME -id $CUR_WIN_ID | cut -d \" -f 2`

if [[ "$CUR_VM" != "_QUBES_VMNAME:  not found." ]]; then
	xfce4-screenshooter -r -o "qvm-copy-to-vm $CUR_VM"
	notify-send "Screenshot sent!" "Your selection has been sent as a screenshot to $CUR_VM!"
fi

From here:

5 Likes

Thanks; added

1 Like

Open terminal for the template of the active windows.

#!/bin/bash

CUR_WIN_ID=`xdotool getwindowfocus`
CUR_VM=`xprop _QUBES_VMNAME -id $CUR_WIN_ID |cut -d \" -f2`
CUR_VM_TEMP=`qvm-prefs $CUR_VM template`

qvm-run -q -a --service -- $CUR_VM_TEMP qubes.StartApp+qubes-run-terminal

exit 0
3 Likes

You can use qubes.StartApp+qubes-run-terminal (or /usr/bin/qubes-run-terminal) instead of specifying gnome terminal/xterm/etc:

5 Likes

Didn’t know that was an option, I changed the command.

Thank you; added

1 Like

Prevent resizing windows from crashing xorg in qube

Window Manager > Advanced > Hide content of windows: When resizing

The problem described in this GitHub issue can happen to any application, not just the terminal, if you resize windows using the mouse.

You can do it with any window if you repeatedly resize it a few times, the qube will use a lot of CPU, and if it also uses all its memory OOM killer will kick in and kill xorg.

Hiding the window content when resizing solves the issue.

4 Likes