Tips and Tricks

Looking for quck tips and tricks that aren’t in the guides and where to find information.
This could be a starting point of where to find answers.
Some examples:
How to cascade windows
How to open a dom0 terminal in a specific directory.

This is not a Qubes-specific question. Qubes GUI is xfce (or, KDE, if you install it manually). For xfce I found this: two windows side-by-side and tile, cascade: possible in Xfce? / General discussion / Xfce Forums.

You would have to enter the path somewhere anyway. Why not enter it after you open the terminal as cd path/to/directory?

There are a lot of tips and tricks in the documentation. For example:

The intent would be a more user driven approach.
The object would result a more dynamic source of information rather that a static document. The offshoot threads could, for instance, show different ways of answering the same question.
Answers to a question shared by many could be added to static documents.

Documentation is a community effort: How to edit the documentation | Qubes OS.

This sounds like this forum to me. Do you have anything else in mind? Any examples?

1 Like

The exampes were just examples. One person’s answer could be different, and more applicable, than anothers.
To demonstrate:

  1. A way to cascade windows is applicable to qubes even though it is not limited to the OS. Someone may be looking for a starting point of how to implement the action using xdotool in a script. It would be helpful to see how dom0 and xorg affect vm windows. It could also servce as an example of the differences between xorg and wayland.
  2. Opening a terminal in a specific directory simply by selecting the action from a context menu would help show how the context menu can be changed to include other user actions.

The effort would be to consolidate information rather than including the information with several disparate forum entries. The forum search tool is limited to its word association abilities. Can searches be returned by OS version, date range, topic, regex?

1 Like

It’s quite likely users spend many hours resolving qubes related issues for their own use. This can be an opportunity for them to post what they found. It might even result in someone else posting a more clever way of doing the same thing.

x-tile for dom0?

Not quite sure what the question is.
dom0 can host the X server, which allows the creation of windows, which x-tile can act on.
If several windows are opened containing dom0 shell instances, they could be tiled.
But this is likely not what you meant.

Hm, can x-tile run from domU control window layout for other VMs?

No, at least with my understanding of the gui manager comparmentalization model.

The control or scripts would have to reside in, and be executed from, dom0.

If you’re interested in a script that has worked nicely you might consider:
https://forum.xfce.org/viewtopic.php?id=6841
The xfce.org version was tweeked a little to match screen resolution and starting offset. The script was then copied to /usr/local/bin, marked executable, and assigned a keyboard shortcut of Alt-Esc.
It is probably the most used script on this system.
There is a github version too, but it hasn’t been tested on this system:
dotfiles/winfuncs.sh at master · crnihr/dotfiles · GitHub

For example, the cascade function is called using:
winfuncs.sh cascade
The script dependencies (wmctrl, xwininfo, xkbcommon, and xdotool) are part of the plain vanilla X server install.
To further the example, using a screen resolution set to 1440x900 the changes to the cascade function of the script are:

function win_cascade {
get_workspace
get_visible_window_ids

(( ${#WDOWS[@]} < 1 )) && return;

x=40; y=40; commands=""
xoffset=25; yoffset=25

for window in ${WDOWS[@]} ; do
	wmctrl -i -r $window -b remove,maximized_vert,maximized_horz

	commands="$commands windowsize $window 1225 600"
	commands="$commands windowmove $window $x $y"

    x=`expr $x + $xoffset`
    y=`expr $y + $yoffset`
done

echo "$commands" | xdotool -

}

Some qubes command manpages appear to be formatted using markup/markdown.
A simple way to look at the manpage from the CLI might be:

man qrexec-client-vm | lynx --stdin

Any other ways to do this?

Re-reading your question, my response may have been misleading.
The winfuncs.sh script runs in dom0, for example, placing the script in dom0 /usr/local/bin.
The X server runs in dom0 so the control has to be from dom0.
Executing the script in dom0 will adjust VM windows in workspaces.
Just to be clear, the script does not use any commands not already present in a generic install of dom0. No network access is used nor necessary.