@rexi: I had to read the entire thread in order to follow along and answer your last question; which I think I now know what you're after.
Copy/paste the following into a file called /opt/test.sh; run this script and it will create the files used in this example.
#!/bin/sh
## If our graphic isn't already downloaded, do so here ##
[ ! -f /usr/local/share/pixmaps/exit.png ] && wget -O /usr/local/share/pixmaps/exit.png https://pngimg.com/uploads/exit/exit_PNG35.png
## Create our "power button" icon on the desktop ##
cat > /usr/local/share/applications/exit.desktop << EOF
[Desktop Entry]
Name=exit
Exec=cliorx sudo sh /opt/yesno
Icon=exit
Terminal=false
X-FullPathIcon=/usr/local/share/pixmaps/exit.png
Type=Application
Categories=Utility;
EOF
## Create our Y/N script with shut-down ##
cat > /opt/yesno << EOF
#!/bin/sh
echo -n "Do you want to turn off your computer? (y/N) "
read yesno
case \$yesno in
[Yy]*) sudo poweroff ;;
esac
EOF
sudo chmod +x /opt/yesno && chown tc.staff /opt/yesno
In the above example, your extension ("yesno.tcz") would consist of:
/usr/local/share/pixmaps/exit.png (our desktop graphic)
/usr/local/share/applications/exit.desktop (our desktop info file)
/opt/yesno (our "program")
/usr/local/tce.installed/yesno (without .sh in the filename) which is launched as the extension is brought online. If you do not need to do anything right when the extension is brought online, you do not need to create it - an empty one will be created by tce-load
Once you have your yesno.tcz and its associated files (.tcz.dep, .tcz.info, etc.) placed in the /etc/sysconfig/tcedir/optional directory, add yesno.tcz to /etc/sysconfig/tcedir/onboot.lst and it will launch every time you boot the computer.
NOTE: If using the ISO, you will do this in the /mnt/sda1/cde directory instead of /mnt/sda1/tce directory