Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #247294 > unrolled thread

Openbox and multiple screens.

Started bypeter@easthope.ca
First post2022-04-16 16:30 +0200
Last post2022-04-22 18:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  Openbox and multiple screens. peter@easthope.ca - 2022-04-16 16:30 +0200
    Re: Openbox and multiple screens. davidson <davidson@freevolt.org> - 2022-04-19 01:10 +0200
      Re: Openbox and multiple screens. davidson@freevolt.org - 2022-04-19 01:20 +0200
      [SOLVED] Re: Openbox and multiple screens. peter@easthope.ca - 2022-04-22 18:20 +0200

#247294 — Openbox and multiple screens.

Frompeter@easthope.ca
Date2022-04-16 16:30 +0200
SubjectOpenbox and multiple screens.
Message-ID<EcRAZ-98Wl-3@gated-at.bofh.it>
Hi,

This system has two screens.  

https://wiki.debian.org/Openbox#Files lists ~/.config/openbox/autostart. 
Autostarting works except that I haven't found a way to configure the 
location or screen where a new window opens.  How is that done?

Thx,                               ... P.








-- 
mobile: +1 778 951 5147
  VoIP: +1 604 670 0140
   48.7693 N 123.3053 W

[toc] | [next] | [standalone]


#247350

Fromdavidson <davidson@freevolt.org>
Date2022-04-19 01:10 +0200
Message-ID<EdIFj-9ES4-1@gated-at.bofh.it>
In reply to#247294
On Sat, 16 Apr 2022 peter@easthope.ca wrote:
> Hi,
>
> This system has two screens.
>
> https://wiki.debian.org/Openbox#Files lists ~/.config/openbox/autostart.
> Autostarting works except that I haven't found a way to configure the
> location or screen where a new window opens.  How is that done?

  $ man 7 X
  [...]
  GEOMETRY SPECIFICATIONS

    One of the advantages of using window systems instead of hardwired
    terminals is that applications don't have to be restricted to a
    particular size or location on the screen.  Although the layout of
    windows on a display is controlled by the window manager that the
    user is running (described below), most X programs accept a command
    line argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where
    WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a
    preferred size and location for this application's main window.

  [...]

This is functionality I have not used in several years, so I'm not
sure how accurate is the proposition "most X programs accept ..."

But it is the first thing I think of, when I read your question.

-- 
Ce qui est important est rarement urgent
et ce qui est urgent est rarement important
-- Dwight David Eisenhower

[toc] | [prev] | [next] | [standalone]


#247351

Fromdavidson@freevolt.org
Date2022-04-19 01:20 +0200
Message-ID<EdIOZ-9EVc-1@gated-at.bofh.it>
In reply to#247350
On Mon, 18 Apr 2022 davidson wrote:
> On Sat, 16 Apr 2022 peter@easthope.ca wrote:
>> Hi,
>> 
>> This system has two screens.
>> 
>> https://wiki.debian.org/Openbox#Files lists ~/.config/openbox/autostart.
>> Autostarting works except that I haven't found a way to configure the
>> location or screen where a new window opens.  How is that done?
>
> $ man 7 X
> [...]
> GEOMETRY SPECIFICATIONS
>
>   One of the advantages of using window systems instead of hardwired
>   terminals is that applications don't have to be restricted to a
>   particular size or location on the screen.  Although the layout of
>   windows on a display is controlled by the window manager that the
>   user is running (described below), most X programs accept a command
>   line argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where
>   WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a
>   preferred size and location for this application's main window.
>
> [...]
>
> This is functionality I have not used in several years, so I'm not
> sure how accurate is the proposition "most X programs accept ..."
>
> But it is the first thing I think of, when I read your question.

And that addresses the problem of specifying the "location [...] where
a new window opens".

As for which screen, see the section titled "DISPLAY NAMES" in the
same manual.

-- 
  The day will come              |  Last words, August Spies (1855--1887).
  When our silence will be       |  Hanged, by the state of Illinois,
  More powerful than             |  alongside fellow journalists
  The voices you strangle today  |  Adolf Fischer and Albert Parsons.

[toc] | [prev] | [next] | [standalone]


#247455 — [SOLVED] Re: Openbox and multiple screens.

Frompeter@easthope.ca
Date2022-04-22 18:20 +0200
Subject[SOLVED] Re: Openbox and multiple screens.
Message-ID<Ef4aK-ataB-5@gated-at.bofh.it>
In reply to#247350
Hello Davidson,  thanks for the reply.

    From: davidson <davidson@freevolt.org>
    Date: Mon, 18 Apr 2022 23:07:28 +0000 (UTC)
>  $ man 7 X
> ...
> ... -geometry WIDTHxHEIGHT+XOFF+YOFF ...

This line in ~/.config/openbox/autostart starts firefox without recognition of geometry.
(sleep 3s && firefox -geometry 800x600+1000+20 ) &

https://linux.die.net/man/1/firefox doesn't mention geometry but 
suggested this.
(sleep 3s && xterm -e firefox -height 480 -width 640 ) &
Good, that works.

Google and a bit of luck led to this page
http://openbox.org/wiki/Help:Configuration#Applications 
and the link to this. 
http://openbox.org/wiki/Help:Applications

This command with a click on the target window is critical to 
identification of a window.
obxprop | grep "^_OB_APP"

This stanza puts the firefox window at the upper left of the right 
screen.
<application class="Firefox-esr">
  <position> <x>1300</x> <y>0</y> </position>
</application>

A window with these properties 
_OB_APP_GROUP_CLASS(UTF8_STRING) = 
_OB_APP_GROUP_NAME(UTF8_STRING) = 
_OB_APP_CLASS(UTF8_STRING) = 
_OB_APP_NAME(UTF8_STRING) = 
_OB_APP_ROLE(UTF8_STRING) = 
stumped me until recognizing that this stanza provides a default 
(matches any window) case.
<application class="*">
  <position> <x>10</x> <y>10</y> </position>
</application>

For now this is the complete applications stanza in 
/home/me/.config/openbox/rc.xml.

<applications>
# Default window location at the upper left of display coordinates.
<application class="*">
  <position> <x>10</x> <y>10</y> </position>
</application>

<application class="Firefox-esr">
  <position> <x>1300</x> <y>0</y> </position>
</application>

</applications>

There might be a way to include window height and width in rc.xml but 
I'm content to leave them in /home/me/.config/openbox/autostart for 
now.

    From: davidson <davidson@freevolt.org>
    Date: Mon, 18 Apr 2022 23:07:28 +0000 (UTC)
> As for which screen, see the section titled "DISPLAY NAMES" in the
> same manual.

Here display :0 spans the two screens.  One display coordinate system 
can be used directly as above.

Thanks again,                     ... P.

-- 
mobile: +1 778 951 5147
  VoIP: +1 604 670 0140
   48.7693 N 123.3053 W

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web