Bug 13125 - konsole should allow you to start multiple sessions from the command line
Summary: konsole should allow you to start multiple sessions from the command line
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.0.1
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-10-18 01:33 UTC by Matt Mueller
Modified: 2006-05-04 05:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Mueller 2000-10-18 01:22:48 UTC
(*** This bug was imported into bugs.kde.org ***)

Package: konsole
Version: 1.0.1 (KDE 2.0 Release Candidate 2)
Severity: wishlist
Compiler: gcc version 2.95.2 20000220 (Debian GNU/Linux)
OS: Linux 2.2.17 i686 (Debian Package 4:2.0-20001013-0)

I almost always use the same basic set of konsoles and other apps when I use X 
so I have a little script to create them.. but unfortunatly there is no way to make a
konsole with multiple sessions already started.
Comment 1 John Rodkey 2001-03-09 19:16:26 UTC
This is a significant issue for me as well.  Up to now I've been using
a single command that brings up ssh sessions on 15 servers each in their
own xterm window.  Konsole promises to be a HUGE improvement over this
but clicking on New 15 times then changing the names and colors for each
terminal is very time consuming.

I can see two alternatives.  First have command line recognize multiple
terminals at startup each with its own colors and executable parameters
e.g.
konsole [options which apply to all terminals] \
  -T term1 -bg color1b -fg color1f -e 'command1'\
  -T term2 -bg color2b -fg color2f -e 'command2'\
  -T term3 -bg color3b -fg color3f -e 'command3'\
  ...
  -T termn -bg colornb -fg colornf -e 'commandn'

The second alternative is to modify the 'save session' feature to allow
a snapshot of all of the currently open terminals.

My suspicion is that the command line approach would be easier to
program and ultimately more robust.

I am willing/interested in assisting in working on this feature (since
I need it so badly)... I'll be investigating what I have to do to help
out with development.  

John

        John Rodkey Information Technology Westmont College
rodkey@westmont.edu
Comment 2 muth 2001-07-11 14:23:30 UTC
I second that. I need multiple sessions on startup.

And the command line solution may be best for it. I think nobody wants
to replace screen ;).

klaus
-- 
Klaus Muth
HAGOS eG                      Industriestr. 62      fon: (+49) 711 78805-86
EDV-Programmierung            70565  Stuttgart      fax: (+49) 711 78805-35
http://www.hagos.de               Germany              mailto:muth@hagos.de
Comment 3 Chris Machemer 2001-07-11 17:38:34 UTC
As of yesterday konsole now correctly saves and restores multiple open 
sessions from session management.  So once all of your required sessions are 
opened they can be "remembered" when you exit and re-enter KDE including 
schema's and titles.

Is that sufficient for your needs?

If not I suspect it wouldn't take much additonal coding to extend that to 
what you suggest with a "Save all sessions" option that would effectively do 
the same thing but on demand rather than being invoked via shutdown/start-up.

However it sounds to me to be more of a feature than a bug fix so it won't 
make it into KDE 2.2 unless you could convince me and more importantly 
Waldo Bastian otherwise.

-Chris

On Wednesday 11 July 2001 10:23 am you wrote:
> I second that. I need multiple sessions on startup.
>
> And the command line solution may be best for it. I think nobody wants
> to replace screen ;).
>
> klaus
Comment 4 Brad Garcia 2001-07-13 12:20:30 UTC
Chris Machemer writes:

> As of yesterday konsole now correctly saves and restores multiple open
> sessions from session management.  So once all of your required sessions
> are opened they can be "remembered" when you exit and re-enter KDE
> including schema's and titles.
>
> Is that sufficient for your needs?

There is still one thing that is missing - the ability to
automatically run a program in each of those sessions
(the -e command-line option).

If there is a way to save that information as well then I would finally
be happy with this solution.

Brad Garcia
Comment 5 machey 2001-07-13 15:34:37 UTC
I had to break the session management restore to fix the --ls option 
yesterday.

I'm now working on putting it back so that all previous sessions come back 
from session management running the same programs they were when you shut 
down.

As for what programs you can run there currently isn't a menu item for 
something like "New session with parameters" and then you get a dialog box to 
type "-e 'pine'" for example.  Is that what your after?

If so the closest thing currently is to create your own .desktop files that 
follow the same format as the ones supplied with konsole.  These give you the 
menu items for Midnight Commander Root Console etc.

Brad Garcia <bgarcia@laurelnetworks.com> said:

> 
> Chris Machemer writes:
> 
> > As of yesterday konsole now correctly saves and restores multiple open
> > sessions from session management.  So once all of your required sessions
> > are opened they can be "remembered" when you exit and re-enter KDE
> > including schema's and titles.
> >
> > Is that sufficient for your needs?
> 
> There is still one thing that is missing - the ability to
> automatically run a program in each of those sessions
> (the -e command-line option).
> 
> If there is a way to save that information as well then I would finally
> be happy with this solution.
> 
> Brad Garcia
> 
> 



--
Comment 6 Stephan Binner 2001-11-24 09:37:00 UTC
Bad and good news: It will not be possible in KDE3 from command line (I doubt 
if this will ever be possible) but it will be possible using DCOP interface.

Here is an example script so you can get a clue how to use it:

#!/bin/sh
KONSOLE=`dcopstart konsole`
LOCAL_SESSION=`dcop $KONSOLE konsole newSession`
dcop $KONSOLE $LOCAL_SESSION sendSession "cd /usr/local/bin"
dcop $KONSOLE $LOCAL_SESSION renameSession "/usr/local/bin"
SU_SESSION=`dcop $KONSOLE konsole newSession su`
dcop $KONSOLE konsole newSession mc
dcop $KONSOLE konsole activateSession $SU_SESSION
Comment 7 Stephan Binner 2002-10-25 21:57:31 UTC
This is possible with Konsole of KDE 3.1 by either manually writing profiles or creating      
them as snapshot of the currently running sessions within Konsole. Four defaults profiles    
are shipped, named 2shells to 5shells, e.g. "konsole --profile 5shells" will open 5 shells.  
Comment 8 Tristan Miller 2006-05-04 05:52:20 UTC
Stephan, I tried your example script and it doesn't work; there is no interface named sendSession.  See Bug 126702 for more information.