[kde-linux] Saving Sessions in Konsole in KDE 4.X - SUCCESS
Hal Vaughan
hal at thresholddigital.com
Thu Nov 13 22:25:54 UTC 2008
I know this is a hot topic and I've seen, in archives, people who have
said this is a make/break issue for them and why they're not going to
upgrade until it's fixed.
In short, the problem is in KDE 3.5 you can save a Konsole session to
include all the tabs you had open previously. If I recall, it even
saved the same directory. You can't do that at all in 4.x.
Actually you can, sort of. I've got it working with a work-around. I
would use a large number of tabs and have them labelled and colored
according to which machine they were usually logged into so I had some
tabs that were always an open ssh to one computer and some to another.
I can duplicate the tabs now and with some work, one could go farther
than that and make sure they're on the right directory and possibly (I
think) run the right startup script for that tab.
What I did was make use of the --new-tab option. When you run "konsole
--new-tab" it adds a tab to the current instance of Konsole. It's not
perfect. If you run my script 2x, you get double the tabs in Konsole,
not 2 windows, but it works for me.
I basically wrote up a script like this:
konsole
konsole --new-tab --profile=Profile1
konsole --new-tab --profile=Profile2
exit
This script would open a Konsole window with one tab, then open a 2nd
tab, change its settings to those in Profile1, then do the same with
another tab and Profile2. You cand do as many as you like. Then I
exit, which closes the first tab and leaves just 2 tabs, one using
Profile1 and one using Profile2.
To do this, you have to create all the different profiles you want, but
that also lets you specify other info about each tab. I haven't had
time to look through this carefully, but I would think that if done
right, you can specify the directory for each profile and other points
as well.
It's not perfect, but it works for now. I created a script in my own
bin directory and added a menu item for it and that does what I need it
to do. The default command for a profile in Konsole is /bin/bash. If
you add "--rcfile xxxxx" with a new rc file specified, then you could
use custom rc files to set the directory for each tab as well.
I also tried to make the default command in one profile "/bin/bash 'ssh
-X -lhal -t othercomputer bash' and it worked just fine -- it
automatically opened the profile and ran ssh and connected to the other
computer.
I hope this helps some people who, like me, depended on that feature.
Hal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-linux/attachments/20081113/44098639/attachment.html>
More information about the kde-linux
mailing list