This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE $dcopstart konsole-script

Tags: konsole konsole konsole
(comma "," separated)
texilee
Registered Member
Posts
3
Karma
0

KDE $dcopstart konsole-script

Thu Feb 10, 2011 10:14 am
Hi all , in Debian 5 Lenny (KDE 3.5 )this command works fine

$ dcopstart konsole-script


in Debian 6 Squeeze that command returns

Error: Could not find service 'konsole-script'.


any ideas? ty
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KDE $dcopstart konsole-script

Thu Feb 10, 2011 10:38 am
Assuming Debian 6 (Squeeze) using KDE 4, this is because DCOP has been depreciated in favour of D-Bus in KDE 4. In addition, Konsole may not offer this feature anymore. What are you trying to do?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
texilee
Registered Member
Posts
3
Karma
0

Re: KDE $dcopstart konsole-script

Thu Feb 10, 2011 11:15 am
hi bcooksley..

based on

http://andreas.scherbaum.la/blog/archiv ... nsole.html

this is my script


SERVER=('root@IPADDR |srv1' 'root@IPADDR |srv2' 'root@srv3 -pPORT |srv3' 'root@IPADDR -pPORT |srv4')

# start a new konsole window and save the handle in $konsole
konsole=$(dcopstart konsole-script)

# maximize the new window
dcop $konsole konsole-mainwindow#1 maximize

# get current session for the first (just created) window
thissession=$(dcop $konsole konsole currentSession)

# rename this window/session
dcop $konsole $thissession renameSession "SRVXXXX init"


# start a new session tab for each server
for s in "${SERVER[@]}" ; do
srv=`echo $s|awk -F\| '{print $1}'`
name=`echo $s|awk -F\| '{print $2}'`

# this output is displayed on the terminal which is running your script
echo "connect to server: $name"

# create another konsole tab and save handle in $newsession
newsession=`dcop $konsole konsole newSession "ssh $srv"`

# wait for shell startup
while [ `dcop $konsole $newsession sessionPID` -eq 0 ];
do sleep 0.1
done

# rename the new session
dcop $konsole $newsession renameSession $name

# and start the ssh session
dcop $konsole $newsession sendSession "exec ssh $srv \"$param\""

done

# close the first session window
dcop $konsole $thissession closeSession > /dev/null



thank you
texilee
Registered Member
Posts
3
Karma
0


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft