PDA

View Full Version : [ubuntu] How to change command behind an icon in the launch bar?



Bao_Niu
September 27th, 2013, 05:44 AM
Currently I have an icon sitting in my launch bar, with corresponding command:
Dia

I want to change the launching command to:
LIBOVERLAY_SCROLLBAR=0 dia

and preserve the icon.
so each time when I click on the same icon it will launch Dia with the new command.
Is it possible to do this? And how? Many thanks.

deadflowr
September 27th, 2013, 06:29 AM
If it's a regular application you can:
first open gedit.
Then, for ease of use, open the file manager and then
go to the folder /usr/share/applications
Find the application, and then drag it into the gedit window.
Edit the command line "Exec="

At this point, I also add something like My in front of the program name
"Name=My Program"
Then open the file menu option and go to save as(not save)
And save the file in /home/username/.local/share/applications.

Then open the dash and search for the program.
When found, add it to the launcher and it should stay there, regardless of what happens from then on.

Bucky Ball
September 27th, 2013, 06:29 AM
Right click launch bar>Add New Item>Launcher>set up your launcher with a name, an icon pic if you want one, and command.

Test it. Delete the old icon with 'dia' as the command.

mc4man
September 27th, 2013, 06:33 AM
Locate the .desktop associated with Dia, open in a text editor, (root if in below address). Find the Exec= line & edit to -

Exec=env LIBOVERLAY_SCROLLBAR=0 dia %F
May need to log out/in to affect in launcher

Likely will be found in /usr/share/applications/dia.desktop