Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
4  
Well coverd by: askubuntu.com/questions/13758/… –  david6 May 15 '12 at 6:05
    
Agree 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. –  agc93 May 15 '12 at 6:53
    
I guess both. I didn't realize the two were independent of eachother until recently. –  Sn3akyP3t3 May 16 '12 at 14:37
add comment

5 Answers

up vote 11 down vote accepted

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.

share|improve this answer
add comment

Maybe you are looking for this command:

gnome-desktop-item-edit ~/Desktop/ --create-new

Good Luck!

share|improve this answer
    
Fantastic. Brilliant. Geronimo! –  ardavis Jan 13 at 0:51
add comment

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.

share|improve this answer
add comment

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:

  1. Unzip
  2. Click on UnityLauncherCreator.py
  3. Type in name
  4. Select program
  5. Select icon
  6. 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.

share|improve this answer
add comment

The .desktop files unity uses are stored in "/usr/share/applications/"

You can either (1) edit the files there, or (2) make copies of them and then add them to the unity launcher by dragging them.

(1) makes the changes global, aka. unity will use any command line parameters you add from wherever you launch them.

(2) will obviously not change how unity handles the application by default. useful if you want a custom launcher to run an application in say debug mode, but don't want it to always be run in debug mode.

Hope this helps.

share|improve this answer
    
On 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.) –  adempewolff May 16 '12 at 13:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.