Score:0

How to add a script to launch bar?

mu flag
bas

From multiple topics on this forum I distilled the following approach:

  • copy an existing .desktop file from /usr/share/applications to ~/.local/share/applications
  • manipulate the file to your needs
  • give the file executing rights
  • hit windows key to open up available applications
  • type the specified name in the newly copied .desktop file, and drag it to launcher bar

Any wrong conclusions/interpretations in the above?

This is my changed .desktop file, with chmod +x attributes, sitting in ~/.local/share/applications

[Desktop Entry]
Version=1.0
Type=Application
Name=RPD Work
Categories=GTK;GNOME;X-GNOME-NetworkSettings;Network;
Keywords=rdp; remote desktop; work;
Exec=~/rdp.sh work
Icon=org.remmina.Remmina
MimeType=application/x-remmina;x-scheme-handler/remmina;x-scheme-handler/rdp;x-scheme-handler/spice;x-scheme-handler/vnc;

When I type 'rdp' or 'remote desktop', only the existing original remmina icon appears, my personal creation never shows up.

What am I doing wrong (and why is this so complicated.... am I following the wrong approach here?)

Score:1
cn flag

A custom .desktop laucher will appear in the application overview only when it is valid. The issue here is that you are assuming that all bash expansions and substitutions work from within a .desktop launcher: that is not the case. Thus, in your Exec= line, replace ~/rdp.sh by the full path, i.e. /home/<yourlogin/rpd.sh. As far as I see, that will be the only issue with your current file.

Note that there is no need to make the .desktop file executable.

Why it is complicated? Old tools that allowed to do this through a GUI have been dropped, but tools like "Libremenu" or "Alacarte" can still be installed through the software center if you need this on a regular basis. "Complicated" is a relative term. You may quickly find it faster to edit a .desktop file than to click around in Libremenu.

FedKad avatar
cn flag
The name field should also be corrected like this: `Name=RDP Work`
mu flag
bas
Yeah found that as well. But had some more keywords that should have made it appear. The main issue was indeed the path thing. It works now. Thx
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.