464

Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.

For some programs I use, I have to make custom launchers or .desktop files.

For instance, daily blender builds are generally just folders with an executable.

In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx.

3
  • 3
    If your Ubuntu has non-English locale, the custom icon may not work in the Unity Dash (but it works perfectly on the Desktop). Before drag-n-drop to the Unity Dash, edit your desktop file (e.g. with gedit) and remove the row with localized icon, in my case Icon[sv_SE]=gnome-panel-launcher and leave the other "Icon=" row. Jun 5, 2011 at 20:50
  • 14
    It's ridiculous how difficult it is to create a shortcut to an app. If Windows can make is so easy, why can't Ubuntu? Aug 15, 2015 at 10:13
  • Have a look at Xubuntu: Xfce has very elegant support for this through the menu editor. Launchers can subsequently be added to the desktop through a context menu.
    – 魔大农
    Nov 13, 2015 at 20:07

16 Answers 16

278
+250

Updated: 2015-Dec

For Ubuntu 15.10 or 14.04 LTS (11.10 or later, with Unity (3D))

NOTE: This can replace the function of an existing icon, or (once created) can be searched for (from Dash icon) to add to current button-bar.

First make your OWN copy of any of the .desktop files you want to modify. It is MUCH safer, and then you can always delete and start over.

(list all files)

