GNOME recognizes a second monitor once it’s plugged in. Does Openbox not

display-settingsopenboxxorg

I'm running Fedora 20 on a small Openbox setup that I'm fond of. I sometimes want to send things through a second display, e.g. plugging into a projector or a television. Given the pretty spartan nature of an Openbox session, just plugging in the HDMI cable (and turning on the display at the other end) gives me nothing; there's no obvious sign that the machine has found another display.

My problem isn't terribly technical; I can get things to work: the current workaround is to stop my session, dropping myself back to the GDM greeter, whereupon the screen blacks out for an instant and the laptop recognizes the display, allowing me to work across the two screens concurrently. I can then log back into Openbox and continue as cleared. This has obvious drawbacks, like requiring I drop all my work and re-login every time I want to watch something on a bigger screen.

My goal is to be able to "hotplug" a display and have my Openbox session adapt immediately to the two-screen setup, whether by some magical GNOME daemon or other trickery unknown to me. How should I approach this?

Best Answer

xrandr1 may be the solution you are looking for so that you don't need to log out/log in.

From How to use xrandr:

The old days where you had to restart X when plugging a new monitor are gone. With RandR 1.2, you can plug/unplug monitors whenever you want. Running the following line will query all outputs and enable them with their default mode:

$ xrandr --auto

Ideally, the default config works for you. Otherwise, configure xrandr as needed. This is probably a good enough solution for most people to start using the display without logging out.


For details on automatically detecting when the monitor is plugged in, I have added an answer2 to the existing thread A tool for automatically applying RandR configuration when external display is plugged in

Related Question