10

Is there a way to customize a Lucid Lynx Launcher icon for various programs? There does not seem to be a way to do this using Create Launcher or Launcher properties. The application is not actually "installed" on the PC, the executable has just been copied. All I've been able to do so far is to add the command /home/t32/bin/pc_linux/t32marm -c /home/t32/config_usb.t32 to a generic Launcher icon using Create Launcher.

jacknad
  • 305

2 Answers2

20

Launcher icons are stored in /usr/share/applications. Go to your terminal and type: sudo nautilus /usr/share/applications, then right click the application you want, select Properties and click the icon on the properties window. Now you can set it to any icon you want.

*edits
*here is an example .desktop file.

[Desktop Entry]   
Name=Give me a name!    
Comment=Explain me here!    
Icon=/home/t32/t32.png   
Exec=/home/t32/bin/pc_linux/t32marm -c /home/t32/config_usb.t32   
Terminal=false   
Type=Application   
Categories=This is important, select a category that is present  
StartupNotify=true   

*use one of the following as category: Accessibility, Customization, Education, Games, Internet, Office, System, Accessories, Developer, Graphics, Media, Other. Exec is the command to run, Icon is an absolute path to where the icon lives. Usually you wouldn't need to alter anything else. You may keep this as a scratch and reuse.

*copy this to a whatever-you-name.desktop file, edit as needed and put the file in the /usr/share/applications directory. If paths are true, it will pop up in the gnome menu. I don't know if lucid had Unity or gnome3, but if it has, when you search it by the name you gave it, it will be visible in the unity lens, gnome activities thing. If you have gnome2, it would be grouped under the corresponding category in the applications menu.

*And this kind of launcher are so cute that they are valid in GNOME, KDE and (probably) all others.

Seth
  • 58,122
  • The application is not actually "installed" on the PC, the executable has just been copied. All I've been able to do so far is to add the command /home/t32/bin/pc_linux/t32marm -c /home/t32/config_usb.t32 using Create Launcher. – jacknad Sep 18 '12 at 13:45
  • if the launcher icon is on the launcher, it should be created via drag and drop or a something.desktop file should be living in one of /usr/share/applications or ~/<.gnome or .gnome2>/apps directory. A .desktop file is a plain text file. I you want, I will post an example .desktop file, and if you tell the icon path, i can post the text for you to copy and paste and create a custom one. –  Sep 18 '12 at 21:45
  • That would be terrific. I can put the icon anywhere, eg: /home/t32/t32.png. – jacknad Sep 19 '12 at 01:40
  • I've edited this post to contain the answer, the .desktop file contents. –  Sep 19 '12 at 05:23
  • @jacknad You're welcome :) –  Sep 19 '12 at 18:41
12

Launcher shortcuts are *.desktop text files. They can be in:

  • $HOME/.local/share/applications
  • /usr/local/share/applications
  • /usr/share/applications

Look in the latter directory for examples.

The .desktop files have a line defining the icon: Icon=icon_file_base_name. You can set a full path to your icon file, or use only the basename without extension, if you put the icon file into the right place.

That place can be under $HOME/.icons/ or $XDG_DATA_DIRS/icons. They should be .svg or .png files. If .png, there should be at least a 48x48 pixels version, though there may be other sizes.

For a simple example, try to put a 48x48 .png file called example.png into /usr/local/share/icons/hicolor/48x48/apps/ and also do

cp /usr/share/icons/hicolor/index.theme /usr/local/share/icons/hicolor/

This way, you don't need the full path in the .desktop file. Just Icon=example. And it is available to all users on the machine.

See the specification for all the details.

mivk
  • 5,312