wiki:kde/addingApplicationsAndIcons

Version 1 (modified by Jörg Steffens, 15 years ago) ( diff )

copied from general page

adding appications

Example application: example

Where possible, we store our stuff in a separate subdirectory smartclient

/usr/share/applications/example.desktop general application description, like Name, Exec(utable), Icon. SmartClient subdirectory /usr/share/applications/smartclient/ would by possible, but %suse_update_desktop_file does not support directories
/usr/share/pixmap/example.png application icon (using /usr/share/icons/default.kde4/48x48/apps/example.png is also possible, but more complicated. Also problems occur, if the user changes the default icon them)
testing KDE4 icons

to test, if an icon is recognised by the system, act as follow:

# copy the icon example.png or example.svgz to /usr/share/pixmap/
# if available, choose the svgz image format, otherwise png. (xpm does also work)
cp -a example.svgz /usr/share/pixmap/

# create a directory for testing
mkdir /tmp/test

# copy some .desktop files to the testing directory. At least one should have the line "Icon=example"
cp -a example_working.desktop example_testing.desktop /tmp/test

# remove the users icon cache
rm -r ~/.kde4/cache-*/kpc/

# check if the icons gets displayed correctly
strace -e trace=access -o /tmp/test/konq_icon.strace  -f konqueror /tmp/test

# close konqueror

# in case of problems, analyse the strace log file
less /tmp/test/konq_icon.strace
Note: See TracWiki for help on using the wiki.