[openbox] Can the right-hand side monitor be primary and the one on left-hand side secondary?

Anthony Thyssen a.thyssen at griffith.edu.au
Thu Jun 23 20:27:21 EDT 2016


You can add the commands needed to setup the displays as you want, to
either your .xinitrc or an autostart script (depends on how your session is
started).

I even wrote a script that arranges monitors in different ways, so that I
can more easily call it from my start session scripts, or from an openbox
menu.
http://www.ict.griffith.edu.au/anthony/software/#X

I wrote it because I didn't want to have to be looking up the weird monitor
names all the time, just arrange them in different ways.

However remember if you have a display above another, it is top one that
will have window coordinates for 0,0

Hmmm I have not really looked at setting resolutions of the monitors.  My
montiors are all the same size (pixel wise)

When you re-arrange monitors, the windows do not change positions, so if
you have a window at say 100,100, it will appear on what ever monitor has
those coordinates after you re-arrange.  If windows or even the window
manager is are opened/started before monitors are arranged, the display may
not be sized correctly and that can effect window positions or icon
arrangements.

Basically you must automate yoru monitor setup to get it how you want it
BEFORE the other applications are started.
This can take some trial and error.


A lot of the more modern applications don't allow users to set window
positions on start up.  If a window does not specify a position the window
manager will typically set the position. For example Open box may place it
in what it thinks is a large open area (or the largest area is none is
large enough.

This problem is why I don't like using "autostart" scripts.  Instead I
install the package...  "xorg-x11-xinit-session"  which enables you on
login to select a to start session using a ".xinirtc" script (very old
school).  That means I can then start applications using my one script in
the exact order I want.

As I launch applications using a script I can then use other tools to
re-position windows, and iconify them on startup.  For example look at the
"xwin_find" script in the previous link.  Its built in documentation gives
an example of starting, resizing and re-positioning the "firefox" window.
It lets me launch a application, wait for it to appear, then modify it.

I could do this in openbox, but openbox makes its changes every time an
application starts, where I only want to do it when I login.

For examples of openbox modifying an application see



On Fri, Jun 24, 2016 at 5:20 AM, Luciano ES <lucmove at gmail.com> wrote:

> On Thu, 23 Jun 2016 12:57:58 +1000, Anthony Thyssen wrote:
>
> > The problem is actually more lower level than that.  The primary
> > positions are using X server zero coordinates. As such the primary
> > monitor for applications is typically the top left monitor.
> >
> > This is nothing to do with XRandR or Openbox, but a problem with X
> > windows in that displays can't properly use negative coordinates (it
> > means something different when a negative coordinate is given to
> > applications)
> >
> > I myself wanted my primary monitor (laptop screen) below my secondary
> > one (large rmonitor well above the laptop.  I couldn't do it.
> >
> > I have similar problems with multi-media computers where the laptop
> > (multi-media center) is to the right of the large (secondary) screen
> > that is to display the videos being watched.
> >
> > The only solutions I can see is to set up the display in reverse,
> > (primary on left), and then use some weird mouse warping application
> > to warp mouse movements from the 'correct' sides of the display.  Not
> > perfect but should work, but I have no working solution.
>
> **************************
>
> Thanks, Anthony. Very informative.
>
> I decided to put the second monitor on top. I find that a little less
> counterintuitive.
>
> But there are still a bunch of problems.
>
> * For starters, the whole thing will not survive a reboot. It all becomes
> one big mess.
> * The second monitor takes on the duties of the first monitor.
> * The second monitor always has the wrong resolution until I add it
> manually with xrandr.
> * Both monitors have a desktop area, with icons. I had never seen that
> happen!
> * Windows will no longer remember that usual, correct position, even if
> most of them have their position forced by openbox.
> * The top position is all wrong. I open arandr and discover that the two
> screens are superimposed rather than one on top of the other. I have to
> adjust it back manually on randr.
> * The desktop area still looks all messy. In fact, my efforts are useless
> until I turn off the second monitor, turn it on again, then I can rearrange
> everything with some hope of putting everything back in its place.
> * After everything is in place, many new windows still ignore the "force
> position" directives in my lxde-rc.xml file and pop up wherever the heck
> they want.
> * With every new rearrangement, osdsh decides to position itself in some
> new random spot.
>
> :-(
>
> --
> Luciano ES
> >>
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20160624/13f8f0d7/attachment.html>


More information about the openbox mailing list