You are not logged in.

#1 2011-09-10 21:59:31

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[openbox] External monitor setup

Hi guys,

I'm curious to know how you handle a second monitor. Coming from Gnome I was used to have some more comfort with that.

How it should be
1. I plug in the monitor and nothing happens automatically. Can this be done automatically?

2. Anyway, not a problem, I can use arandr to activate the external monitor. But how can I for example map the second desktop of openbox to that screen? That is, the first desktop should be mapped to my laptop screen, the second to the external monitor.

3. When I plug off the external monitor all previous settings should be restored, showing all my windows on only my laptop screen.

Regards

Offline

#2 2011-09-10 22:41:02

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [openbox] External monitor setup

I think you're asking for a bit much, considering Openbox is a window manager and nothing more. For point 2 at least, I think this will help: https://bbs.archlinux.org/viewtopic.php?id=124331

Offline

#3 2011-09-10 23:56:39

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [openbox] External monitor setup

Gusar is correct about point 2. In fact, this feature is not available in many window managers (certainly not in Gnome either).

As for automatic detection... It's possible, and I think KDE does it, but I'm not sure how. I'd imagine it has something to do with udev, though? A more disgusting approach would be to launch a daemon in the background that polls the output of xrandr every so often and acts appropriately if that changes.

Honestly though, just assign the appropriate `xrandr` command to a keybinding and be done with it. ("arandr" is a GUI front-end to xrandr.)

As for point three, this is completely impossible given your constraint in point one. If two monitors show two different desktops, then unplugging an external monitor will simply remove that monitor's current desktop from view. It shouldn't move your windows to another desktop (which is on your laptop screen).

Of course, if both monitors represent one desktop, then point three is completely valid and point one becomes impossible :-)

Last edited by BurntSushi (2011-09-10 23:58:31)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#4 2011-09-18 20:00:58

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [openbox] External monitor setup

Thanks for your extensive replies.

Now I understand better the constraints of openbox and could solve nearly all my problems.

However there are two small issues which I like to be solved.

1. The list of windows opened through ALT+TAB is only visible on the second screen. However I want it to have on my laptop screen.

2. I'm using adeskbar as a panel bar. Does anyone know how to restrict the size of the bar only to the left/laptop screen?

3. Viewing flash video in fullscreen over the second monitor does not cover the whole screen but only the resolution of my native screen (1280x800 px). How can I run flash files in fullscreen (it's a monitor with ~1600 x... px) over the second screen?

Regards

Last edited by orschiro (2011-09-18 21:21:38)

Offline

#5 2011-09-19 14:32:06

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [openbox] External monitor setup

orschiro wrote:

1. The list of windows opened through ALT+TAB is only visible on the second screen. However I want it to have on my laptop screen.

You should be able to fix this with the "<monitor>" option in the "<placement>" section. If you want the ALT+TAB dialog on the active screen, use "<monitor>Active</monitor>". If you always want it on one particular screen, try a specific number. (If "<monitor>1</monitor>" does not work, try "<monitor>2</monitor>".)

orschiro wrote:

2. I'm using adeskbar as a panel bar. Does anyone know how to restrict the size of the bar only to the left/laptop screen?

I'm not familiar with adeskbar, but it is certainly possible that adeskbar does not support multi-head setups.

orschiro wrote:

3. Viewing flash video in fullscreen over the second monitor does not cover the whole screen but only the resolution of my native screen (1280x800 px). How can I run flash files in fullscreen (it's a monitor with ~1600 x... px) over the second screen?

I found this and this.

Otherwise, I get this problem too. It seems like some people believe it's a problem with the player or flash itself rather than the window manager. (Think about it---the window manager isn't going to choose the resolution at which flash displays video.) I've simply resigned to live with it and watch full screen flash on the monitor that it shows correctly on.

Also, since you're using Openbox with multiple monitors, check out Openbox Multihead.


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#6 2011-09-19 15:41:34

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [openbox] External monitor setup

I use the command xrandr, something like that:

xrandr --output LVDS1 --primary --auto --output VGA1 --auto --left-of LVDS1

Note the --primary option. Customize at your will. I do not know openbox, I use icewm that is another very light windows manager but fully able to work correctly with two monitors (after using xrandr it may be necessary to restart icewm, it is possible without logging off and without closing any open windows).

Offline

#7 2011-09-20 19:44:31

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [openbox] External monitor setup

To 1)

