LinuxQuestions.org
Review your favorite Linux distribution.
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 08-10-2016, 11:19 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 17.1 KDE on workstation, CentOS 6.x on servers
Posts: 1,140

Rep: Reputation: 47
Any good window managers that are geared towards multi monitors and having apps launch on proper one?


My biggest grippe, being in Windows or Linux, when it comes to multi monitor, is how programs refuse to open on the monitor it was launched from. They all do their own thing, some remember the last place they were, some are random, some do it properly, there's just no consistency. Then there's apps that launch dialogs, and dialogs end up all over the place. Code::blocks is notorious for this, no matter what you do, no matter what rules you set some dialogs will always go to the left most monitor. But it's all app dependent, which is unacceptable.

Is there a window manager that fully manages ALL programs so that they stay constrained to where they were launched from? The simplest way would be to simply check what monitor the cursor is on, and launch there. I know KDE has all sorts of rules for that, but lot of programs ignore them. Need something that FORCES it, no matter what.

I had tried i3, which is a very different type of window manager and would take some getting used to, basically it's tile based, but it also forced dialogs to stay within their own tile, so it sort of accomplished the same thing. Problem with that one was the graphics, when scrolling in Firefox, or doing anything else with graphics that move, it would not update at the same rate throughout the whole screen, you get like a "line" half way through. Though I was getting this too in the default window manager and there was a fix for it, I can't remember what. Something in xorg.conf if I recall.

I gave up multi monitor for single + two raspberry Pis for the side monitor, but this setup is not really working out that great either. Synergy constantly crashes so I have to SSH into the PIs to relaunch it, then half the time the browser on one of the PIs keeps shutting off on it's own... overall it's more hassle than it's worth. I want to relook at options to go with a normal multi monitor setup again, but I really want to find a way so dialogs don't end up all over the place.

Do I have any options for this? I can't be the only one that is annoyed by this window placement problem with multi monitor.
 
Old 08-12-2016, 06:58 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,418
Blog Entries: 15

Rep: Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156
Quote:
I can't be the only one that is annoyed by this window placement problem with multi monitor.
No your probably not the only one annoyed by this.
The problem is I don't know how to fix it. It's my hope that others here will.

I'd think that members that are running multiple monitors might know how to fix this and chime in.

I looked for a little over an hour online and I wasn't able to get a definitive answer on a window manager that has the functionality that your looking for.

I'm thinking that changing the display value might help or tweaking the configuration in the Xorg file might be the answer. I'm guessing here. Maybe tweaking the X session manager somehow will help?

