This is easy to do in Gnome.
My making the before mentioned shell script:
- Code: Select all
xterm -geometry 50x3 -bg black -fg green +sb -T "You clicked me" -hold -e echo "I am in directory $(dirname $0)"
Next right click over the icon of the above shell script and choose "properties" from the drop down menu that appears. Hit the "Select custom icon" button under the "Basic" Tab of the dialogue box that appears. finally select a suitable smiling face.
The result leaves you with a smiling face icon which, when clicked, runs the shell script which flashes up the message about which directory the icon is in.
All good so far.
However - can KDE do the same thing? I can get the same script to work when clicked for sure. However what I can't seem to do is make the icon change appearance from the default for "executable file"... not without changing icons for it's global type and I don't want to do that, as the icon is only a one off and I may want to make other icons with different faces.
By all appearances, KDE cannot do truely customisable icons like Gnome can. Unless, the icon is a link (desktop link). These can be customised. However, a scipt is run from such a link gives the original script location, not the location of the desktop shortcut icon which was clicked to run the script. I don't know how to trap that event.
So hey... I did it for Gnome. How do I do the same for KDE?