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

how do i open files in the same Kate window on kde4

Tags: None
(comma "," separated)
quakeglen
Registered Member
Posts
4
Karma
0
hi there, here is my problem...

i'm using kde4 and kate to edit php files, but everytime i open a new file from dolphin it opens in a new kate window.

i remember kde 3.5 opens all files in the same window by default.

i found this in the kate faq http://kate-editor.org/faq/general/is_it_possible_to_open_all_files_in_the_same_kate_window , but it refers to kcontrol on kde 3.5. kcontrol don't exist in kde4 unless you have installed kde 3.5 and kcontrol.

someone knows some way to do it on kde4? thanks..
User avatar
JontheEchinda
KDE Developer
Posts
309
Karma
4
OS
I just drag and drop my files into Kate and it opens in the same window.


JontheEchinda, proud to be a member of the Kubuntu team since July 2008.
Image
Image
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
It's in System Settings, Advanced tab -> File Associations (at least in trunk).


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
quakeglen
Registered Member
Posts
4
Karma
0
Hans wrote:It's in System Settings, Advanced tab -> File Associations (at least in trunk).


nice, but still we have a problem... when i tried to edit the command "kate %U" by "kate -u %U" (-u as i undestand it opens new files in the same window) it says:

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

and nothing happens XD...

still trying...

JontheEchinda wrote:I just drag and drop my files into Kate and it opens in the same window.


this seems to be the only way at this moment.
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Which distro do you use?


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
quakeglen
Registered Member
Posts
4
Karma
0
kubuntu 8.10 kde 4
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Hm, seems to be a Kubuntu issue. Maybe you can try to edit the desktop file directly (I think it's /usr/share/applications/kde4/kate.desktop) and replace
Code: Select all
Exec=kate %U

with
Code: Select all
Exec=kate -u %U

You might have to restart the system.

If you still get the KDEInit error, please post the line that starts with "X-DBUS-StartupType=" (in the desktop file) here.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
JontheEchinda
KDE Developer
Posts
309
Karma
4
OS
It would be an upstream bug then. The .desktop shipped with kdesdk 4.1.80 uses:
Code: Select all
Exec=kate %U


JontheEchinda, proud to be a member of the Kubuntu team since July 2008.
Image
Image
quakeglen
Registered Member
Posts
4
Karma
0
it looks like a good idea... i'll check it...

it's strange, but after "KDEInit could not launch '/usr/bin/kate'" message, it really works... it opens the new file in the same window...

still working... i'll tell you if i have good news
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
JontheEchinda: I did a little search and found bugs such as this one: bug #184337.
For example, see Olivier's comment.

Since I don't have this problem, I assumed that it was specific to Kubuntu. Sorry for jumping to conclusions.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
Bolick
Registered Member
Posts
8
Karma
0
OS
The same situation in OpenSuSE 11.1 with KDE4.2 release.
By default I get new Kate instance for every file opened from Dolphin.
In case I set "Exec=kate -u %U" and "X-DBUS-StartupType=None" - it seems to work properly but mouse cursor stucks in busy state like "kate is loading". And after I close kate I can see kate process in memory.

If I set "Exec=kate -u %U" and "X-DBUS-StartupType=Unique" for every next file opened except the first one I get an error "KDEInit could not launch '/usr/bin/kate'". But in this case kate closing closes all kate processes properly.


OpenSuSE 11.1, KDE4.2 release, nVidia 8400m GS
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
This is probably because Kate is not a KUniqueApplication. You need to use the default X-DBUS-StartupType ( Application or something like that ) with your current "Exec" value.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Bolick
Registered Member
Posts
8
Karma
0
OS
bcooksley wrote:This is probably because Kate is not a KUniqueApplication. You need to use the default X-DBUS-StartupType ( Application or something like that ) with your current "Exec" value.


Yesterday I found a workaround in Novell bugzilla:
https://bugzilla.novell.com/show_bug.cgi?id=411537
https://bugzilla.novell.com/show_bug.cgi?id=420150

So, steps I made:

In KDE System parameters - File associations select filetype (for example) "text: x-c++src" then select application on right "Kate editor" and edit its parameters:

1) Application command: kate -u %u (note here I use small "u", not "U" - it's the key)
2) In additional parameters switch-off startup notify and DBUS registration

