From kde-devel Sun Aug 25 12:56:10 2002 From: "Friedrich W. H. Kossebau" Date: Sun, 25 Aug 2002 12:56:10 +0000 To: kde-devel Subject: KApplicationServer? X-MARC-Message: https://marc.info/?l=kde-devel&m=103028023422988 Hi! Recently I read something about BeOS and there was talk of an "application server". I still have no right idea what this is exactly, but it made me thinking about KDE apps and starting. Now, can anybody help me out on this (links, short explanations, corrections), please? My view of state of art: -------------------- At least in KDE 2.2 (don't blaim me) I found that there are two types of apps: * KApplication (or whatever the name is) * KUniqueApplication Most kde apps are of the first type, like konqueror or kwrite. Some of them can open others window for other documents/locations, like konqueror. Those seem to run in the same process which leads to the loss of all windows if one produces a crash. The multiple loss can be prevented by starting a totally new process of the app (via kdeinit) for a new window. But due to the dynamic linking problem a new start needs much more time than the creation of a new window for a already running process. The later app type checks after being loaded and started whether another instance is already running and if it is hands over the command arguments and quits itself. Proposal: --------- I wonder why nobody invented something like an application server for kde at least. Each running app would register there so kde controlled app starting would be enabled to: * for kuniqueapplication check if an instance is already running by a simpel lookup in the table of running apps. Should be a lot quicker than to first go the long way of loading and linking the executable only to find out there already exists an instance. * for _stable_ running normal kapplications the request for a new document window would be transported (via DCOP) to an already running instance of the same app. Perhaps this could be limited to the scope of a desktop so that in the case of a crash one doesn't loose all windows of an app. If the kapplication server states a requested app not to be running it then starts it. Motivation: ----------- When managing source code files by the use of konqueror and kwrite (well that happens: better access to directories outside the actual project) I often find a file and want to edit it. As my computer is claimed to be old( K6/230) a fresh start of kwrite (which is caused by the MMB click as I was about to edit the file you remember ;) needs some time. I got used to it but still don't like it. Yes, I could do a drag'n'drop but there is not always a kwrite window visible (due to a lot of konsole and konqueror windows). And I would like to stay with a simple click. Questions: ---------- 1. Now I am curious whether there is already such an infrastructure in KDE 3. 2. Would it be possible to get another independently running instance of an app (e.g. kwrite) by doing a fork() (no experience) in the app, this way circumventing the loading and linking while being save from the crash in another "window" of the app? Looking forward to your comments and hints :) Friedrich >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<