help, trying to make custom launchers

96 views
Skip to first unread message

pixel fairy

unread,
Jan 22, 2018, 2:28:04 AM1/22/18
to qubes-users
qubes 4.0rc3

Id like to make custom launchers for two purposes

1. easily run apps from custom dispvms. using shell scripts for now.

2. make alternate launchers with different icons. for example, the twitter bird icon in a twitter app-vm.

tried making desktop files in ~/.local/share/applications, but they dont show up in menus. what else does one need to do?

[799]

unread,
Jan 22, 2018, 2:36:27 AM1/22/18
to pixel...@gmail.com, qubes...@googlegroups.com
pixel fairy wrote:

>> qubes 4.0rc3 Id like to make custom
>> launchers for two purposes [...]

Hello pixel fairy,

My suggestion is: don't spend time playing around tweaking custom . desktop files.
I have installed menulibre in dom0 and I am now able to tweak my menu through a comfortable GUI.

https://bluesabre.org/projects/menulibre/

As an additional benefit it is also very easy to hide menu items you don't need and you can reorder the menu.

qubes-dom0-update menulibre

If you want this additional comfort through installing additionall packages in dom0 is up to you - most users don't like to go this road.

You can also install menulibre by downloading the package manually.

Suggestion:
Having a default installation of menulibre in dom0 (through the Qubes Team)

Regards

[799]

Yuraeitha

unread,
Jan 22, 2018, 7:24:17 PM1/22/18
to qubes-users

There are many ways you can play with this, but a simple suggestion to pick from in addition to what [799] suggested, would be to use the hidden pre-installed XFCE4-Whiskermenu plugin, instead of the default menu that comes out of the box. Qubes 4 has the Whiskermenu installed by default, so you don't even need to install anything in dom0. Simply right click on the panel, go to add items, and find the Whiskermenu. You can add favourites to show in your main menu right by simple right clicking any menu icons, change size, change icons, change text, and so on. You can also change the Whiskermenu's own icon, which is pretty ugly with its default icon, but looks much better once you find a better icon for it. There are plenty of pre-installed icons to pick from too.

It's pretty awesome for a quick and dirty solution, although it's not perfect, but it solves many user desires. See further below regarding making specific entries. I'll mention keybinds first here.

You probably know this, but keybind your scripts is pretty useful too. It's even really easy to keybind scripts that are located inside VM's. Which will not only start the VM if its shutdown, it will also just execute normally if it's already running.

Basic logic, keybind:
1) qvm-run 'AppVM-name' app-name-to-execute-from-VM-/bin
2) qvm-run 'AppVM-name' specific /path-to-file-to-execute-like-for-example-AppImages-or-bin-executeables.
3) qvm-run 'AppVM-name' bash terminal-command-to-execute-in-AppVM
4) qvm-run 'AppVM-name' bash path-to-script-to-execute-in-AppVM.

You can keybind it with Systems Tools --> Keyboard --> Application Shortcuts tap --> "Add".

For example I run all my most frequent used AppVM scripts, apps, virtual AppImages, and so on, this way. I use Ctrl+Shift+Alt + any fitting letter on keyboard, to minimize key conflicts, but same time making it easy to memorize. For example I use Ctrl+Shift+Alt to all my keybinds, so I never need to memorize otherwise, and M goes for music-player, while N goes to my note taking app, while E goes to e-mail, A is used to one of my frequent used scripts, and so on.
I also further keybinded System-Tools --> Screenshot, because it's different from the typical screenshot tool, allowing for region capturing, rather than just screenshot everything that the default one does. Like everything else here, both are already pre-installed in Qubes 4. (i.e. Ctrl+Shift+Alt+Z to the cmd xfce4-screenshooter).

Whatever the imagination allow for, I find the above approach highly useful.

You could also alternatively pick a menu entry which you will with certainty never use, and then just modify it by right clicking on it (you can do this in the Whiskermenu's), and then change not only the icon and icon-text to whatever you desire, but also the working path too. For example, the above keybind commands, you can put in here too. Like for example "qvm-run appVM-name path-or-app". If you want to run scripts this way, then use 'qvm-run appVM-name bash terminal-cmd".

I never fully investigated how Qubes modifies XFCE in fedora to fit in the Qubes entries. But if I recall correctly, nothing you do in your home folder will work. You need to dig deeper into the system files for that.

Either way, hopefully you can use any of this to something.

Yuraeitha

unread,
Jan 22, 2018, 7:36:37 PM1/22/18
to qubes-users
On Monday, January 22, 2018 at 8:28:04 AM UTC+1, pixel fairy wrote:

Not sure if you know any of this already, but you might need to transfer some icons to dom0, like twitter icons that you mentioned. I don't think these can be found in dom0 by default, so you'll likely need to transfer them yourself. It's pretty straight forward to do, especially with tools like the whiskermenu, so you only need to transfer and then pick the icons in the whiskermenu settings.

However just be mindful that images and icons carries security threat, though, the risk might be remote? I can't speak with certainty, but I believe exploits through icons are not too likely in this day and age, unless you got it from some dodgy website or something. But as said, I have no means to judge how big a security threat it really is, but my belief is right now, if the source is somewhat trustworthy, then the odds of risk are probably low.

Just don't transfer too much to dom0, the more you do it, the more you increase the risk of getting something bad into dom0. Even low odds for risk can build up over time if you compile them.

Steve Coleman

unread,
Jan 23, 2018, 8:41:52 AM1/23/18
to pixel fairy, qubes-users
I'm still on Q3.2, but I think my method would still apply to 4.rcX;

The dom0 ~/.local file structure gets rewritten often during software
updates, and your *.desktop files would also need to be embedded in the
associated *.menu files or they will not get referenced and displayed in
the Qubes menu.

What I do is to put the custom *.desktop in the software template of the
associated user vm, and then when any software updates or installs
happen, they automatically show up in dom0 and are rendered and ready to
use with the "Add more shortcuts" app menu add or remove function. Qubes
also has a sync menu function which should also work for this.

For instance, just yesterday I decided it would be useful to have some
VM's to have a "Shutdown" menu entry, because I often need to start one
VM temporarily, for quick data access, and then shut it down a few
seconds later as not to consume cpu or memory. I just copied
fedora-26:/usr/share/applications/xterm.desktop to */shutdown.desktop,
edited the contents then did a dnf update, which pushed those desktop
files over to dom0. Now the shutdown entry can be added to any menu very
quickly if/when needed. The one catch is selecting an appropriate icon
for that function since the previous one (xterm) had a specific meaning
that you would not want to confuse. Anything currently unused is fair game.

The one downside is when you upgrade qubes software templates (e.g.
fedora-26 -> fedora-27 template), if you are starting with the clean rpm
version you need to remember to copy all those extra *.desktop files to
the next version of the templates. I generally just upgrade my template
in place as that retains any other custom tweaks I may have done.

cooloutac

unread,
Jan 23, 2018, 1:36:39 PM1/23/18
to qubes-users
was so easy with kde.
Reply all
Reply to author
Forward
0 new messages