ls /usr/share/applications/*.desktop

Example: Mozilla Firefox, firefox.desktop

(do this once, or after deleting any failed attempt)

cp /usr/share/applications/firefox.desktop ~/.local/share/applications

Then carefully change any wording, or add additional options.

(edit the file)

gedit ~/.local/share/applications/firefox.desktop &

Note: The ampersand '&' releases the command line immediately.


My own 'firefox.desktop' file:

Mozilla Firefox

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Name[es]=Navegador web Firefox
Name[fr]=Navigateur Web Firefox
Name[it]=Firefox Browser Web
Name[nl]=Firefox webbrowser
Comment=Browse the World Wide Web
Comment[de]=Im Internet surfen
Comment[es]=Navegue por la web
Comment[fr]=Naviguer sur le Web
Comment[it]=Esplora il web
Comment[nl]=Verken het internet
GenericName=Web Browser
GenericName[es]=Navegador web
GenericName[fr]=Navigateur Web
GenericName[it]=Browser web
GenericName[nl]=Webbrowser
Keywords=Internet;WWW;Browser;Web;Explorer
Keywords[de]=Internet;WWW;Browser;Web;Explorer;Webseite;Site;surfen;online;browsen
Keywords[es]=Explorador;Internet;WWW
Keywords[fr]=Internet;WWW;Browser;Web;Explorer;Fureteur;Surfer;Navigateur
Keywords[it]=Internet;WWW;Browser;Web;Navigatore
Keywords[nl]=Internet;WWW;Browser;Web;Explorer;Verkenner;Website;Surfen;Online 
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Actions=NewWindow;NewPrivateWindow;NewSafeMode;ProfileManager;

[Desktop Action NewWindow]
Name=Open a New Window
Name[de]=Ein neues Fenster öffnen
Name[es]=Abrir una ventana nueva
Name[fr]=Ouvrir une nouvelle fenêtre
Name[it]=Apri una nuova finestra
Name[nl]=Nieuw venster openen
Exec=firefox -new-window
OnlyShowIn=Unity;

[Desktop Action NewPrivateWindow]
Name=Open a New Private Window
Name[de]=Ein neues privates Fenster öffnen
Name[es]=Abrir una ventana privada nueva
Name[fr]=Ouvrir une nouvelle fenêtre de navigation privée
Name[it]=Apri una nuova finestra anonima
Exec=firefox --private-window
OnlyShowIn=Unity;

[Desktop Action NewSafeMode]
Name=Open in Safe Mode
Exec=firefox --safe-mode
OnlyShowIn=Unity;

[Desktop Action ProfileManager]
Name=Open Profile Manager
Exec=firefox --ProfileManager
OnlyShowIn=Unity;

My own 'libreoffice-startcenter.desktop' file:

LibreOffice

[Desktop Entry]
Version=1.0
Terminal=false
Icon=libreoffice-main
Type=Application
Categories=Office;
Exec=libreoffice %U
# MimeType=application/vnd.openofficeorg.extension;
MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;application/x-dbf;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math;

Name=LibreOffice 
Name[pt_BR]=BrOffice 
GenericName=Office 
GenericName[de]=Büroanwendungen
GenericName[en]=Office
GenericName[es]=Oficina
GenericName[fr]=Bureautique
GenericName[it]=Office
Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
Comment[de]=Die zum offenen und standardisierten ODF-Format kompatible Sammlung von Büroanwendungen. Unterstützt durch »The Document Foundation«.
Comment[en]=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
Comment[es]=Suite de productividad para la oficina compatible con ODF, el formato de documentos abierto y estandarizado. Con el soporte de la Document Foundation.
Comment[fr]=Suite bureautique compatible avec le format de document standard et ouvert ODF. Soutenue par The Document Foundation.
Comment[it]=La suite di produttività compatibile con il formato standard e aperto dei documenti ODF. Supportata dalla The Document Foundation.

X-Ayatana-Desktop-Shortcuts=Writer;Calc;Draw;Impress;Math;

[Writer Shortcut Group]
Name=Writer
Exec=libreoffice --writer %U
TargetEnvironment=Unity

[Calc Shortcut Group]
Name=Calc
Exec=libreoffice -calc %U
TargetEnvironment=Unity

[Draw Shortcut Group]
Name=Draw
Exec=libreoffice -draw %U
TargetEnvironment=Unity

[Impress Shortcut Group]
Name=Impress
Exec=libreoffice -impress %U
TargetEnvironment=Unity

[Math Shortcut Group]
Name=Math
Exec=libreoffice -math %U
TargetEnvironment=Unity

A multi-tool icon 'toolbox.desktop' file:

[Desktop Entry]
Name=Ubuntu Toolbox
Comment=System Settings
Exec=unity-control-center --overview
Icon=redhat-tools
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;System;
OnlyShowIn=Unity;
Keywords=Preferences;Settings;
X-Ubuntu-Gettext-Domain=unity-control-center

X-Ayatana-Desktop-Shortcuts=GnomeTerminal;SoftwareCenter;SoftwareUpdates;

[GnomeTerminal Shortcut Group]
Name=Gnome Terminal
Exec=gnome-terminal
TargetEnvironment=Unity

[SoftwareCenter Shortcut Group]
Name=Ubuntu Software Center
Exec=software-center
TargetEnvironment=Unity

[SoftwareUpdates Shortcut Group]
Name=Update Manager  
Exec=update-manager -c  
TargetEnvironment=Unity

Here are some of my earlier efforts.

Files

Mozilla Thunderbird

9
  • 1
    Once you've copied and made the change, how do you actually get the new icon into the dash sidebar?
    – Cory
    Jun 26, 2014 at 19:55
  • 6
    Just drag from ~/.local/share/applications to dash sidebar. Open 'Nautilus/Files'; View > Show Hidden Files; navigate from '.local' > '.local/share' > ''.local/share/applications'; drag .desktop file ..
    – david6
    Jun 27, 2014 at 8:06
  • 21
    This answer solves it. But I ask myself: Why is this answer needed? I think unity should support this in a way which does not need an explanation. A more easy solution would look like this: right click, choose "Add" ...
    – guettli
    Jan 7, 2015 at 20:45
  • 7
    @guettli It's unbelievable, isn't it! Guess it's part of the "we hate end user customisation" which means you can't move the panel to the bottom of the screen, barely change the launcher behaviour, move the close/minimize etc icons to the right of the windows etc.
    – user12753
    Mar 15, 2015 at 16:37
  • 1
    To clarify: The files in /usr/local/share are the launcher scripts created during application install. (as above) I recommend copying these to .local/share BEFORE attempting any further customisation.
    – david6
    Mar 25, 2016 at 22:05
222

For 11.04 and earlier:

Unity does support custom launchers from .desktop files. To create custom launcher from a .desktop file you need to create a *.desktop file for your program.

gedit ~/.local/share/applications/name.desktop

The .desktop file should look something like this:

[Desktop Entry]
Name=the name you want shown
Comment=
Exec=command to run
Icon=icon name
Terminal=false
Type=Application
StartupNotify=true

In your file manager open your home folder and navigate to: (You may need to press ctrl+h to show hidden files to see the .gconf directory.)

.gconf-> desktop-> unity-> launcher -> favourites

you'll see a bunch of folders starting with "app-". you need to create a folder for your program. Use the same name.desktop you used in /usr/share/applications. Go into 1 of the folders for something that is already on the dock & copy the xml file and paste that into your new folder. Open it with your text editor and change the name of the *.desktop to your name.desktop.

Open gconf-editor (you can open gconf by running the command gconf-editor in the Terminal) & go to:

desktop-> unity-> launcher -> favorites

Double click the list on the right & add your name.desktop.

Log out & back in and you should see your launcher. (thank you kerry_s on the Ubuntu Forums for helping with this answer)

Unity also has a feature called Lenses. By default, you have two in Unity: Applications and Files. In the future, you will be able to install and create a lot more. There is some info about that on the Ubuntu wiki: https://wiki.ubuntu.com/Unity/Lenses

6
  • 22
    There no longer appears (in 11.04) to be the path "desktop-> unity-> launcher -> favorites" in the gconf-editor. May 2, 2011 at 21:42
  • 2
    The answer below from Bazon has a way that works for 11.04 and is way easier.
    – Lode
    Aug 1, 2011 at 9:40
  • 3
    This doesn't seem to work any more on 14.04
    – rubo77
    Jun 20, 2014 at 15:14
  • works fine for creating one on 14.10
    – mchid
    Dec 26, 2014 at 7:52
  • Work for me on Ubuntu 18.04. Thanks
    – pauloh
    Aug 8, 2018 at 21:41
103

For 11.10 and newer:

You can still create the Launcher on the Desktop by using the old GUI dialog.

Using ALT+F2 type:

gnome-desktop-item-edit --create-new ~/Desktop (Capital D)

This will start the dialog( Create launcher):

enter image description here

You can put this .desktop file in any folder, and then drag and drop to the launcher.

Note: The package gnome-desktop-item-edit must be installed first, so if you have gnome-panel installed, then it is installed automatically.

8
  • 3
    Thanks THIS is the solution I was looking for. The option should again be added in Ubuntu since this affects things from Wine apps in the Desktop, to customized scripts and programs that need parameters. Apr 25, 2012 at 20:02
  • 4
    doesnt work for 12.04
    – Ubuntuser
    Sep 9, 2012 at 14:11
  • 10
    I had to sudo apt-get install gnome-panel first.
    – wberry
    May 8, 2013 at 14:59
  • 1
    This should be the accepted answer! May 18, 2015 at 14:25
  • 1
    By far the best answer I've found. Also it's the only one that's easier than installing Xubuntu.
    – 魔大农
    Nov 13, 2015 at 20:26
89

For 11.04 and earlier:

This is a method without editing config files and without root privileges.

First create the Launcher on the Desktop (only temporary)

  • right click your desktop
  • select Create Launcher...
  • create the custom Launcher as you want to.

Making a Launcher

Now you got the launcher on the Desktop. If you are satisfied with it, get it in the Launcher Panel:

  • Open your Home Folder. Press Ctrl + H to show hidden files if necessary.

  • Browse to .local/share/applications

  • Drag and drop your Launcher from Desktop to that folder.

  • Now drag and drop your launcher from .local/share/applications to the Launcher Bar on the left on your Screen.

  • You can now delete your custom Launcher on the Desktop if it's still there.

That's it.

9
  • 4
    It seems like you don't have to put the launcher in .local/share/applications folder before you drag and drop it on the launcher. You can store it in any folder.
    – JannieT
    May 3, 2011 at 20:08
  • 1
    Thanks. That made it easy. Now I have to figure out how to change the icon (emblem?).
    – John K
    May 8, 2011 at 7:13
  • 2
    @ John K: In the "creater launcher" dialogue in the beginning you can set an icon by clicking on the default icon in the top left of that window.
    – tobi
    May 13, 2011 at 20:35
  • 14
    A regression introduced in 11.10 has removed this method of creating launchers.
    – ændrük
    Sep 26, 2011 at 7:19
  • 7
    @aendruk: you can still open the "Create launcher window" with: gnome-desktop-item-edit --create-new <name of the desktop file>
    – Stefano
    Oct 19, 2011 at 13:47
63

I see many complex answers here. This solution is, I think, simple.

  • (First install the package alacarte, if you don't have it. This is the menu editor that was installed by default before 11.10. Obviously you only have to do this once.)
  • Start "Main Menu" by searching for it in the dash.
  • Add an item for your application and close the editor.
  • Start the application by searching for it in the dash.
  • Right-click on the icon and "Keep in launcher"

In Oneiric, you may also need to install the package gnome-panel, which alacarte should, but does not, depend on. See:

https://bugs.launchpad.net/ubuntu/+source/alacarte/+bug/826049

14
  • if your method is used, the application would not fall under any category.
    – dumb906
    Oct 18, 2011 at 0:20
  • @dumb906 What do you mean? You can put the launcher in whatever category in the menu you want. Unless you mean something else by "category"? Oct 18, 2011 at 9:15
  • 15
    This is by far the simplest solution.
    – gregghz
    Oct 25, 2011 at 0:08
  • 5
    How on earth does this answer have less up-votes than the others? This is the FASTEST, SIMPLEST, MOST CORRECT answer!
    – copolii
    Nov 24, 2011 at 19:43
  • 4
    For Ubuntu this is an usability failure (a lot of other things are great, but here it falls short). The option to add a new application manually should be in the dash menu or in dash / more apps. @copolii this answer has less votes because was given many months after the original question. It works, I've also +1
    – stivlo
    Nov 26, 2011 at 17:03
31

For 11.10 and newer:

In Ubuntu 11.10 the easiest way create custom launcher from a .desktop file is either by copying an existing .desktop file or by creating your custom one.

To create a simple custom one you will need to add these entries to a .desktop file of your choice in ~/.local/share/applications/

nano ~/.local/share/applications/your_application_name.desktop

[Desktop Entry]
Name=the name you want shown
Comment=
Exec=command to run
Icon=icon name
Terminal=false
Type=Application
StartupNotify=true

For extra options for your .desktop file you can visit this site. All the options available are very well described there.

You can also copy a existing application's .desktop file from /usr/share/applications/ to your ~/.local/share/applications/ and edit it to fit your needs.

ie: this will copy gedit .desktop file to the folder where the .desktop files should be saved for a user

cd ~/.local/share/applications
sudo cp /usr/share/applications/gedit.desktop .

After that open that location using nautilus ~/.local/share/applications/ and drag n drop the file you have just created to the Unity launcher.

Has an option instead of drag n dropping the file you can open dconf-editor (install it with sudo apt-get install dconf-tools or look for it in the USC) and navigate to desktop.unity.launcher and edit the key favorites by double clicking on the entries to the right of the key.

To add your custom launcher add it at the position you want with this format '/home/bruno/.local/share/applications/gedit.desktop'. Don't forget to respect the , and the spaces in that line and make sure that the line starts and ends with [ and ] respectively.

With this method you will need to log off and back in for the change in favorites to take effect.

4
  • This is the one that worked for me in Ubuntu 12.04
    – LnxSlck
    Apr 29, 2012 at 16:26
  • even easier - once you copy .desktop file to ~/.local/share/applications/ you can right click on it in nautilus and edit the entries in the GUI. You can also set icon by clicking image, and test launcher by double clicking. Just make sure its +x.
    – rynop
    Apr 30, 2012 at 13:40
  • The link to desktop file specification page is very useful. Thanks.
    – Andree
    Dec 6, 2012 at 4:14
  • @LnxSlck Me too! +1 to Bruno for this amazing answer! Upvotes abound! Jun 10, 2015 at 17:27
22

For me in 12.04 I do the following:

  1. in the Desktop create an "Untitled Document". Just right click in the Desktop and select Create New Document.

  2. Edit the file with Gedit and add the following lines:

[Desktop Entry]
Type=Application

Save the file and THEN rename it to whatever you want but at the end of the name add .desktop. For example if I wanted to make a shortcut for a wine program like photoshop I would put as a name photoshop.desktop

Now you should be able to right click the file and the Launcher Properties should appear like this example:

enter image description here

As you can see in the image now you can put whatever you want in the command line, another name, an icon for it, etc..

Don't forget to set Permissions as executable! Otherwise it will not work.

It is like the short version of other answers here.

1
  • Worked with 14.04. If you move the icon to the launcher, however, and then delete the parent icon on the desktop (for cosmetics), the icon on the launcher will disappear too. Jan 10, 2018 at 12:00
9

To add apps to launcher in unity:

  1. Click the dash (ubuntu logo , top left)
  2. Open the app you want to add.
  3. An icon will appear in the launcher, right click the icon, and click Pin to launcher.
  4. To remove an app from the launcher right click the launcher icon and Quit

NOTE : Icons at this point can not be rearranged once loaded, you
must place them in the order you want them to appear when installing the icons in the launcher!

3
  • 3
    This doesn't work for all applications, particularly those that you install from source. I've tried pinning Netbeans 7.0 to the Unity bar in every way possible, before making my own .desktop file. Sep 20, 2011 at 17:57
  • Icons can be rearranged by clicking and holding the icon for few seconds.
    – andho
    Oct 17, 2011 at 10:22
  • What if I want to create a launcher for a Python script? Jun 10, 2015 at 17:14
7

12.04

For those who like having a GUI: In 12.04 you also have the option of using Arronax which is a Nautilus plugin to create your launcher (.desktop files to be more accurate), heres an explanation of how it works.

If you already have the application launcher you can simply right click and click on the "Create starter for this file" option as shown below.

enter image description here

If you have desktop icons enabled you can create your own launcher with specific commands by simply right clicking on your desktop, this will give you the following option to create a blank starter:

enter image description here

Once you have clicked on "Create Starter" you will have the following dialogue box open where you can easily customize your starter with whatever command you'd like:

enter image description here

Once you've saved your launcher to your desktop you will see a file as shown here:

enter image description here

You then simply pick it up and drag it onto your dock in whatever place you like: enter image description here

A couple of nice features:

  • Being able to assign Keywords to the command so it becomes searchable through the unity dash.

  • Relatively quick to create launchers for Windows programs in Wine as explained by this youtube video (haven't tested this out myself though)

Installation

Disclaimer prior to installing: Arronax is still in an Alpha stage of development due to there not being that many programmers working on it, I haven't had a single issue with it but I prefer giving you a heads up in case this affects your choice on installing another PPA you don't know.

To install using the terminal window (Ctrl+Alt+T to open it) type in the following commands:

sudo add-apt-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install arronax

After doing this you will have to restart Nautilus either by logging in and out, or by typing the following in the terminal window:

nautilus -q

11.10

I intended for this to be an edit to Bart van Heukeloms answer as it also works for 11.10, but as a moderator kindly pointed out when I suggested the edit, it is a different answer, despite being one that works too. I tried this a few times on 11.10 before I upgraded and didn't have any issues. However I cannot vouch that it still works perfectly although I expect it should still work.

Installation in 11.10 is exactly the same as in 12.04.

Note: This quick tutorial is shamelessly inspired/plagiarised from Meilins post on the Ubuntuguide website so he is due all the credit.

4

This is a method without editing config files.

First create the Launcher on the Desktop (only temporary)

  • right click your desktop
  • select Create Launcher...
  • create the custom Launcher as you want to.

Now you got the launcher on the Desktop. If you are satisfied with it, get it in the Launcher Panel:

  • Open Nautilus as root. Press Alt + F2 and Enter gksu nautilus.
  • Browse to /home/your-username/Desktop
  • Copy the launcher by clicking right on it and select Copy.
  • Browse to /usr/share/applications
  • Paste your launcher by clicking right on a blank space and select Paste.
  • Now drag and drop your launcher from /usr/share/applications to the Launcher Bar on the left on your Screen.
  • You can now delete your custom Launcher on the Desktop.

That's it.

4
  • 5
    You can just copy it to ~/.local/share/applications so you don't need to mess with the sudo. Mar 15, 2011 at 15:26
  • @Jorge: Yes, that works too. But is browsing to a hidden directory more easy? I'll type this alternative when I got time.
    – Bazon
    Mar 15, 2011 at 19:50
  • by the way: Dragging from Desktop to Launcher directly works also, but only if you don't delete the Launcher on the Desktop.
    – Bazon
    Mar 15, 2011 at 19:51
  • 1
    a further test showed you can move the launcher from Desktop to anywhere , it's only important that you don't delete the launcher (*.desktop file) afterwards, the symbol in the launcher bar seems to be a link to the other launcher in the file system.
    – Bazon
    Mar 16, 2011 at 17:25
4

Easy solution:

  1. right click on your Desktop and choose "Create launcher..."
  2. save the launcher
  3. move it to some folder where it won't bother you. (if you delete this file your launcher will be deleted from the dock as well)
  4. drag the launcher to the dock.
3

Use alacarte to create new launchers. Press Alt F2, type "alacarte", hit Enter. Create new launcher there. Now the program will appear in the search results, and you can drag it to the panel.

2
  • alacarte, as good as always. Simple and effective.
    – albfan
    Feb 8, 2013 at 0:33
  • Doesn't work in Ubuntu 16.04. It reads the menus correctly, but trying to create a new menu item fails silently - the item just isn't saved. Jul 27, 2016 at 1:33
3

For unity launcher of Ubuntu 12.04, the official documentation 'UnityLaunchersAndDesktopFiles' has explained quite well.

The youtube video is more intuitive. Just follow the video tutorial and it helps a lot.

2

Thank you for the info above. But the paths wasn't correct for my ubuntu 11.04 installation. I found the desktop files in: ~/.gnome2/panel2.d/default/launchers/*.desktop.

In nautilus this folder displayed not the filenames but the names displayed in the unity menu. Right-click and use Properties to see info in the link. It is impossible to see the real file name here however. Use command line

ls ~/.gnome2/panel2.d/default/launchers

to see them.

2
  • 2
    my default launchers bar is empty
    – Ubuntuser
    May 16, 2011 at 7:49
  • 1
    That was the correct folder for me too! I guess when you upgrade from 11.04 or other older versions. Maybe they could have moved that folder to the new location instead of just creating a new folder... Thank you for adding this comment. Oct 29, 2012 at 1:45
1

I don't know what is the correct way, but instead of these confusing long answers, I found this simple solution:

  • Run your desktop file from terminal
  • As it opens, a launcher entry is shown for it
  • Now move this entry up or down and the launcher let you to put it there permanently.
0

If you cannot find the .desktop anywhere else:

  1. also look at /var/lib/snapd/desktop/applications/

  2. suppose you are looking for the app Eclipse. Then run

    (find / |grep clipse|grep desktop$) 2>/dev/null

Here I omitted the first letter of the app intentionally, as this command is case sensitive (and indeed after locating it, the file was named eclipse.desktop)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .