This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Forcing kate to open all files in the same instance?

Tags: kate kate kate
(comma "," separated)
lda
Registered Member
Posts
9
Karma
0
When I used KDE 3.5 I could use "Settings > File Associations" to configure KDE to open files in Kate, and tell them to use an existing instance with the "--use"option.

I can do it in KDE 4.1 using the terminal:
Code: Select all
kate --use file.ext


That command will open "file.ext" in kate, and if a kate window is already open it will open it in that. If that file is already open, it will not open it again.


So you would of thought that clicking the checkbox to run the command in terminal would work too. It doesn't work in the "open with" feature, it just opens a new instance, and if I try it with "file associations" it throws an error saying KDE can't open Konsole.


I have tried all sorts to get KDE/Dolphin to do it, and failed. :( Anyone know how? So far I've tried setting the DBUS thing to single instance, but that just caused Kate to get killed when it tries to start. I've tried the following commands in "open with" and in the file associations gui.
Code: Select all
kate --use %U
kate -u %U


I don't get how opening single instances, each with their own session, is the default option - especially considering kate's strong point is it can handle multiple files. If I need to use extra sessions or kate windows to work on separate things, then I will take the time to launch another instance of Kate since I don't need to do it regularly - or ever, yet.

Any ideas? I use Fedora 9, and the following versions of KDE and Kate (in that kdesdk package)
Code: Select all
[luke@localhost css]$ yum list kdebase kdesdk
Loaded plugins: refresh-packagekit
Installed Packages
kdebase.i386                             6:4.1.1-1.fc9          installed
kdesdk.i386                              4.1.1-1.fc9            installed


Thanks.

Last edited by lda on Thu Oct 16, 2008 9:42 am, edited 1 time in total.


lda, proud to be a member of KDE forums since 2008-Oct.
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
Hi,
I just recognised that I have the same problem on Kubuntu. When I edit the settings for opening files in kate after pressing the "apply" button it falls back to the old settings. Seems to be a a bug. I can't even remove a certain associated program from the list.
Interestingly ~/.kde/share/applnk/kde4 contains a file kate.desktop with correct settings.
dcrabs


dcrabs, proud to be a member of KDE forums since 2008-Oct.
lda
Registered Member
Posts
9
Karma
0
I noticed in "file associations" there is Kate, KWrite, kate, kate. I think I made the last two. I tried deleting them and pressing apply, they then immediately come back. So tried deleting them and closing the window, incase it was a bug with the apply button, and it still did it when I was prompted to save my changes.

I've also somehow managed to lose Kate from my "start menu", and if I add "kate %U" it opens and dies. Give me a break!

Terminal for me for awhile then, might look for that "Tilde" thing that is like a game console terminal. http://tilda.sourceforge.net/tildadoc.php

Last edited by lda on Thu Oct 16, 2008 10:53 am, edited 1 time in total.


lda, proud to be a member of KDE forums since 2008-Oct.
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
lda wrote:I noticed in "file associations" there is Kate, KWrite, kate, kate. I think I made the last two. I tried deleting them and pressing apply, they then immediately come back. So tried deleting them and closing the window, incase it was a bug with the apply button, and it still did it when I was prompted to save my changes.

I've also somehow managed to lose Kate from my "start menu", and if I add "kate %U" it opens and dies. Give me a break!

Haha, same here. :) First I thought it was Kubuntu related.

Terminal for me for awhile then, might look for that "Tilde" thing that is like a game console terminal. http://tilda.sourceforge.net/tildadoc.php

Well, I am using the same thing for a while now and you are right is is a nice tool. For KDE it's called Yakuake. No need for extra Gnome stuff.


dcrabs, proud to be a member of KDE forums since 2008-Oct.
lda
Registered Member
Posts
9
Karma
0
Yeah I saw Tilda required Gnome stuff and wasn't actively developed anymore so thanks for recommending Yakuake, will give it a go.[hr]
Woah it is good. This should be included in KDE, how do I vote for it?

Last edited by lda on Thu Oct 16, 2008 12:31 pm, edited 1 time in total.


lda, proud to be a member of KDE forums since 2008-Oct.
User avatar
Mark Ziegler
Registered Member
Posts
25
Karma
0
OS
I found "Is it possible to open all files in the same Kate window?" at http://kate-editor.org/faq
Don't know if this is still valid for kde 4.1
Kust put that question on IRC, but til now there is no response.
If there is an answer then I will post it later.

Cheers

Last edited by Mark Ziegler on Thu Oct 16, 2008 3:41 pm, edited 1 time in total.


Please visit http://userbase.kde.org as well to get an overview about what kde can do for you :-)
lda
Registered Member
Posts
9
Karma
0
Thanks Mark, I have tried that and it didn't work. :( It could be a KDE bug as dcrabs and I experience the same problems when using the File Associations interface. It doesn't seem to apply/save our changes.


lda, proud to be a member of KDE forums since 2008-Oct.
User avatar
Mark Ziegler
Registered Member
Posts
25
Karma
0
OS
For me it works here like described.
I run openSUSE 11.0 and KDE 4.1.2
It worked out of the box. There was no need to modify file associations.

Somebody on #kate confirmed that there is no different way in kde4


Please visit http://userbase.kde.org as well to get an overview about what kde can do for you :-)
lda
Registered Member
Posts
9
Karma
0
It could be possible that this is a bug not present in 4.1.2, but is in 4.1.1, unless anyone can confirm they have it working in Fedora 9?[hr]
Odd. A reboot seems to solve some of the problems. I can now open all files in the same instance. I still get an error when trying to open a file when Kate is open, but the file does open in that instance of Kate.

The error is:
KDEInit could not launch '/usr/bin/kate'

Last edited by lda on Thu Oct 16, 2008 10:43 pm, edited 1 time in total.


lda, proud to be a member of KDE forums since 2008-Oct.
User avatar
dcrabs
Registered Member
Posts
81
Karma
0
OS
Hi
I can confirm that the Kate FAQ still applies, however, I can't save the settings. It always falls back to "kate %U" instad of "kate -u %U". KDE version is 4.1.2 by the way.
Does anybody know where it should be saved?
david


dcrabs, proud to be a member of KDE forums since 2008-Oct.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]