Then it's done.

After this step new "kate.desktop" file appears in ~/.local/share/applications/kde4

And it looks like:

Code: Select all
[Desktop Entry]
Comment[ru]=
Comment=
Exec=kate -u %u
GenericName[ru]=Ул�ч�енный тек�товый редактор
GenericName=Ул�ч�енный тек�товый редактор
MimeType=text/plain;
Name[ru]=Редактор Kate
Name=Редактор Kate
Path=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=none
X-KDE-SubstituteUID=false
X-KDE-Username=


But the original one was much more verbose:
Code: Select all
[Desktop Entry]
X-SuSE-translate=true
GenericName=Advanced Text Editor
GenericName[ca]=Editor de text avançat
GenericName[da]=Avanceret teksteditor
GenericName[de]=Erweiterter Texteditor
GenericName[el]=Π�οχω�ημένος επεξε�γα�τής κειμένου
GenericName[es]=Editor de texto avanzado
GenericName[et]=Täiustatud tekstiredaktor
GenericName[fr]=Éditeur de texte avancé
GenericName[ga]=ArdeagarthĂłir TĂ©acs
GenericName[gl]=Editor avanzado de textos
GenericName[hu]=Szövegszerkesztő
GenericName[it]=Editor di testi avanzato
GenericName[ja]=�度��キス�エ�ィタ
GenericName[km]=ក�្�វិធី​និពន្ធ​អត្�បទ​ក�្រិត​�្ពស់
GenericName[ko]=고급 텍스트 편집기
GenericName[lt]=SudÄ—tingesnis teksto redaktorius
GenericName[lv]=Paplašin�tais teksta redaktors
GenericName[nb]=Avansert skriveprogram
GenericName[nds]=Verwiedert Texteditor
GenericName[ne]=उन्नत पाठ सम्पादक
GenericName[nl]=Geavanceerde teksteditor
GenericName[pa]=ਤਕਨੀਕੀ ਟ�ਕਸਟ �ਡੀਟਰ
GenericName[pl]=Zaawansowany edytor tekstu
GenericName[pt]=Editor de Texto Avançado
GenericName[pt_BR]=Editor de Texto Avançado
GenericName[ro]=Redactor de text avansat
GenericName[ru]=Ул�ч�енный тек�товый редактор
GenericName[sr]=Напредни �ређивач тек�та
GenericName[sr@latin]=Napredni uređivač teksta
GenericName[sv]=Avancerad texteditor
GenericName[tr]=GeliĹźmiĹź Metin DĂĽzenleyici
GenericName[uk]=Тек�товий редактор з додатковими можливо�тями
GenericName[x-test]=xxAdvanced Text Editorxx
GenericName[zh_CN]=�级文本编辑器
GenericName[zh_TW]=進階文字編輯器
Name=Kate
Name[ne]=केट
Name[pa]=ਕੇਟ
Name[sr]=Ке�т
Name[x-test]=xxKatexx
MimeType=text/plain;
Exec=kate %U
X-KDE-StartupNotify=true
X-KDE-HasTempFileOption=true
Icon=kate
Path=
X-DocPath=kate/index.html
Type=Application
Terminal=false
X-DBUS-StartupType=Multi
X-DBUS-ServiceName=org.kde.kate
Categories=Qt;KDE;Utility;TextEditor;


OpenSuSE 11.1, KDE4.2 release, nVidia 8400m GS
User avatar
jithin1987
Registered Member
Posts
135
Karma
0
OS
I tried this steps but its not opening on same window. I use kde 4.3


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


Bookmarks



Who is online

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