Bug 191846

Summary: add option to run one kate instance only and reuse it
Product: [Applications] kate Reporter: Amichai Rothman <amichai2>
Component: sessionsAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: bakatamas, christoph, kde-2011.08, kouzinopoulos, rjlapham, tyrerj, zoom_re
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Amichai Rothman 2009-05-06 21:20:27 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Ubuntu Packages

It would be very useful to have a configuration option which allows only one instance of kate to be running at a time, and all new files which are to be opened with kate (from outside of kate) to be opened in the same instance, rather than opening a new kate window for each new file.

There is already support for opening multiple files in one instance, so there's no point in opening a new instance every time when it can be simply added to the existing one - this makes task switching much easier (no need to jump around between several kate windows to find a specific open file). That's how it is in various other text editors (a few on Windows come to mind), and is very convenient.

Of course this should be made a configurable option.
Comment 1 zOOm_ER 2009-05-17 22:53:52 UTC
with kde 4.2.3 there is still no such option.
really it will be a sesnible appication of multidocument editor.
Comment 2 James Richard Tyrer 2009-05-19 17:28:23 UTC
This bug should be closed as invalid.

This is the same in KDE-4 as it was in KDE-3.  If you want remote opening of Kate then you need to edit the "kate.desktop" file.  Change the line:

Exec=kate %U

to:

Exec=kate -u $U

You can do this using the Menu Editor.

If you think that this should be the default or that it should be easier to select this, then that might be a usability issue.
Comment 3 Amichai Rothman 2009-05-19 18:48:33 UTC
Sorry for not being explicit - as an ex-Windows user, I took it for granted that it should be configurable via GUI, which is what I would expect from any GUI based application. As an old usability guideline says: 'if the user can't easily find it - it doesn't exist.'

Specifically, when referring to a 'configuration option' I meant 'a checkbox somewhere in the general settings dialog to toggle this behavior'. This checkbox in applications that support this feature is often labeled 'allow only one instance to run', or the inverse 'allow multiple instances', or some variation thereof.
Comment 4 Dominik Haumann 2009-05-21 12:05:51 UTC
*** Bug 193471 has been marked as a duplicate of this bug. ***
Comment 5 Dominik Haumann 2009-05-21 12:09:16 UTC
We've requests for this again and again, so I also believe that adding an option [x] reuse already open kate when opening files should be in the options dialog.
Comment 6 Tamas Baka 2009-05-21 12:30:12 UTC
Yes, there should be an option.

I also tried changing the menu entry with the menu editor

From: kate &U
to: kate -u &U

Well, it works, it opens in the already open kate window, but there is also a popup saying: Couldn't start /usr/bin/kate

Did I do something wrong?

(Also I think this behavior should be the default)
Comment 7 Dominik Haumann 2009-05-21 17:07:14 UTC
The error "Couldn't start /usr/bin/kate" is fixed in upcoming KDE4.3.
Comment 8 Dotan Cohen 2009-05-21 17:29:43 UTC
In KDE 3 Kate could be configured as the OP wants: all text files are opened in the existing Kate instance, as new documents. The KDE 4 version does not seem to have this ability. Therefore this is a regression from KDE 3.
Comment 9 Jerry Lapham 2009-05-30 21:56:37 UTC
The easiest fix would be to change the default to what it was with KDE 3.5. To me the advantage of Kate is having multiple files opened in one session.  If you don't want that use KWrite instead.
Comment 10 Haris Kouzinopoulos 2009-10-29 09:23:10 UTC
It is still not fixed in KDE 4.3. Is someone working on this?
Comment 11 Christoph Cullmann 2012-11-03 16:33:24 UTC
That is the default in KDE 4.9.