Registered Member
|
Frequently, I need to log in (ssh) to several servers and issue the same commands (i.e. tail a log file). in kde 3 I used dcop to accomplish this, but with KDE4 -- had a hard time finding a working example. So, here it is!
Basically, this script creates a list of boxes and stores them in an environmental variable (blist). The script takes this list as creates a dialog box, allowing the user to select the hosts to log in to. Next a loop through the selected boxes and: creates a new tab in konsole --- names the tab the name of the box, echos a message saying you're on that box Here's the script -- and enjoy
|
Registered Member
|
thank you very much! this helped me a lot!
kay_de_e, proud to be a member of KDE forums since 2008-Dec.
|
Registered Member
|
|
Registered Member
|
Regarding "names the tab the name of the box", see:
http://www.linuxjournal.com/content/update-controlling-konsole-dbus
|
Registered Member
|
An update. Finally discovered a way to set the titles on the tabs with the name of the box. First, I create an environment variable SHORTNAME (a short name of the box I'm ssh'ing to), then in the script add these 2 lines:
qdbus $KONSOLE_DBUS_SERVICE /Sessions/${session} setTabTitleFormat 0 $SHORTNAME qdbus $KONSOLE_DBUS_SERVICE /Sessions/${session} setTabTitleFormat 1 $SHORTNAME |
Registered Member
|
This script seems to be exactly what I'm looking for, except that:
I've seen similar (?) examples use $KONSOLE_DBUS_SERVICE instead. I'm on KDE 4 (4.14 actually). |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]