For most programs you must change the DISPLAY environment variable when launching to have the program appear on another screen: (I don't know if that helps)
https://wiki.archlinux.org/index.php/multihead

Xinerama is an X extension which enables multi-headed X applications and window managers to use two or more physical displays as one large virtual display. Maybe this is what your looking for?
https://awesome.naquadah.org/wiki/Us...ltiple_Screens

http://unix.stackexchange.com/questi...ors-and-panels

I found Dual Monitor Tools not sure if that will be a help to you but I given your thread my best go.
https://sourceforge.net/projects/dualmonitortool/

One last idea; maybe write to the maintainer of your distribution for suggestions or write to a developer that designs window managers for Linux and see if they can help.
 
1 members found this post helpful.
Old 08-13-2016, 05:05 AM   #3
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,187

Rep: Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167
With my NVIDIA card I just set things up for "use seperate X sessions" or some such though that way windows can't be moved from the screen they were opened on.
Other graphics cards I'm not sure about.
 
Old 08-13-2016, 06:58 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,703
Blog Entries: 1

Rep: Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797
If you don't need acceleration, you can run xephyr windows on each screen. And different window managers in each or as raw X sessions on top of the current one (control+shift locks you into that xephyr session, or unlocks / toggle). Most *nix apps have a -display option to tell it where to go. There's wmctrl to move it after the fact. And xrandr with a --primary to kind of set a default monitor. The -geometry option is also a *nix standard on many things which has +#+# to tell it the +X+Y offsets. Although many things default to centered on the primary display, and not much to be done about that. Maybe wayland or mir addresses these behaviors, otherwise it is what it is. I just use wmctrl with the -r :SELECT: option to position and size the offending gui things. With -e 0,0,0,1280,720 for an equivalent of -geometry 1280x720+0+0 (-e 0,+x,+y,x,y), bear in mind that the +x and +y includes the window decoration so be sure to do that math if you're not putting it in the top left (0,0).
 
Old 08-13-2016, 07:19 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,418
Blog Entries: 15

Rep: Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156
Quote:
Originally Posted by 273 View Post
With my NVIDIA card I just set things up for "use seperate X sessions" or some such though that way windows can't be moved from the screen they were opened on.
Other graphics cards I'm not sure about.

How do you set up seperate X sessions?
 
Old 08-14-2016, 12:06 AM   #6
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 17.1 KDE on workstation, CentOS 6.x on servers
Posts: 1,140

Original Poster
Rep: Reputation: 47
I remember experimenting with separate X sessions before, but things got really flaky, I think because it's trying to access the same config files at the same time (ex: user setting stuff and what not). Stuff like theme would get all messed up, and there was other limitations like you could not open more than one Firefox window because it would say it's already running. Is there a fix for these problems, because that would be my best bet, if I can just run 3 separate X sessions.
 
Old 08-14-2016, 06:42 AM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,703
Blog Entries: 1

Rep: Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797
Xephyr is like running X inside X. Although by default a windowmanager-less X session. But launch an xterm to it with -display and set the $DISPLAY variable and launch your app from the CLI and it's functional. Although you lose the hardware acceleration of graphics, so don't expect miracles. Xephyr is meant to test apps that need a particular screen size (like a cell phone). But you can use Xephyr and Xdmx to create a terminal session that stretches vertically across multiple Xephyr windows (see my singular blog on here).

http://www.linuxquestions.org/questi...hadow_7-24143/

With an 8x8 bitmap font you can literally have an 80 by 405 line xterm session on a 1920x1080 screen. Except that emacs crashes if you have more than 256 lines. And firefox crashes if you enable bitmap fonts. And... And... And...
 
Old 08-14-2016, 08:24 AM   #8
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,187

Rep: Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167
Sadly the Firefox issue still presents though you can get around it by having different profiles open on each screen. The desktop settings are a little odd but XFCE seems to pretty much work most of the time with some messing about initially.
I'm not actually sure how separate X sessions is done nowadays because I've had it like that for a fair few years but I think it's by setting each screen to a different x screen number in nvidia-settings though it will need to be done as root since it has to write to xorg.conf to work.
 
Old 08-15-2016, 09:07 PM   #9
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 17.1 KDE on workstation, CentOS 6.x on servers
Posts: 1,140

Original Poster
Rep: Reputation: 47
I decided to try separate X sessions again to see how it goes, took a lot of fiddling around to get the screen order right but I managed to make the centre one the primary then the two side ones as two other separate X sessions.

But it STILL opens stuff on the wrong monitor, for example when I right click on one of the other desktops to choose "Run Command", the search box goes on the centre one! WHY? I would have thought that separate X sessions would completely separate everything to the point that this is not possible. However by adding the panels and widgets and getting a separate start menu, launching apps that way seems to work. So this MAY be usable, but the fact that some stuff can still launch on the wrong monitor does not instil a lot of confidence.

i3 tiling window manager seems to be the only thing that works where it will keep stuff within it's own zone, but I don't really want a tiling window manager.

Is there any other way to split up the 3 monitors so stuff launched from one will always stay on that one? The Synergy method with the Raspbery PIs seems to be the only way so far, it's just that it's so unstable. Synergy crashes all the time forcing me to have to restart it or SSH into the PIs to relaunch, the browser on the PI randomly shuts off all the time, etc... so it's a constant battle to keep everything going.

I'm even wondering if I could do something really exotic like have 3 VMs that are set to auto launch and use i3 to tile the VMs across the 3 monitors. But, that just feels so dirty.


Edit: Nevermind, it seems to really want to launch windows wherever the hell it wants. Even using the start menu on the 3rd monitor it ended up launching a console on the 1st. What a mess. I don't get why this is so hard. Launch freaking windows where they were launched from! Why can't they code it this way?

Last edited by Red Squirrel; 08-15-2016 at 09:09 PM.
 
Old 08-15-2016, 09:19 PM   #10
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Wellington, New Zealand
Distribution: Slackware, Fedora, NetBSD
Posts: 1,071

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
On KDE, you can force apps to always launch on one screen or another, with window-specific overrides. There are many, many rules and conditions you can apply, so you can probably approximate what you want.

KDE tends to just do the right thing for me at work, but it's not really something I think about it (the "right" screen for me is ALWAYS the one I'm looking at, so 50%-50% chance).

Launch System Settings > Window Behaviour > Window Rules

https://lut.im/gallery#lLigLGrexM/JaNcuTxKuB2wVy0r.jpg
 
Old 08-15-2016, 09:54 PM   #11
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 17.1 KDE on workstation, CentOS 6.x on servers
Posts: 1,140

