Bug 420150

Summary: cannot open two files in one kate session with dolphin
Product: [openSUSE] openSUSE 11.0 Reporter: Bernhard Koenig <b.a.koenig>
Component: KDE4 ApplicationsAssignee: E-mail List <kde-maintainers>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: faure, wstephenson
Version: Final   
Target Milestone: ---   
Hardware: 64bit   
OS: openSUSE 11.0   
URL: https://bugs.kde.org/show_bug.cgi?id=75492
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Bernhard Koenig 2008-08-25 19:04:00 UTC
Say I want that dolphin opens all text files in one kate session. For this I change the file properties and edit the "Kate" command into

kate --use %u

(Note that this works fine if I type the corresponding command into the shell.) But if I do it in dolphin and click two text files in a row, it says

KDEInit could not launch 'usr/bin/kate'.

It would be good to have this as a default (invoking kate twice opens both files in the same session, that's why you have the buffers in the left side of kate, right?) If I remember correctly, this actually was the default in KDE 3.5.
Comment 1 Bernhard Koenig 2008-08-25 19:10:45 UTC
My dolphin is the latest version 1.1 from KDE 4.1.1.
Comment 2 JP Rosevear 2008-09-18 17:11:57 UTC
Changing it to 'kate --use %U' and 'kate --use %u', bother work for me with kde3 in dolphin.  With KDE4 it does give the error message, but it actually does the write thing in the kate session afaict.  I think possibly kde init is getting confused because kate will just start, communicate with the other session, and then exit.
Comment 3 Will Stephenson 2008-09-20 15:55:48 UTC
That's correct, see kdelibs/kinit/klauncher.cpp. kate.desktop has X-DBUS-StartupType=Multi so it does not expect the launched instance to die after handing off to the running kate.  Closing to upstream BR.
Comment 4 Will Stephenson 2008-09-21 11:58:17 UTC
*** Bug 411537 has been marked as a duplicate of this bug. ***
Comment 5 David Faure 2008-12-16 01:15:40 UTC
You didn't mention which was the KDE bugzilla upstream bug for this, but anyway: this is kind of expected behavior if you modify kate.desktop, which says "I will register to DBUS" (X-DBUS-* lines).

The right way of setting this up is to add a new application in the filetypes editor with the command line kate --use %u. When trying this I hit a bug in kopenwithdialog which would save it as %25u, fixed for kde-4.2. The startup notification takes a bit of time to go away, but at least there's no klauncher error message.
Comment 6 David Faure 2008-12-16 01:21:27 UTC
(saw the URL field now, ignore my first line)