Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Chapter�25.�Customizing KDE

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=https://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 Client

2
GenericName[af]=Irc Kli�t
GenericName[de]=IRC Programm
...
GenericName[zu]=Umthengi we IRC

3
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 %m

2
Icon=ksirc

3
TerminalOptions=

4
Path=

5
Type=Application

6
Terminal=0

7
X-KDE-StartupNotify=true

8
X-DCOP-ServiceType=Multi

9
Categories=Qt;KDE;Network

10
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/




 
 
  Published under the terms of the GNU General Public License Design by Interspire