Have a look at my part of rc.xml. Also no change when I replace the 1 with a 2.

  <placement>
    <policy>Smart</policy>
    <!-- 'Smart' or 'UnderMouse' -->
    <center>yes</center>
    <!-- whether to place windows in the center of the free area found or
       the top left corner -->
    <monitor>1</monitor>
    <!-- with Smart placement on a multi-monitor system, try to place new windows
       on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
       the active window is -->
    <primaryMonitor>1</primaryMonitor>
    <!-- The monitor where Openbox should place popup dialogs such as the
       focus cycling popup, or the desktop switch popup.  It can be an index
       from 1, specifying a particular monitor.  Or it can be one of the
       following: 'Mouse' - where the mouse is, or
                  'Active' - where the active window is -->
  </placement>

But still the alt+tab dialog as well as tray messages from skype are displayed on the external monitor. Furthermore all new opened applications are opened on the external screen too. I want to change that to the native display.

Offline

#8 2011-09-20 20:24:12

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [openbox] External monitor setup

Sounds like you need to report some bugs to Openbox. Here's a link.

orschiro wrote:

But still the alt+tab dialog as well as tray messages from skype are displayed on the external monitor. Furthermore all new opened applications are opened on the external screen too. I want to change that to the native display.

This sounds like the bug to me. Openbox doesn't appear to be respecting the "<primaryMonitor>" option in the "<placement>" section.

You may actually have some success with Olive's solution. It will change the order that the monitors are given to Openbox. You should try setting either monitor to "primary". I you may need to restart openbox after you do that though...

openbox --restart

Last edited by BurntSushi (2011-09-20 20:27:27)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#9 2011-09-21 19:18:45

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [openbox] External monitor setup

I was almost able to solve this problem. With the following part in my rc.xml new windows as well as the dialog gets opened on the first native monitor. Skype status messages, however, are still opened in the right bottom of the second screen. I would like to address them individually but I never know when they will popup so that I could read out the information with obxprop. Any ideas?

 <application class="*">
    <position>
      <monitor>1</monitor>
    </position>
    <focus>yes</focus>
  </application>

Offline

#10 2011-09-21 19:53:14

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [openbox] External monitor setup

Can't you just make Skype show some kind of status message? I don't use it much so I'm not sure, but you could probably create another account, add it to your contact list and sign on with it somewhere. That should make a skype status message show up.

However, I suspect that you may hit a wall here. Those status message pop ups could have the "override redirect" flag set, which basically means that Openbox (and any other window manager) completely ignores it.

My guess is that Skype is placing those windows and not Openbox. I would think that it's trying to find where the system tray is..?


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#11 2011-09-21 20:36:58

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [openbox] External monitor setup

Maybe you're right. I will investigate this skype issue a bit deeper. What still remains unsolved:

1. Flash fullscreen on the second monitor. If anyone is able to do that with Openbox, please tell me how. As indicated here it must be generally possible with some window managers. Hopefully also with openbox.

2. I setup my dual screen with arandr. On the second screen, however, some maximised windows are too big for the screen and not completely visible. See the screenshot.

Dualscreen_Issue.png

3. When I deactivate my second screen, again using arandr, not all windows are placed back on the first screen. Especially those windows which were on the second screen before are sometimes not reachable on my native monitor but still remaining somewhere where the second screen used to be.

Offline

#12 2011-09-22 16:16:05

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: [openbox] External monitor setup

For #2, have you tried using the "auto focus" feature on your monitor? (Sometimes there's a button that says "auto" and sometimes you have to hunt through the menus on your monitor.)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#13 2011-09-22 21:01:45

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [openbox] External monitor setup

1. To the flash issue. At the moment flash opens the fullscreen view on my native first screen, even when the flash player is located on the second external screen.

May be this due to my rc.xml rule?

<application class="*">
    <position>
      <monitor>1</monitor>
    </position>
    <focus>yes</focus>
    <maximized>no</maximized>
  </application>

However, I need this rule. So how can I define to open flash fullscreen on the active window?

2. To the maximised window problem. An auto focus does not change the situation.

Regards

Offline

#14 2011-09-23 02:35:25

Anonymo
Member
Registered: 2005-04-07
Posts: 427
Website

Re: [openbox] External monitor setup

Once you figure this out, can you update the wiki with this info?

Offline

#15 2011-09-23 02:37:23

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [openbox] External monitor setup

Certainly I can. Do you experience similar issues? To which problem do you refer?

Offline

#16 2011-09-23 04:22:46

Anonymo
Member
Registered: 2005-04-07
Posts: 427
Website

Re: [openbox] External monitor setup

Mostly the second one, but it helps to put stuff on the wiki for future reference.

Offline

Board footer

Powered by FluxBB