Wednesday, July 07, 2004

Handy KDialog script

This script is quite useful for relatives/friends of yours who are brand new to KDE or even Linux in general.
The plethora of options in the K Menu can be intimidating for new end-users - so this script is a useful acclimatisation tool. Anytime they log into their KDE desktop, a pop up menu selector will appear on which there are a selection of easy questions which then launch their relative programs (e.g. "Browse Web" opens up Konqueror).

Place the script in .kde/Autostart (that's DOT kde) in your home directory
e.g /home/harry/.kde/Autostart and call it kchoices.sh

chmod it to make it executable by typing:
chmod u+x kchoices.sh

Make sure you have ownership - so if your username is harry type:
chown harry kchoices.sh

Log into KDE using the "harry" account and you'll see the pop up selector menu once KDE loads.


#
# Script using kdialog to prompt program selection choices
#

select_prog=`kdialog --menu "What would you like to do today?" a
"Play Solitaire" b "Listen to Music" c "Chat" d "Browse the Web
" e "Check E-Mail" f "Use Office Software" g "Organise Your Finances"`

if [ $? -eq 1 ] ; then
exit 1
fi

case $select_prog in
"a") kpat;;
"b") xmms;;
"c") gaim;;
"d") konqueror http://www.google.com;;
"e") kmail;;
"f") oocalc;;
"g") gnucash;;
esac