Original Poster
Rep: Reputation: 47
I've used those settings in KDE and even made global rules, but there is still the odd app that won't listen and do it's own thing. Code::blocks for example is notorious for it, it will launch certain dialogs on the left most monitor no matter what, instead of the centre (primary) one. Another annoying one is the audio mixer, you right click on the task bar and the pull up menu ends up all the way on the left monitor instead of the one where the task bar is.

An ideal window manager would be one where you can create zones and it would make the application think that the zone is one monitor, but still allow to move the window to another zone. So almost like a tiling manager but still floating windows.
 
Old 08-15-2016, 10:57 PM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,418
Blog Entries: 15

Rep: Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156
Did you try Xephyr like Shadow_7 suggested?

I few ideas but I could be wrong but trying to help you here.

Maybe finding out which monitor your os sees as the default and change that?
Select and put the monitors in the order in which you want them to perform and be recognized.
-::-You should be able to change the default in the BIOS.-::-

In Windows app's store the results of window placement in the registry.
If you can find where in Linux the window placement is kept/stored that may be the key to fixing the issue.
Adjusting and editing the Xorg file or X11 with an argument might be the answer. OR creating a configuration file to control the monitors?
http://www.yolinux.com/TUTORIALS/Lin...lMonitors.html

Make sure that your main monitor is to the left and not to the right.
-If the two monitors are different resolutions make sure that they both align at the top.
http://askubuntu.com/questions/9921/...-wrong-monitor

Make monitors work separately:-
http://unix.stackexchange.com/questi...cate-linux-min

Does your distribution have a configuration tool to control more than one monitor?

If you have a nvidia card there is nvidia-settings GUI that helps. Like 273 said.
http://superuser.com/questions/24084...rs-for-x-linux

I'm out of ideas:-
 
Old 08-15-2016, 11:00 PM   #13
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,418
Blog Entries: 15

Rep: Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156Reputation: 1156
Maybe consider Devilspie-

It's a non-gui utility that lets you make applications start in specified workplaces.
https://help.ubuntu.com/community/Devilspie

Ok now I'm out of ideas.
 
Old 08-16-2016, 12:58 AM   #14
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,187

Rep: Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167Reputation: 2167
That's odd, I do only have two monitors but XFCE will always open an application on the monitor it is opened from. I can, with some applications, even specify the display in a shortcut or from the terminal (in the form DISPLAY=0.1) should I want to though I don't play with that much.
As mentioned the only real issue I have is Firefox will only allow one instance (oh, and now I recall Chrome and Chromium do also but they just open another window in the same screen as the original rather than an error). If I need to I can get around it but it's so rare I use a browser to actually browse in two windows that it's not a problem.
I keep meaning to try KDE again but last time I tried it it didn't even allow the second monitor to be used for menus never mind allow me to open applications on it.
I seem to recall MATE might have worked (either that or cinnamon) to some degree but looked like I'd need to spend time getting things configured so I stuck with XFCE.

I do share your frustration with multi-monitor though -- it really ought not to be that hard. It's also difficult to change settings and know they won't mess something up when you change back so unless one is prepared to chase down all the relevant files in home and make backups it's tough to experiment with also.
 
Old 08-16-2016, 04:10 AM   #15
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,703
Blog Entries: 1

Rep: Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797Reputation: 797
If they are "unique" X sessions, they should have different $DISPLAY variable values. Otherwise you might need to set that value to match the X session.

$ export DISPLAY=:1
$ nice -n 10 firefox

This variable may not be set, or you are inheriting it from the primary display. If you're launching an X app from a tty console you also need to set the $DISPLAY value manually (or pass -display). Although it's better to set the $DISPLAY so the app inherits it. It could also be that various apps assume the DISPLAY=:0 in all cases, which is not a safe assumption.

$ startx -- :1

For example will start X with a $DISPLAY of :1.

$ echo $DISPLAY
:1

.
 
  


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
What are some good window managers for linux? ylang Linux - General 20 09-14-2012 11:11 AM
Window Managers vs Window Shell Environments DJOtaku Linux - General 7 08-09-2005 12:43 PM
2 monitors, nvidia, problem with window-size (maximize uses both monitors) meximex Linux - Hardware 1 05-19-2004 04:37 AM
Window Managers vs. Desktop Managers mikeshn Linux - General 4 02-11-2004 11:31 AM
Menu troubles: apps do not launch; unable to add apps hfinger Mandriva 1 08-22-2003 04:49 AM

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

All times are GMT -5. The time now is 12:55 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration