How does one recreate a custom application launcher that takes command line syntax and even perhaps parameters?
Solution 1
I have answered a similar question here.
Briefly, copy the nearest script from /usr/share/applications/
to ~/.local/share/applications
and then edit the xyz.desktop
file. The line that starts Exec=
is the line you need to edit, to put your own command in, along with whatever command line options you want. You will probably also want to edit the Name=
line to describe your own script.
Once you've done that you'll need to restart your computer or log out/log in, then you can hit the Super key, start typing part of the name you set and your launcher should appear. Select it and hit Enter and it will run your command.
Solution 2
Maybe you are looking for this command:
gnome-desktop-item-edit ~/Desktop/ --create-new
Good Luck!
Solution 3
I made a simple python script with GUI for this!
It's on http://jurschreuder.nl/
It's called Unity Launcher Creator, and I even use it myself!
Super simple:
- Unzip
- Click on UnityLauncherCreator.py
- Type in name
- Select program
- Select icon
- A launcher is created that you can drag & drop to Unity
I've included some icon files created by a genetic algorithm (GenArt for Android). You can use it in case the program doesn't supply a png or when it's just your own simple bash script.
Solution 4
You can install by
sudo apt-get install bzr
then
bzr branch lp:unity-launcher-editor
cd unity-launcher-editor/
./ule
when I tried to create a custom launcher, nothing happened when I tried to set a custom launcher icon. maybe the launcher icon needs to be a certain size, but I could not find that info. instead of creating a launcher with a random icon, I just stopped right there. but try this prog out, it looks promising.
Related videos on Youtube
Sn3akyP3t3
Updated on September 18, 2022Comments
-
Sn3akyP3t3 over 1 year
I had some custom scripts that I had custom launchers for on my desktop on 10.04. I would like to recreate that again after migration to 12.04, but unity seems quite foreign to me.
-
david6 about 12 yearsWell coverd by: askubuntu.com/questions/13758/…
-
agc93 about 12 yearsAgree with @david6 but also worth checking are you talking about a launcher on your Unity dock (on the left) or just one on your desktop. If it's just on your desktop, there should be an option from the the right-click context menu to create a new launcher.
-
Sn3akyP3t3 about 12 yearsI guess both. I didn't realize the two were independent of eachother until recently.
-
-
adempewolff about 12 yearsOn second thought, definitely follow the directions in the answer below. Editing the files in /usr/share/applications/ directly is not a good idea for a number of reasons (unless you a)specifically want the custom launchers to be the default for all users on your machine, and b) backed up the files first.)
-
ardavis over 10 yearsFantastic. Brilliant. Geronimo!