Go to the Going Linux home page
Going Linux

The Podcast
Receive new episodes automatically.
Subscribe for free:
Copy and paste this link into your podcatcher to subscribe to the mp3 feed mp3 feed
Copy and paste this link into your podcatcher to subscribe to the ogg feed ogg  feed

Subscribe via iTunes

Creative Commons License
This work
is licensed under a
Creative Commons Attribution 3.0 License.
Use A Dialog Box to Open An Use A Dialog Box to Open An Application or URLApplication or URL

Going Linux
Practical Information for Using Linux To Get Things Done
 Home Tab  Show Notes Tab  Articles Tab  Screencasts Tab  About Us Tab  
 Create "System" Icons On The Linux Desktop

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.

Top


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.

Top


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

Top
Search our audio files



Search our site

Google



Updated 14-Jun-2008 Valid HTML 4.01 Transitional Valid CSS! An interoperable Web page