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 started by searching guides. I found this guide but neither of the main methods works anymore in 11.10.

  1. The first solution, I have created the desktop file, however the file location given as .gconf-> desktop-> unity-> launcher -> favourites no longer exists. I can get to /home/sayth/.gconf/desktop but there is no longer a unity folder.

  2. The second solution described right-clicking the desktop and creating a launcher. Right-clicking the desktop no longer produces a "create a launcher" option.

I manually installed geany 0.21 as the one in the repo's is outdated. It's installed and working correctly, and is executing from /usr/local/bin/geany.

How can I add it to the launcher?

share|improve this question
    
Perhaps that question you link to needs to be updated for 11.10. –  WarriorIng64 Nov 13 '11 at 6:58
    
refer to: askubuntu.com/questions/13758/… –  david6 Nov 19 '11 at 22:39
    
I would but dougs answer below was perfect. –  sayth Nov 21 '11 at 10:26
add comment

6 Answers

up vote 14 down vote accepted

First thing I'd do is navigate to /usr/local/share/applications & see if there is a geany.desktop

If so then just drag onto the launcher.

If not then would just a minute or so to set up. Your source has a 'geany.desktop.in', remove the .in & it's a perfectly good geany.desktop

Edit: the geany.desktop.in is a good template for your .desktop but needs some minor editing before copying or after. Lines 4,5,6 start with a _ that should be removed.

Ex. of edited geany.desktop (or edited geany.desktop.in

[Desktop Entry]
Type=Application
Version=1.0
Name=Geany
GenericName=Integrated Development Environment
Comment=A fast and lightweight IDE using GTK2
Exec=geany %F
Icon=geany
Terminal=false
Categories=GTK;Development;IDE;
MimeType=text/plain;text/x-chdr;text/x-csrc;text/x-c++hdr;text/x-c++src;text/x-java;text/x-dsrc;text/x-pascal;text/x-perl;text/x-python;application/x-php;application/x-httpd-php3;application/x-httpd-php4;application/x-httpd-php5;application/xml;text/html;text/css;text/x-sql;text/x-diff;
StartupNotify=true

The source also has some geany icons in it, take the geany.png from geany-0.21/icons/48x48 & put somewhere like Pictures or Documents Then copy the geany.desktop.in file sitting in the source folder to ~/.local/share/applications/geany.desktop

Ex. - if it was in Downloads/geany-0.21

cp Downloads/geany-0.21/geany.desktop.in  ~/.local/share/applications/geany.desktop

Then just go there,

nautilus ~/.local/share/applications

right click on geany .desktop > properties > click on the icon area & browse to your geany.png > open

Finally drag geany.desktop onto your launcher

Edit: one advantage you'll see with a more 'proper' .desktop is it has a MimeTypes= line. Open up the .desktop in a text editor & take a look.

You can, if you want, now drag & drop any of those mimetypes on to the geany icon in your launcher & they'll open up in geany

share|improve this answer
    
thanks that worked perfect. –  sayth Nov 13 '11 at 9:10
    
I've put a bounty on the original question for 11.10 if you want to make a generic version of this over there so we have them all in one place. –  Jorge Castro Nov 13 '11 at 17:33
add comment

You can add a custom launcher in Ubuntu 11.10 by typing this in a Terminal

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

Once you have customized the item on your Desktop, drag it to the Launcher.

share|improve this answer
4  
And because this command is complicated to remember, you can record it in an alias. Edit your ~/.bashrc gedit ~/.bashrc and add this line alias cla='gnome-desktop-item-edit --create-new ~/Desktop' . I choose cla for Create Launcher App, I find it easy to remember. –  Boris Nov 13 '11 at 6:50
1  
It requires installing the gnome panel sayth@sayth-TravelMate-5740G:~$ gnome-desktop-item-edit ~/Desktop/ --create-new The program 'gnome-desktop-item-edit' is currently not installed. You can install it by typing: sudo apt-get install gnome-panel –  sayth Nov 13 '11 at 7:08
    
@sayth: so after installation of gnome-panel, it works now right ? –  Boris Nov 13 '11 at 7:29
    
I was debating whether to install it. Seems odd to need to install gnome-panel so the unity launcher works –  sayth Nov 13 '11 at 8:58
    
This method was very easy! Thanks! –  lpanebr Nov 22 '11 at 12:12
show 1 more comment

In Ubuntu 12.04 none of the above options worked for me when needing to create a launcher for a locally compiled app. This might be an app you created yourself or something you downloaded from source and then had to locally run make install. I ended up needing a hybrid of tips found in this thread. Using Angry Birds as a hypothetical example, I did the following:

  1. Create an angry-birds-launcher.desktop file and save it to the /usr/share/applications directory. You can do this in a single command with sudo gedit /usr/share/applications/xyz.desktop. The actual file name is not important so long as it ends in .desktop
  2. Gedit will open with a blank page. In gedit, input the following text:

    [Desktop Entry]
    Type=Application
    Name=[Name of your app, for example Angry Birds. This can be free text.]
    Exec=[full path to your executable and executable name, for example /usr/local/bin/angry-birds]
    Icon=[full path to your executable's icon and icon name, for example /usr/local/share/icons/apps/angry-birds.png]
    Terminal=false
    StartupNotify=true
  3. Double check for typos and save the file.

  4. Open Nautilus and browse to /usr/share/applications and you should see in the list of apps your app with the correct icon.
  5. Double click to launch the app. A temporary icon will appear in the panel. Because you launched an app from the 'official' directory (usr/share/applications), Ubuntu will finally display the menu option to lock the launcher into the panel.
  6. Mouse over the launcher in the panel, right click and select Lock into Launcher. You should be all set at that point.
share|improve this answer
add comment

You can follow this tutorial: " Howto create Application launcher and add icon to Unity in Ubuntu 13.04 / 12.10 / 12.04 "

share|improve this answer
1  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  fossfreedom May 16 '13 at 22:14
    
Okay and thank you for the information. –  DARDAR SAAD May 16 '13 at 22:30
add comment

When creating a .desktop file for your launcher you may want to give a path to the application's icon there:

Icon=/full/path/to/icon

In case you just want to change an icon to other than default you can do so by opening the Preferences menu with a right click on the .desktop file. This will show the following dialog:

enter image description here

Click on the icon to open a file selector box to give a new icon path.

Local .desktop files can be found in ~/.local/share/applications/, custom icons may be stored in ~/.icons/.

Only icons from .desktop files having executable permission will be shown.

share|improve this answer
add comment

Disclaimer: This is my original work in the form of a youtube video.

I have done a video on this topic. http://www.youtube.com/watch?v=ncWUFEc3WXY

share|improve this answer
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Eliah Kagan Jul 2 '12 at 0:39
    
Also, this is self-promotion. Be careful self-prompting. This looks good, though, as it has a disclaimer. –  hexafraction Aug 16 '12 at 13:44
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.