You are not logged in.

#1 2010-11-11 13:27:09

erik1
Member
Registered: 2010-09-02
Posts: 12

[Solved] [xrandr] Maximizing windows the way I want it

I have an external monitor on my laptop. When I plug it in, I start a script to have Dualview for Openbox via xrandr:

#!/bin/sh
# If an external monitor is connected, place it with xrandr
 
# External output may be "VGA" or "VGA-0" or "DVI-0" or "TMDS-1"
EXTERNAL_OUTPUT="VGA1"
INTERNAL_OUTPUT="LVDS1"
# EXTERNAL_LOCATION may be one of: left, right, above, or below
EXTERNAL_LOCATION="right"
 
case "$EXTERNAL_LOCATION" in
       left|LEFT)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
       right|RIGHT)
               EXTERNAL_LOCATION="--right-of $INTERNAL_OUTPUT"
               ;;
       top|TOP|above|ABOVE)
               EXTERNAL_LOCATION="--above $INTERNAL_OUTPUT"
               ;;
       bottom|BOTTOM|below|BELOW)
               EXTERNAL_LOCATION="--below $INTERNAL_OUTPUT"
               ;;
       *)
               EXTERNAL_LOCATION="--left-of $INTERNAL_OUTPUT"
               ;;
esac
 
xrandr |grep $EXTERNAL_OUTPUT | grep " connected "
if [ $? -eq 0 ]; then
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --mode 1280x1024 $EXTERNAL_LOCATION
    # Alternative command in case of trouble:
    # (sleep 2; xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --auto $EXTERNAL_LOCATION) &
else
    xrandr --output $INTERNAL_OUTPUT --auto --output $EXTERNAL_OUTPUT --off
fi

Problem is, after doing that, tint2 is not on top anymore an I can not reasonably maximize windows anymore. The windows would maximize on LVDS1 in that way that a string on the right side is sparred (actually there should even more sparred for tint2, but anyway) and on VGA1 the window maximizes to a small string on the left side of display. The behaviour differs on which program is the window about.
Also the windows I open as kind-windows on VGA1 (e.g. a window for menu in thunderbird) would start in a small space on the left side of VGA1.
How can I tell openbox (or X?) to set the windows right?

PS: I tried to have two instances of openbox running with

DISPLAY=:0.0 openbox
DISPLAY=:0.1 openbox

it works not yet for me.

Last edited by erik1 (2010-11-13 21:32:32)

Offline

#2 2010-11-11 14:41:39

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Solved] [xrandr] Maximizing windows the way I want it

You shouldn't have two instaces, you're not having different X-screens.

Does openbox play nicely with xinerama information? Haven't used it so I don't know, but such problems tend to be with bad handling of xinerama.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2010-11-11 15:45:47

erik1
Member
Registered: 2010-09-02
Posts: 12

Re: [Solved] [xrandr] Maximizing windows the way I want it

You shouldn't have two instaces, you're not having different X-screens.

I do not have this option set. I just wanted to tell that I tried this way. It does not matter for that problem.

Does openbox play nicely with xinerama information? Haven't used it so I don't know, but such problems tend to be with bad handling of xinerama.

I do not really get your question: what do you mean by "xinerama information"? I argued a little with xinerama and an xorg.conf but works better without so I do not have an xorg.conf anymore and no xinerama-option set.

Offline

#4 2010-11-11 16:29:12

thil77
Member
Registered: 2008-08-29
Posts: 52

Re: [Solved] [xrandr] Maximizing windows the way I want it

witch version of tint2 are you using (tint2 -v) ?
perhaps you can try AUR version (svn-583) and report if the problem is still here.

Offline

#5 2010-11-11 16:35:10

erik1
Member
Registered: 2010-09-02
Posts: 12

Re: [Solved] [xrandr] Maximizing windows the way I want it

tint2 ist version 0.11
But I can live with the problems with tint2.
My problem is maximization and that is without panel too.

Offline

#6 2010-11-11 23:05:55

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Solved] [xrandr] Maximizing windows the way I want it

erik1 wrote:

You shouldn't have two instaces, you're not having different X-screens.

I do not have this option set. I just wanted to tell that I tried this way. It does not matter for that problem.

Does openbox play nicely with xinerama information? Haven't used it so I don't know, but such problems tend to be with bad handling of xinerama.

I do not really get your question: what do you mean by "xinerama information"? I argued a little with xinerama and an xorg.conf but works better without so I do not have an xorg.conf anymore and no xinerama-option set.

I'm not talking about actually using Xinerama (its deprecated), but using the xinerama-like information which xrandr passes to the WM. Not sure if openbox supports that.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2010-11-12 12:36:49

erik1
Member
Registered: 2010-09-02
Posts: 12

Re: [Solved] [xrandr] Maximizing windows the way I want it

I am not sure either. Openbox seems to support Xinerama but I do not really get how. Can you tell me how I can use xinerama-like information? How does that work in other window managers.

Update:
I found some Info:

[@ ~]$ xdpyinfo -ext XINERAMA | grep head
  head #0: 1280x1024 @ 1366,0
  head #1: 1366x768 @ 0,0

I do not really know what that should tell me, but I think that the values behind the "@" could be problematic.

Found it here: http://forums.freebsd.org/archive/index.php/t-8226.html
There the solution was to build openbox with libxinerama installed. Libxinerama is installed here.

Last edited by erik1 (2010-11-12 15:33:17)

Offline

#8 2010-11-13 14:56:47

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: [Solved] [xrandr] Maximizing windows the way I want it

If it has xinerama support compiled in then it SHOULD work. Try another WM temporarily and see whether it does?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2010-11-13 15:17:45

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

Re: [Solved] [xrandr] Maximizing windows the way I want it

First and foremost, have you set the appropriate options in Tint2?

http://code.google.com/p/tint2/wiki/Configure#Panel

Secondly, where are you positioning tint2? If you're putting it between the boundaries of the monitors, you might have the problem you're describing. Envision your dual monitors as one big rectangle--put your panel on one of the edges of that rectangle.


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

#10 2010-11-13 21:30:29

erik1
Member
Registered: 2010-09-02
Posts: 12

Re: [Solved] [xrandr] Maximizing windows the way I want it

Offcourse it should work and it does. It was tint2 what did the problem. I startet the script for two monitors without tint2 running and everything was allright. Now I have to think about how to cinfigure the panel.

Solved.

Offline

Board footer

Powered by FluxBB