Bug 161248 - Please expose detach session DCOP function
Summary: Please expose detach session DCOP function
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-25 02:49 UTC by Michael Liddle
Modified: 2008-06-02 09:55 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 Michael Liddle 2008-04-25 02:49:20 UTC
Version:            (using KDE 3.5.9)
Installed from:    Ubuntu Packages
OS:                Linux

I often like have many Konsole _windows_ open at once (i.e. on multiple desktops). There are two ways to achieve this: 

1. Start multiple processes.
2. Start a single process and detach multiple sessions.

The first of these entails (on my machine) ~13MB resident memory consumption. This can quickly add up to using lots of memory.

The second of these is more practical, but it not scriptable. I'd like to create a script that checks to see if there is a running Konsole process. If there isn't: start one. If there is: create a new session and detach it.

A simple way to allow this would be to expose a "detach" function through DCOP. (Another way would be for Konsole to include the above logic internally, i.e. only ever have a single Konsole process on the system, a la more recent versions of Firefox.)

Thanks,
Mike.
Comment 1 Robert Knight 2008-04-25 11:59:17 UTC
> The first of these entails (on my machine) ~13MB resident memory consumption.

The memory for each process is roughly:

(resident - shared) + (shared / number_of_processes_sharing) 

Konsole itself is very small and most of that shared memory will be for Qt and KDE libraries - so we can effectively ignore it.  That leaves a cost of (resident-shared) for each process.  Using the default Konsole settings this works out at about ~3MB on an i386 system.

> i.e. only ever have a single Konsole process on the system,
> a la more recent versions of Firefox.

In KDE 4 Konsole does do this, except when Konsole is started with a controlling terminal - in which case a new proces is started so that it can inherit the environment of the controlling terminal.  
Comment 2 Robert Knight 2008-06-02 09:55:00 UTC
Fixed in KDE 4, except when started from a terminal, new Konsole instances will re-use an existing process.  When started from a terminal, a new process is started so that the environment of the terminal can be inherited.