#!/bin/bash # # $HOME/.kde/Autostart/read_pack_notes.sh: # # KDE AUTOSTART file which performs the following actions at KDE startup: # --read the notes in the USB notes file, if any # --your script ideas here .... # All processes are run in the background in order not to delay KDE starting up. # #----------------------------------------------- # CONFIGURATION #----------------------------------------------- flash="/vol/flash"; # automounter dir notes="${flash}/.conf.d/notes" # notes file [ -d "$flash" ] || exit 0 # flash needs to be mounted #----------------------------------------------- # SUBROUTINES #----------------------------------------------- function log() { if [ -n "$verbose" ]; then case "$1" in hbar) perl -e 'print "-" x80,"\n"'; shift;esac echo "$@" fi } #----------------------------------------------- # HOST-DEPENDENT STUFF #----------------------------------------------- case "$(hostname)" in # check on which host we are localhost*) exit 0;; # bail out if on local host *) if [ -s "$notes" ]; then # read notes if there kedit --caption "PACK NOTES" --geometry 673x556+210+0 $notes & fi ;; esac