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

Applications starting up on the wrong screen.

Tags: None
(comma "," separated)
bassamanator
Registered Member
Posts
8
Karma
0
I have a dual screen setup and applications keep starting on the the wrong screen. I wouldn't complain but my other screen is a TV that's behind me. It's maddening to have to turn around and move applications back to my main screen.

Can this be fixed?

Thanks.

PS My main display is set as primary in case you were wondering.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
System Settings -> Workspace -> Window Management -> Window Rules allows you to specify the location an application opens in. You can also access these settings in the application Window: Right Click on the Title bar -> More actions -> Application Specific Settings


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
bassamanator
Registered Member
Posts
8
Karma
0
So do I need to create rules for all my applications or is there some way to have all apps start on screen1/primary?

Thanks for the reply.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
That should be the default behavior, unless you move applications to a different screen and log out with session-saving activated


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
bassamanator
Registered Member
Posts
8
Karma
0
Mamarok wrote:That should be the default behavior, unless you move applications to a different screen and log out with session-saving activated


Well the default behaviour is not working on my setup unfortunately: many applications start on the non-primary monitor.

I have the monitors: 1 | 2 | 3
#3 is set as my primary yet often applications and dialogue windows appear on monitor #1.

plasma 5.19.3
frameworks 5.72.0
qt 5.15.0
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
And you do save the session when you log out? System Settings -> Workspace -> Startup and Shutdown -> Desktop Session -> Restore previous session on login
If this is indeed the case then this is a regression and should be reported on https://bugs.kde.org
I can't reproduce this with a 2 monitor setup and Plasma 5.18.5


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
bassamanator
Registered Member
Posts
8
Karma
0
Mamarok wrote:And you do save the session when you log out? System Settings -> Workspace -> Startup and Shutdown -> Desktop Session -> Restore previous session on login
If this is indeed the case then this is a regression and should be reported on https://bugs.kde.org
I can't reproduce this with a 2 monitor setup and Plasma 5.18.5


I have Restore previous session on login enabled. I do prefer to keep this option enabled but I guess I'll disable it as a test to see if it fixes this issue. Will report back but it could be a while before my next reboot.

I appreciate your help.
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Hi!

you may try using the „focus follows mouse“-priority in workspace-settings. For me it opens the application on the screen containing the current focus (mouse pointer).

You could also try to set up a window rule for all windows, leaving the first wizard page as it is and only set up the screen on the second page. Never tried, but perhaps it matches all windows.
bassamanator
Registered Member
Posts
8
Karma
0
koffeinfriedhof wrote:Hi!

you may try using the „focus follows mouse“-priority in workspace-settings. For me it opens the application on the screen containing the current focus (mouse pointer).

You could also try to set up a window rule for all windows, leaving the first wizard page as it is and only set up the screen on the second page. Never tried, but perhaps it matches all windows.


So I changed Window activation policy to Focus follows mouse but that didn't fix my issue (apps still opening on screen 1 but focus is infact following mouse).

I also created a Window Rule where Window class (application) is set to unimportant, Window types is All selected, and Screen is set to Apply Initially and have put in a 1 in the textbox provided but that produces unpredictable behaviour. My primary screen is 1 (I've ascertained this by looking under Move to screen setting found by right clicking on any title bar).
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
I've tried it myself, using these settings:
Code: Select all
[Init all uncatched windows]
Description=Init all uncatched windows
screen=1
screenrule=3
types=1
wmclass=
wmclasscomplete=false
wmclassmatch=0
only using Window class as I do not want to open all dialogs and stuff on my left monitor.
This seems to work but for GTK-Applications.
bassamanator
Registered Member
Posts
8
Karma
0
koffeinfriedhof wrote:I've tried it myself, using these settings:
Code: Select all
[Init all uncatched windows]
Description=Init all uncatched windows
screen=1
screenrule=3
types=1
wmclass=
wmclasscomplete=false
wmclassmatch=0
only using Window class as I do not want to open all dialogs and stuff on my left monitor.
This seems to work but for GTK-Applications.


Where should I save these settings?
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Nowhere. That was just my setup to give you something to compare yours with. If you want to copy and try it, save it to any file and use the import function of kwin-settings, which should work.
bassamanator
Registered Member
Posts
8
Karma
0
koffeinfriedhof wrote:Nowhere. That was just my setup to give you something to compare yours with. If you want to copy and try it, save it to any file and use the import function of kwin-settings, which should work.


I tried importing but that didn't work :/
koffeinfriedhof
Registered Member
Posts
608
Karma
4
OS
Open Systemsettings → Window Management → Window Rules → New…
- Window matching: Enter description and select the window-types
- Size & Position: Check „Screen“, choose „Apply Initially“
- Hit OK and Apply
Start a new (Qt/KDE) application, e.g. Dolphin. It should start on selected Screen, independent from mouse position.
call0fcode
Registered Member
Posts
3
Karma
0
koffeinfriedhof wrote:Open Systemsettings → Window Management → Window Rules → New…
- Window matching: Enter description and select the window-types
- Size & Position: Check „Screen“, choose „Apply Initially“
- Hit OK and Apply
Start a new (Qt/KDE) application, e.g. Dolphin. It should start on selected Screen, independent from mouse position.

This is totally correct, but additionally you have to uncheck "Allow apps to remember the positions of their own windows, if they support it" under System Settings → Window Management → Window Behavior → Advanced

Image


Bookmarks



Who is online

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