Message: previous - next
Month: November 2011

Re: [trinity-devel] Configuring Kate (text editor)

From: Keith Daniels <keithwdaniels@...>
Date: Tue, 22 Nov 2011 18:47:37 -0500
On Tue, Nov 22, 2011 at 5:18 PM, Darrell Anderson
<humanreadable@...> wrote:
> This is more of a user question than developer but I'll post here because I use Kate all day to review build scripts, patches, source files, etc.
> In my KDE 3.5.10 version of Kate I have been long able to use a kludge to keep Kate in MDI (multiple document interface) mode. That is, regardless of what I do, all documents I want to open in Kate all open in the same window. I never have more than one window of Kate open. I use the Documents list window and the tabbar plugin to identify my files.
> Now that I am using Trinity too, I no longer can apply my kludge. Kate 3.5.13 is very much an SDI (single document interface) app and that frustrates me. I don't like multiple windows being open. Forced grouping does not really help.
> I am struggling with multiple Kate windows. I get confused when I double-click on a file in Konqueror and the file opens in Yet Another Window of Kate rather than the one I have open. Seems the only way I can control this is to open all files from within Kate and that is inconvenient too.
> How do I go about forcing all documents that I open in Kate to appear in the same window?
> Second, is there a better Quick Launch button that just opens Kate? I dislike the popup menu where I have to select how I want Kate to open. To me the idea of Quick Launch buttons is one click.
> Thanks.
> Darrell
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: trinity-devel-unsubscribe@...
> For additional commands, e-mail: trinity-devel-help@...
> Read list messsages on the Web archive:
> Please remember not to top-post:

Hi Darrell

Just to make sure I understand what you want... It sounds like you
want to make Kate use a single session at all times...  In other words
when you open a Kate file with Konqueror or from the console it just
adds that file to the existing, running instance of Kate:

If that is correct this should do what you want, at least it works for
me.  As far as I know, this works on KDE4 and KDE3 and probably all
other programs that can use the %U command line argument

If starting Kate from the KDE menu use the Menu Editor to edit the
Kate's "Command" text box.  Insert '--use' between 'kate' and the
'%U'. It should end up looking like this:   Command: kate --use %U

You also need to edit this file:
/home/$USER/.local/share/applications/kde4-kate.desktop and change
the "Exec: " line to: Exec: kate --use %U

At this point you probably need to close all instances of Kate and
then do the test below.  Sometimes I have had to restart Xwindows to
get Kate to pay attention to changes, so if it doesn't work, restart
the computer before you give up.

Test the new configuration in Konqueror. If Konqueror gives you
problems about not being able to open /usr/bin/kate, this is to a
known bug in the KDE-Libs with DBUS. There is a workaround for this.

Edit the file: /home/$USER/.local/share/applications/kde4-kate.desktop
and find the line "X-DBUS-StartupType=Multi" and change the "Multi" to

I use a Kate icon in the toolbar panel.  To get it to work correctly I
had use the choice "configure Kate button" that you get when you right
click over the icon.  Then go to >> "Application" tab >> "Advanced
Options" and change "DCOP registration" to None.  My icon setup for
calling Kate is not typical so you may not need to do this.