In my experience that should read:
personal-dvm -> personal_ddvm
In my experience that should read:
personal-dvm -> personal_ddvm
I don’t know if it is safe to conclude that ‘-’ in name is replaced with ‘d’ (dash?) in filename and '’ with ‘_u’ (underline?).
It’s the pattern I saw…and I have dozens of VMs.
Actually, I don’t use underscores, so I am taking your word for it that _ becomes _u.
I actually have a script that builds my (KDE) menu from the names of these files (it saves me a LOT of work, especially since every once in a while the file gets corrupted or confused and needs to be redone–hours of work if done manually. I had to modify it to deal with this shift from ‘-’ to ‘_d’ but after that it worked well.
The one thing I can’t account for with this rule is that immediately before the VM name it inserts an underscore…just a plain underscore, no d or u after it. But that’s just a second rule to add on top of the first one.
The most disturbing thing is the inconsistency of the naming pattern.
Example:
user@dom0:~/.local/share/applications > qvm-create abcABC_- --label red
user@dom0:~/.local/share/applications > find . -name '*abc*'
./org.qubes-os.qubes-vm-settings._abcABC_u_d.desktop
./org.qubes-os.vm._abcABC_u_d.firefox.desktop
./org.qubes-os.vm._abcABC_u_d.xfce4-terminal.desktop
Notice: the name of the qube is snake-case. The name of the actual app is with a dash.
Has anyone already reported this mess?
The pattern seems to be that “_” is always replaced by “_u” (u stands for underscore), while “-” is always replaced by “_d” (d stands for dash).
Wow. Some fine detective work there, @qubist !
Guess “someone” put together a few lines of code to “normalize” the names and that info will appear in the documentation of R6.0 !
I had to struggle through that when I upgraded my laptop to 4.2. I had a lot of stuff done to automate generating the KDE menu and it was predicated on the assumption that qube names would not be mangled like this.
And yes, ONLY the qube names, not the app names, got mangled. And for no apparent reason. I’d really love to know why they did this.
Furthermore, every desktop link I had in KDE broke, and I have about a hundred of them. It really sucked having to redo them.
will appear in the documentation of R6.0 !
I have updated the cleanup script.
Please test it and let me know if it works correctly for you.
I’m not using your cleanup script and I don’t have time to test it. I was simply pointing out what the pattern seemed to be.
It wasn’t addressed to anyone specifically. I simply replied to the latest message in the thread.
I’m not sure if the lead-post has been updated; but after receiving notification that “remnants cleared” the qubes_dom0-swap block persists.
I’m not sure if the lead-post has been updated;
Last time I updated it was on 25.Feb.2024 (only the cleanup script).
I will hopefully move all this to GitHub when I find the time.
but after receiving notification that “remnants cleared” the qubes_dom0-swap block persists.
That is expected. I created this mainly to reduce SSD writes, so endorsing swapping is not a goal.
You can increase dom0’s memory if necessary. Personally, I run it with 8 GiB and have swap disabled in all qubes. Gives me a much better balance.
Here is a short script which allows you to monitor your free RAM (Xen’s and dom0’s):
#!/bin/bash
set -euo pipefail
/usr/bin/renice -n 19 $$ > /dev/null 2>&1
pattern='s/Mem:(\s*[0-9.a-zA-Z]+){2}\s*([0-9\.a-zA-Z]+).*/\2/g'
free_mem=$(/usr/bin/free --human \
> head --lines=2 \
> tail --lines=1 \
> sed -r "${pattern}")
pattern='s/Swap:(\s*[0-9.a-zA-Z]+){1}\s*([0-9\.a-zA-Z]+).*/\2/g'
used_swap=$(/usr/bin/free --human \
> head --lines=3 \
> tail --lines=1 \
> sed -r "${pattern}")
printf "%s [%s] %s" "$(xl info free_memory)" "${free_mem}" "${used_swap}"
You can add it to a “Generic monitor” to your XFCE panel, updating e.g. every 5 seconds.
Thanks for the clarification and the script! I had a few issues with it, and made the slight changes below to get it working and to give more whitespace in the tray
EDIT: Made the xl
output more human-friendly!
#!/bin/bash
set -euo pipefail
/usr/bin/renice -n 19 $$ > /dev/null 2>&1
pattern='s/Mem:(\s*[0-9.a-zA-Z]+){2}\s*([0-9\.a-zA-Z]+).*/\2/g'
free_mem=$(/usr/bin/free --human | \
head --lines=2 | \
tail --lines=1 | \
sed -r "${pattern}")
pattern='s/Swap:(\s*[0-9.a-zA-Z]+){1}\s*([0-9\.a-zA-Z]+).*/\2/g'
used_swap=$(/usr/bin/free --human | \
head --lines=3 | \
tail --lines=1 | \
sed -r "${pattern}")
printf " %s [%s] %s" "$((`xl info | grep free_memory | sed 's/^.*:\([0-9]*\)/\1/'` / 1000))Gi" "${free_mem}" "${used_swap} "
Small side note: If you have not yet made the decision to put your work on Microsoft’s Github. i.e. codeberg.org or Gitlab would be a good non-big-tech alternative.
Yeah, it is difficult:
On one hand, we distrust all infrastructure, on the other - just because privacy is not a goal for Qubes OS, doesn’t mean deliberately choosing a well-known privacy abusing corporation is fine. Regardless of that, all Qubes OS’s code is already on GitHub.
Gitlab does not let me one the website without JS. Still, Tor Project uses it.
GitHub is still usable without JS (if one has been lucky to register when that was possible without JS-dependent captcha)
GitHub has a CLI tool
codeberg.org looks interesting. I will definitely check it out. Thanks.
This is only on the dom0 terminal any plans to of making it an option on the qube-manager create qube option?
That is up to the developer of Qube Manager.
To launch a disposable vm directly without using the Dom0 terminal, you can create a shortcut in the taskbar: copy the @qubist script into the /usr/local/bin/
folder:
sudo cp *the_script* /usr/local/bin/*the_script*
check that it is executable:
sudo chmod +x /usr/local/bin/*the_script*
then, you add a new launcher in your panel with the command, for example:
*the_script* -c firefox -p template=debian-12-dvm -p netvm=sys-firewall -p memory=400 2G -p label=red
you will just have to click on it to launch without going through dom0.
Shouldn’t the memory argument be -p memory=400M 2G
(adding the M
after 400
)?
Ah nvm the script doesn’t like M
; the command is correctly formed.