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

Open Window on Same Desktop where Application was started

Tags: None
(comma "," separated)
Turing
Registered Member
Posts
19
Karma
0
OS
I often have to start the Eclipse development environment. Even on my new computer this takes a few seconds.
Usually I would like to use these few seconds for something else e.g., reading my emails.

My email client is on Desktop1, I usually start Eclipse on Desktop2.

What happens at the moment:
- I type eclipse in a terminal on Desktop2.
- Nothing happens, I get impatient, I want to read my emails.
- I switch to Desktop1.
- I focus on the email I want to read.
- The Eclipse splash screen pops up on Desktop1, directly above the email I want to read >:(
- I move the mailclient to the front.
- The Eclipse window pops up on Desktop1, directly above the email I want to read >:(
- I move the mailclient to the front.
- when Eclipse is ready I have to move the Eclipse window to Desktop2, and use it.

Possible alternative:
- I type eclipse in a terminal on Desktop2.
- I get myself a coffee.
- When I am back the Eclipse window is started, ready and on Desktop2. :)

Unfortunately, I don't drink coffee.
What I would like to have:
- I type eclipse in a terminal on Desktop2.
- I switch to Desktop1 and read my emails.
- Eclipse may do whatever it likes on Desktop2. >:D
- After a few seconds I switch back to Desktop2 and use the Eclipse window. :)



In fact, there are more annying problems than wasting a few seconds waiting for eclipse. Nonetheless, I ask myself: Can I enforce Eclipse to open its window on the desktop where I have started it?
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Right click on Eclipse window titlebar -> Advanced -> Special Application Settings... -> Size & Position -> check "Desktop", choose "Apply Initially" and "2: <whatever you've named your desktop>".

Now you can start Eclipse from any desktop (with Alt+F2 for example) and it'll appear on desktop 2. You can find more information about the KWin Rules in the UserBase Wiki.


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
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
you can also try the command kstart, though I do not know whether that works for non-KDE application (have never used it):
Code: Select all
kstart --currentdesktop eclipse
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
mgraesslin wrote:you can also try the command kstart, though I do not know whether that works for non-KDE application (have never used it):
Code: Select all
kstart --currentdesktop eclipse


I tried kstart --desktop 2 eclipse before and it did not work, not sure why though.


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
Turing
Registered Member
Posts
19
Karma
0
OS
Thank you.

All three suggestions (kstart, Sepcial Application Settings, KWin Rules) helped me to "jail" Eclipse to Desktop2

Alas I have not solved my problem.
Now, KWin switches to Desktop2 whenever Eclipse shows some new object (first the splash screen, later the main window).

I have not yet found an option to disable this.
(I mainly use the default settings, but "Focus Under Mouse" and not "Click raises active window")
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
What's your focus stealing prevention level? I've it set to "Low", and Eclipse doesn't steal the focus.

Another thing you can do is to disable the splash screen.


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
Turing
Registered Member
Posts
19
Karma
0
OS
Hans wrote:What's your focus stealing prevention level?

I don't know. When Policy is set to Focus Under Mouse the Focus stealing prevention level is grayed out.

I changed the Policy to Focus Follows Mouse which allowed me to set the Focus stealing prevention level to Low.

No everything works as expected (desktop does not switch automatically). :)


Btw. Thanks for the hint with the splash screen. I also disabled the splash screen, since I don't like splash screens very much (at least for applications where I already know how much time it usually takes to start)
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS
Great! Thanks for sharing the solution, and for marking the topic as solved.


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


Bookmarks



Who is online

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