Lgo.png

 Going Linux

   for computer users who just want to use Linux to get things done


Create "System" Icons On The Linux Desktop

Updated: 14-Jun-2008

We've already discussed adding icons from the K-menu. But icons such as ""My Computer", "Trash" and "Printers" don't appear in that menu.

Most recent switchers to Linux will want to use graphical methods to create icons. Here we describe how to create those icons for the KDE desktop without using the command line. If you are looking for similar instructions for the GNOME desktop, click this link to go to an excellent article by Falko Timme on the HowToForge website that describes how to do it in Ubuntu using the configuration editor.

The three basic steps to add them to your desktop are these:

  1. Create a text file on the desktop.
  2. Edit the text file and enter such information as the program to run, the icon to use, and the title of the icon.
  3. Save the text file.

You repeat those same 3 steps for each icon. The content of the text file is what varies for each icon.

Creating The Icons

Let's start with the My Computer icon. In Windows, the My Computer icon opens the Windows Explorer, showing your hard drive(s) and removable drive(s). File management under KDE is normally accomplished using Konqueror. There are other file managers for KDE, but we will use Konqueror for our example.

  1. Right-click on an empty space on your KDE desktop.
  2. Select Create New, Text File.
  3. In the "Enter text filename" field, type My Computer.desktop and click OK. A new icon labeled "My Computer" appears on your desktop.
  4. Right-click the new generic icon and select Open With.
  5. Choose any text editor--Kate is good choice. (You can simply type "kate" in the Open With field to save some time.)
  6. Click OK and your empty text file will open in Kate.
  7. Type the following into the file and then save it.
    [Desktop Entry]
    Encoding=UTF-8
    Icon=tux
    Name=My Computer
    OnlyShowIn=KDE;
    Type=Link
    URL=media:/

This will create and icon named My Computer, using the Tux penguin icon. The new launcher opens Konqueror showing your hard drive(s) and any mounted removable media.

Here are the file names and the text to copy and paste into your text files for some other "system" icons:

File name: Home.desktop
[Desktop Entry]
Encoding=UTF-8
Icon=folder_home
Name=Home
OnlyShowIn=KDE;
Type=Link
URL=/home

File name: Printers.desktop
[Desktop Entry]
Exec=kjobviewer --all --show %i %m
Icon=kjobviewer
Name=Printers
Terminal=false
Type=Application
X-DCOP-ServiceType=Unique
X-KDE-StartupNotify=true

File name: Trash.desktop
[Desktop Entry]
Type=Link
URL=trash:/
Encoding=UTF-8
Icon=trashcan_full
EmptyIcon=trashcan_empty
Name=Trash
Comment=Contains removed files

Site Created with theMaker for Linux

Theme music for the Going Linux podcast is generously provided by Mark Blasco. https://www.podcastthemes.com
Creative Commons License Going Linux Podcast by Larry Bushey is licensed under a Creative Commons Attribution 4.0 International License.