docs.kde.org
Customizing KDE
Prev
Next

Chapter 26. Customizing KDE

Table of Contents

Desktop Icons
Websites
Applications
The Exec option in .desktop files
Devices
Where to Define
KDE Menu
How it Works
Stored Where?
Common Pitfalls
Essential Menus
Old-Style Menus
KSycoca
KMenuEdit
KDE Panel
File Associations

Desktop Icons

KDE uses several types of icons:

  • Documents

  • Links to Websites (using .desktop file)

  • Links to Applications (using .desktop file)

  • Devices - Disks, Partitions & Peripherals:

    • Explicit using .desktop file

    • Automatic via devices:// io-slave

  • Vendor-specific (e.g. SuSE®'s My Computer)

Websites

Links to Websites using .desktop file: Create New->File->Link to Location (URL). Change Icon using Properties dialogs. The resulting .desktop file:

[Desktop Entry]
Encoding=UTF-8
Icon=/opt/kde3/share/apps/kdesktop/pics/ksslogo.png
Type=Link
URL=http://www.kde.org/

Applications

Links to Applications using .desktop file: Create New->File->Link to Application. You must provide details yourself. Drag from KDE Menu: Either copy or link (creates symlink), much easier

[Desktop Entry]1
Encoding=UTF-8
GenericName=IRC Client2
GenericName[af]=Irc Kliėt
GenericName[de]=IRC Programm
...
GenericName[zu]=Umthengi we IRC3
SwallowExec=4
Name=KSirc
Name[af]=Ksirc
Name[de]=KSirc
...
1

Boiler plate

2

Translated generic description, not used on desktop

3

Legacy, can be removed

4

Translated name as it appears on desktop

Desktop Icons

...
Name[zu]=Ksirc
MimeType=1
Exec=ksirc %i %m2
Icon=ksirc3
TerminalOptions=4
Path=5
Type=Application6
Terminal=07
X-KDE-StartupNotify=true8
X-DCOP-ServiceType=Multi9
Categories=Qt;KDE;Network10
1

Supported MIME types, not used on desktop

2

The command line to execute

3

The icon, from icon theme or full path

4

Only used if terminal is needed

5

Working directory for command

6

More boiler plate

7

Use true if terminal is needed, text application

8

Show bouncy cursor, disable if it doesn't work.

9

Has app started ok? Remove if it doesn't work

10

Categories for KDE Menu, not used on desktop

The Exec option in .desktop files

Following the command, you can have several place holders which will be replaced with the actual values when the actual program is run:

%f

A single file name; used when dropping file on icon, or with file associations.

%F

A list of files; use for applications that can open several local files at once.

%u

A single URL: if the app can handle e.g. FTP or HTTP URLs itself, otherwise KDE.

%U

A list of URLs; will download the file first and pass a local file to the app (!!)

%d

The folder of the file to open; useful if app needs to have file in current working directory.

%D

A list of folders, not very practical.

%i

The icon; --icon option; KDE app will use icon from Icon= line in taskbar.

%m

The mini-icon; legacy.

%c

The caption; --caption option; KDE app will use name from Name= line in taskbar.

Examples:

Exec line: ksirc %i
Command executed: ksirc --icon ksirc
Exec line: cd %d; kedit $(basename %f)
Command executed: cd /tmp; kedit file.txt

Devices

Links to Devices using .desktop file: o Create New -> Device

Where to Define

Many places to define Desktop Icons:

  • ~/Desktop: copied from /etc/skel/Desktop

  • $KDEDIR/apps/kdesktop/Desktop (merged)

  • $KDEDIR/apps/kdesktop/DesktopLinks (copied)

  • Device Icons (dynamically merged)

  • Distribution Specific SUSE Linux copies certain icons in startkde.theme from /opt/kde3/share/config/SuSE/default/

Prev
Next
Home


docs.kde.org