You are not logged in.
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
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
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
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
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>".)
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.
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
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
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
Sounds like you need to report some bugs to Openbox. Here's a link.
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
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
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
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.
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
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
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
Once you figure this out, can you update the wiki with this info?
Offline
Mostly the second one, but it helps to put stuff on the wiki for future reference.
Offline