It is currently Sat Feb 04, 2012 3:48 am


All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: HOWTO:Use GNS with Yakuake
PostPosted: Mon May 25, 2009 2:58 pm 
Hello, thought this may be helpful.

1. Create an script with the following contents (i'm new to this scripting thing so I dunno if all the sintax is right for sh or whatever, please correct me if needed)

Code:
#/bin/sh

# Create a new yakuake shell
qdbus org.kde.yakuake /yakuake/sessions addSession;
# Find out which terminal is the newest
terminalID=$(qdbus org.kde.yakuake | grep Sessions | cut --fields "3" --delim="/" | sort -n | tail -n 1);
# Set title for the new terminal
qdbus org.kde.yakuake /yakuake/tabs setTabTitle $((terminalID-1)) $1
# Execute telnet
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal $((terminalID-1)) "telnet $2 $3"


Alternatively you may change the last line to:

Code:
qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal $((terminalID-1)) "open $2 $3"


And set a new profile where the command to run is telnet as in the attached screenshot. Remember to set your profile to "Telnet" at the beggining of the session to use this method

You can then use this command in GNS3 to launch your terminals

Code:
/path/to/script %d %h %p


Remember to set the executable flag for your script with chmod +x

Sadly it doesnt work well with the button but yes connecting to each host individually dunno why, maybe GNS3 opens all the terminals at the same time so the script gets run many times at the same instant and becomes confused dunno why, please test it and let me know if you have any ideas.






Attachments:
Screenshot-Edit Profile "Telnet" - Yakuake.png
Screenshot-Edit Profile "Telnet" - Yakuake.png [ 43.92 KiB | Viewed 374 times ]
Top
  
 
 Post subject: Re: HOWTO:Use GNS with Yakuake
PostPosted: Fri Oct 29, 2010 12:34 am 
Offline

Joined: Fri Oct 29, 2010 12:27 am
Posts: 23
You can achieve the same results without a script by adding the following line in "Terminal Command:" under Preferences -> General -> Terminal Settings
Code:
qdbus org.kde.yakuake /yakuake/window org.kde.yakuake.toggleWindowState; qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.addSession; qdbus org.kde.yakuake /yakuake/tabs org.kde.yakuake.setTabTitle "`qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId`" "%d"; qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.runCommand "telnet %h %p" >/dev/null 2>&1 &

It is not working for some reason that I haven't figured out when pressing the button "Telnet to all devices" though...

Cheers


Top
 Profile  
 
 Post subject: Re: HOWTO:Use GNS with Yakuake
PostPosted: Fri Oct 29, 2010 6:26 am 
Same issue I had....not doing networking so much these days so I don't know :D good to know it helped someone :D my first ever useful script, I'm very happy


Top
  
 
 Post subject: Re: HOWTO:Use GNS with Yakuake
PostPosted: Mon Feb 28, 2011 5:34 am 
Hey guys! I managed to solve the bug which was popping up when using the "telnet to all devices" feature by editing the yakuake source to return the session id value of the session created with addSession() function. You can get detailed tutorial on my 'newborn' my blog: http://www.krzalic.com/2011/02/yakuake-gns3.html .

Cheers!


Top
  
 
 Post subject: Re: HOWTO:Use GNS with Yakuake
PostPosted: Mon Feb 28, 2011 6:01 am 
A lil credit of your blog? Link to the thread? :D

Good you have finally fixed this


Top
  
 
 Post subject: Re: HOWTO:Use GNS with Yakuake
PostPosted: Mon Feb 28, 2011 1:13 pm 
Yeah, and I'm also too lazy to type everything again.. :P


Top
  
 
 Post subject: Re: HOWTO:Use GNS with Yakuake
PostPosted: Mon Feb 28, 2011 3:16 pm 
rite....






Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO