Linux: Creating a shortcut on the lxpanel > application launch bar. (quick and easy way).
First we will add a shortcut to a normal app and then modify that shortcut to fit our needs.
Procedure:
Add a shortcut for a normal app (lets call it XXX). Add it a the bottom to locate it easily.
Within ~/.config/lxpanel/LXDE/panels you will find some files.
Find which one contains a reference to XXX
It looks like
Button {
id=/usr/share/applications/vlc.desktop
}
id=/usr/share/applications/vlc.desktop
}
Copy that file to your ~/bin/ folder.
Edit it to fit your needs (mostly changing the command on the Exec= line).
Edit the path to make it go to your new file
id=/usr/share/applications/vlc.desktop --> id=/home/yourid/bin/vlc.desktop (path must be absolute)
Restart lxpanel
lxpanelctl restart
Now, when you click that XXX icon it should execute whatever you put on the Exec= line
I hope it helps.
If you know a better way, please say it.
1 Comments:
Yes, there are better ways...
I don't know if it was not there or I didn't notice it, but this is the right way
Right click on an existing application shortcut in the panel and you will get a context menu with "Application Launch Bar Settings"
----
However (and that's the reason I came back here), if you are going to be adding 'personalized' applications (i.e. not the standard ones), rather than hacking the lxde panel you could create launchers for those apps in
~/.local/share/applications
And from then on, those 'new' apps will be as real as any other and you will be able to add them to the panel just selecting from the list. They will also appear on the Start Menu.
In particular I do this because I want launchers for
- Firefox on private ( firefox --private-window )
- Chromium on private and no cache ( chromium --incognito --disk-cache-dir=/dev/null )
- Sublime on new window ( sublime --new-window ). Sublime is very smart, if you create a new window and try to do it again without touching the first file it will not create new ones. Some may say it is 'too smart -> dumb'.
- Quick screenshot on region to clipboard
scrot /tmp/screenshot-$(date +%F_%T).png -s -e 'xclip -selection c -t image/png < $f'
Better than creating those launchers from scratch is to copy the originals (from /usr/share/applications/ ) there and then edit at will.
Hope it helps.
Post a Comment
<< Home