LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-16-2020, 12:43 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Rep: Reputation: 54
How do I force every single GUI element (windows, dialogs, menus etc) to ALWAYS open on the screen it was launched from?


This is one of my absolute worse pet peves with multi monitor setups and it seems no OS maker can get this right. Windows is just as terrible.

Say you are in a program, and you click on something that launches a dialog, every now and then the dialog will end up on another monitor instead of the one I'm actually working off of. Or worse, launching a new application from a desktop icon or start menu, and the window goes in some random place instead of the monitor I'm working on. I've even seen instances where a right click context menu sends the menu on another screen.

How do I fix this permanently and globally? There's too much "it depends" when it comes to this, and I want to get rid of that. I want to make it global. There are window rules you can set in KDE but they seem to only be honoured at random.

Right now it's happening In Firefox where I have a popup ending on on another screen. It's VERY irritating, especially when I don't have access to that screen. I'm working from home and right now that screen is toggled to the work PC. If I change it, it will send all those windows all over the place making a huge mess on my work PC. (a known Windows issue with Displayport) so that is not an option.

So how do I force applications to always open dialogs on the same monitor it was launched from?

If it matters I'm running Kubuntu 20.04.
 
Old 06-16-2020, 01:53 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,644

Rep: Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096Reputation: 8096
you can't fix it on anywhere but your own apps. That is a very interesting question and I think it was never ever explained. There are a lot of different display geometry definitions available (for current desktop, current monitor, virtual display, current window ....) Mostly they are mixed and improperly used.
If you want to force an application to use a given (your preferred) algorithm you need to implement it and modify the source code of it.
by the way I have almost forgotten: some of them have [tricky] config files to make it even more difficult.

Last edited by pan64; 06-16-2020 at 01:54 PM.
 
Old 06-16-2020, 03:21 PM   #3
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
Sounds like a mess then, they really need to fix that. Modifying source code of apps is a logistical nightmare, because it means I either forfeit updates, or have to change it every time there is an update. Not to mention the fact that it has to be done on a per app basis.

Is there a way to create some kind of virtual environment per monitor where when an app is opened from it, it simply does not even see the other monitors and think there is just one? Closest I can think of is running a full screen VM in each monitor and then doing everything within the VM, but that feels really dirty, hopefully there is a better way. I've tried to set each screen on a separate X11 session before thinking it would do it, but I still had apps open on wrong one.
 
Old 06-17-2020, 01:07 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
It's not really a mess.

Window managers and desktop environments have settings that define where new windows are opened; in some cases extreme fine-tuning is possible (like, open windows with firefox class & dialog role always on desktop 3).
If you use Xorg for your GUI, you could test various windows with
Code:
xprop
and see what sort of attributes they have, then see what sort of rules your WM/DE allows for that.

One thing that's difficult in your request: there's often a substantial delay between the time an application is launched and the time it maps its first window. Only the second event is recognised by your WM/DE.
 
Old 06-17-2020, 08:19 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 20,015
Blog Entries: 28

Rep: Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383Reputation: 6383
Since you are using Kubuntu, I'm guessing you are using the Plasma desktop.

This article explains how to get an application to remember its window position in the Plasma desktop, but I have no idea and no way of testing whether it remember which monitor in a multi-monitor setup: https://websetnet.net/plasma-secrets...ndow-position/
 
Old 06-17-2020, 08:38 PM   #6
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,350

Original Poster
Rep: Reputation: 54
Yeah I have tried the rules, problem is, it seems some applications override it. I'm looking for a way that is more guaranteed. Virtualbox is another offender, no matter what I do it always opens on the top monitor when I want it to open on the primary bottom monitor. In fact now it's opening in a void that does not even exist so I can't access it.

Last edited by Red Squirrel; 06-17-2020 at 08:41 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
From *inside* save dialogs: Ability to move files around, delete, move directories, etc.? Caja integration doesn't do it. tgm1024 Linux - Software 4 11-12-2019 01:36 PM
LXer: How To Get Dark GNOME Shell Menus And Dialogs On Ubuntu 19.10 With Yaru Theme LXer Syndicated Linux News 0 10-22-2019 02:51 AM
Command line copying and moving with GUI dialogs in case of identical file names? the dsc Linux - Desktop 3 03-27-2016 07:24 PM
LXer: Create GUI dialogs for GNOME and KDE LXer Syndicated Linux News 0 07-26-2006 01:54 PM
Command ls --color=always, can always be always Kevin Tough Linux - Newbie 1 09-08-2005 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration