Registered Member
|
Is there a way in KDE to limit the number of instances of a particular program to just one and if the user launches a new instance with already one instance existing the window of the previous window would come into top instead?
openSUSE 13.2, KDE 4.14.2
Arch Linux, KDE 4.14.7 |
Manager
|
probably depends on the particular program - don't know if there's a KDE global option to enforce this but I don't think there is
examples: - "kate --u" 'u' is an option to reuse the existing Kate instance - "konsole --new-tab" creates a tab in an existing Konsole window instead of creating a new one - VLC has preferences settings to allow only one instance for programs like kate and konsole you can edit Kmenu to always use those options or create aliases in your .bashrc if opening them on a command line |
Registered Member
|
I am interested in the global option, but thanks for the tips and info about other applications. I knew about single instance setting of Krusader only.
Last edited by rsupremo on Sun Dec 07, 2014 10:38 am, edited 2 times in total.
openSUSE 13.2, KDE 4.14.2
Arch Linux, KDE 4.14.7 |
|
No.
If you run an executable, the process is just started by init. => You must have an executable with support to check for running instances/present windows and the ability to raise latter. You'll have a hard time to get that into a binary that doesn't already support it, but you can script yourself sth. like that:
Notice that this is a veeery basic example, because will usually also match a browser that has the trojita webpage open. You'll have to sharpen the wmctrl matching to fit your needs. |
Registered Member
|
Yep. I used similar wmctrl script for this. I was wondering if KDE desktop does not provide this functionality but it seesm that answer is no.
openSUSE 13.2, KDE 4.14.2
Arch Linux, KDE 4.14.7 |
|
It's completely impossible to post-apply such feature from userspace (and the kernel/init process does of course not link X11
Either the client manages its singleton status by itself, or you use a script to do this. Of course there're docker/taskbars which allow to "stick" a button for an application and will either start the assigned application or raise a matching window - but that's tied to the particular launcher. |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar