LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-05-2007, 03:10 PM   #1
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
Question multiple konsole tabs via dcop


Hi. I've just discovered scripting konsole actions via dcop and I like it! I have one frustration though. Any of my scripts which open multiple tabs(sessions) always result in an unwanted first tab.
For example, the script below result in three tabs... one connected to the localhost, and one for each of xyz and 123.

Code:
#!/bin/sh
konsole=$(dcopstart konsole-script)

session=$(dcop $konsole konsole newSession)
dcop $konsole $session renameSession xyz
dcop $konsole $session sendSession "ssh user@xyz"

session=$(dcop $konsole konsole newSession)
dcop $konsole $session renameSession 123
dcop $konsole $session sendSession "ssh user@123"
What is the code to make use of that first localhost tab or eliminate it?
Also is there any good sources of dcop (especially konsole control) script examples? Any tips or tricks are much appreciated!

cheers
 
Old 04-08-2007, 05:38 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Original Poster
Rep: Reputation: 31
I figured it out. It seems I just needed to address the sessions more directly as in the example below.
Code:
#!/bin/sh
konsole=$(dcopstart konsole-script)
dcop $konsole session-1 renameSession xyz
dcop $konsole session-1 sendSession "ssh user@xyz"
cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabs in Konsole Tab Bar too big! fcfelix Suse/Novell 0 07-19-2006 02:47 AM
Firefox - Open with multiple tabs hamstereater Linux - Software 2 09-26-2005 03:22 AM
Conflicting Shortcuts: Tabs and Multiple Desktops danosaur Linux - Newbie 2 08-22-2005 06:39 PM
dcop konsole bendeco13 Linux - General 3 04-12-2005 04:46 AM
Multiple tabs in same window using Qt chmeherkch Programming 1 10-30-2003 02:41 PM


All times are GMT -5. The time now is 03:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration