Hi all,
Patrick Shanahan wrote:
> * Randall R Schulz <[EMAIL PROTECTED]> [12-03-07 20:45]:
>> So now that you've made changes, Patrick's request comes up again (make
>> the script available!).
Sure, I make it available. Find it below. It's short enough, so I
think I can post it to the mailing list.
As mentioned I start it from $HOME/.kde/Autostart to make sure it is
started only when KDE is started. It is just a one-liner named
"konsoleapps.sh" containing
(sleep 5 && $HOME/bin/startkonsoleapps) &
.
> Or I could make the script available....
Patrick, feel free to do so. And change and adjust it as you like ...
Rgds,
Stephan.
----------------------------------------------------------------------------------
#!/bin/sh
###
### startkonsoleapps
###
### Script to start certain apps in KDE konsole sessions.
###
### Requires the "dcop" utility to be installed and the konsoles must
### be started with the "--script option" to enable extended features
### like sendSession. The sessions must already exist.
###
### Executable(s).
DCOP=/opt/kde3/bin/dcop
### Location of startup scripts.
KONSOLEAPPS=$HOME/.konsoleapps
### Here we go ...
### Checking for system executables.
if [ ! -x $DCOP ] ; then
echo "$DCOP doesn't exist or isn't executable."
exit 1
fi
### Looking for all konsoles.
for i in `$DCOP konsole\*` ; do
### Checking if "sendSession" feature available.
if [ `$DCOP $i session-1 functions | grep sendSession | wc -l` -eq 1 ] ; then
### Function sendSession available, continue.
### Looking for all sessions.
for j in `$DCOP $i | grep session-` ; do
### What's the name ?
NAME=`$DCOP $i $j sessionName`
### If the name matches a predefined session name, launch
### the desired application.
if [ -x $KONSOLEAPPS/$NAME ] ; then
$DCOP $i $j sendSession "$KONSOLEAPPS/$NAME"
fi
done
else
### Function sendSession not available.
echo "Konsole $i not started with the \"--script\" option".
fi
done
exit 0
-----------------------------------------------------------------------------------
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]