[openbox] openbox Digest, Vol 59, Issue 5

plmalternate plmalternate plmalternate at gmail.com
Tue Jan 14 18:24:21 EST 2014


Thank you, gentlesapients.  It's not a Firefox issue, or it is, Mirage
and Thunar have the same issue. I've done further testing.

I realised I need to methodicly test these issues when it became
evident I must have been mistaken about Mirage. At any rate it now
ignores rc.xml when I change the height spec and relog. It just opens
whatever size it had when last open, or at least close to that size (I
make that reservation for a reason explained below). xprop gives:

program specified minimum size: 421 by 54

_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL

WM_CLASS(STRING) = "mirage", "Mirage"
(does that mean it should recognise being addressed either way?)

WM_ICON_NAME(STRING) = "Mirage - [1 of 1] 007.jpg"

_NET_WM_ICON_NAME(UTF8_STRING) = "Mirage - [1 of 1] 007.jpg"

WM_NAME(STRING) = "Mirage - [1 of 1] 007.jpg"

_NET_WM_NAME(UTF8_STRING) = "Mirage - [1 of 1] 007.jpg"

I've got redundant stanzas for title with and without an asterisk
following "Mirage" and the same for name in addition to the wildcard
stanzas supposed to apply to all windows not otherwise covered. I've
got all the stanzas except conky's set to 500 x 500 so if ANY of them
work I'm bound to notice the change. I just opened Mirage, wmctrled it
to 0,1,1,1912,1025, which I call "full". Closed it. Opened it again.
It opened at "full" again (ADDED LATER: Or maybe it was just close -
at this point I wasn't suspecting a SMALL displacement). Now I am
going to shutdown -h, let it cool, and boot up again, not just relog.
Overkill, I know. Giveing it every possible chance.

Probably irrelevant but for completeness I should mention my next boot
failed to start x. I tried startx from the tty after logging in. It
said startx was part of a package not installed and I tried to install
it. Apt-get told me the filesystem was damaged and mounted read only.
So I sudo fsck'ed it and rebooted normally.

OK, I'm seeing both problems with Mirage.
1- It is NOT paying any attention to rc.xml.
2- It opens up very close, but not quite, at the position I closed it
at. It is displaced slightly down and to the right of that position,
by something on the close order of 5 pixels in both dimensions. With
regard to vertical placement it could be that it has placed the top
boundary of the border where the bottom boundary was, just barely
below the edge of the screen. With respect to horizontal placement, it
could be it is doing the opposite - putting the outer edge of the
border where the inner edge was when I closed it. This is the same
pattern I saw with Firefox, and earlier, with Thunar. Obviously this
is not a huge problem. Probably many people would never notice it. But
it is annoying. I like to see my window borders because often I have
problems with windows that are larger than my screen and hiding
important buttons in consequence. A case in point is "Qt
Configuration, version 4.8.4". I'm pretty sure it's hiding an "apply",
"ok", or "close" button I can't get to. If I can see the borders, at
least I know that's not the problem and I'm not missing content. The
source of the problem with that window though is undoutedly different
from this "slight displacement from historical placement" problem. It
won't let me resize it with either mouse or wmctrl. It's just a darned
stubborn ap. Enough or Mirage. Now for:

--------- Thunar ----------
I have a thunar window up already. I opened it with a script (here:
http://pastebin.com/XSCmtC36
 )that first opens thunar and then wmctrls it thus:
wmctrl -r "Desktop - File Manager" -e 0,0,60,1912,970
The script was called from an openbox menu entry thus:
<command>thun ~/Desktop</command>
"thun" is the filename of the script and it's in my path. I doubt any
of that's important. Thunar is a well behaved program like most (and
unlike "Qt Configuration") and responds to the wmctrl command
correctly. When I open it with that menu item, it first appears with
no visible bottom border, and then when the wmctrl statement hits it,
it jumps up and left a little, again on the close order of 5 pixels or
so. So that's where it is now. I close it. Gone. Now I open it with
"thunar" (bypassing the script) in lxterminal. Lxterminal didn't give
any messages - the cursor just jumped to the next line where it now
sits blinking. Thunar is slightly to the right and below its previous
placement, following the same pattern as Mirage and Firefox. I wmctrl
it from the menu thus:
wmctrl -r :SELECT: -e 0,150,1,1000,1078
and click on it. It changes size more or less as expected. The bottom
is a little lower than I thought that would give me, again by about
the width of my fat borders, but that is probably just that I didn't
get the numbers quite right when I was editing the menu. I don't use
that size very often. I close it by clicking the close button in the
title bar. Lxterminal gives me a new prompt. No messages have
appeared. So on my terminal are just 2 lines, one with a prompt
followed by "thunar" and the second with just a prompt and the
blinking cursor (the best thing about having the cursor blink is you
can say "the blinking cursor" and it feels like you're cussing with a
British accent). I start thunar again by typing thunar [enter] in the
same terminal. Ahaa! Something I didn't expect: Thunar appears to have
the same width and vertical placement as before (as far as I can tell
by eye) but horizontally it is up against the left screen edge.
Hypothesis: It's honoring the horizontal placement spec in rc.xml but
nothing else. So, I'll test that. I edit rc.xml changing all the x
positions from <x>2</x> to <x>100</x> and save it. BTW, all these
references to rc.xml are to a plain user's ~/.config/openbox/rc.xml. I
suppose root has one too, but I haven't messed with that yet. Now I
close thunar. Click the "Reconfigure" item on the menu. Now I raise
the lxterminal and it has given me 2 error messages at some point:
(thunar:2764): Gdk-CRITICAL **: IA__gdk_window_get_window_type:
assertion 'GDK_IS_WINDOW (window)' failed

(thunar:2764): Gtk-WARNING **: Error loading theme icon
'user-trash-full' for stock: Icon 'user-trash-full' not present in
theme

and then a new prompt. I think those messages are probably neither
important nor relevant. I open thunar again the same way in the
terminal. Ahaa! As I hypothesised, it's a thumb width (about the
expected 100 pixels) to the right of the previous position. Now let's
see if it honors the y. I'll bet it does. I change all the <y>60</y>
to <y>10</y> and save it. Close thunar. Lxterminal has a new prompt.
Click "Reconfigure" on the menu. Type "thunar [enter] in lxterminal.
/me pauses to shout "Huzzah!" loud enough to disturb the chickens.
Thunar opened up near the top edge as rc.xml told it to.

Revised hypothesis: Except for a small displacement to the right and
down, at least for aps last open with the left and bottom window
borders right on the screen edge, which may be a related issue or may
be entirely seperate, my aps ARE honoring the position statements in
rc.xml, but NOT the size ones. For size, it seems to be honoring the
"open at the same size you closed" principle.

Well, at least I know openbox IS reading the file, so it's not some
kind of permission thing. Also I've shown the problem seems to be the
same in the 3 aps I tested: Firefox casually, thunar and mirage more
thoroughly. So if it's a bug in the aps they all have the same one or
ones. Which if you define a failure to comply with some published
standard as a "bug" is not at all unlikely.

So is it possible that there is a setting somewhere or a bit of hard
code that is giving the "last size" principle precedence over the "do
what the rc.xml says" principle with regard to window size? Surely
that isn't what's intended. If that were the case the only time rc.xml
size statements would have any effect would be the first opening of a
newly installed ap.

I will do some more tests. Probably with the same aps unless someone
requests something else. Maybe starting with windows in the middle of
the page with space all around them. Anyway, this is what I've found
so far. Gotta run calm those chickens now.

Here is my present rc.xml. As before, you can find the beginning of
the applications section by seaching for ******.
http://pastebin.com/kmC41c27


On 1/13/14, openbox-request at icculus.org <openbox-request at icculus.org> wrote:
> Send openbox mailing list submissions to
> 	openbox at icculus.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://icculus.org/mailman/listinfo/openbox
> or, via email, send a message with subject or body 'help' to
> 	openbox-request at icculus.org
>
> You can reach the person managing the list at
> 	openbox-owner at icculus.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of openbox digest..."
>
>
> Today's Topics:
>
>    1. Re: aps not honoring rc.xml position statements, Vol 59,
>       Issue 4 (plmalternate plmalternate)
>    2. Re: aps not honoring rc.xml position statements, Vol 59,
>       Issue 4 (Jim Rees)
>    3. Re: most aps ignore rc.xml (Anthony Thyssen)
>    4. Re: most aps ignore rc.xml (Johan Vromans)
>    5. Re: most aps ignore rc.xml (Anthony Thyssen)
>    6. Re: most aps ignore rc.xml (Johan Vromans)
>    7. Re: most aps ignore rc.xml (Jim Rees)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 12 Jan 2014 16:13:45 -0500
> From: plmalternate plmalternate <plmalternate at gmail.com>
> To: openbox at icculus.org
> Subject: Re: [openbox] aps not honoring rc.xml position statements,
> 	Vol 59,	Issue 4
> Message-ID:
> 	<CAB2o_TF3TLbYBkty4A_5OVQmywLqKFy6L-6AxkSjkG6Ou0Du1w at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 1/12/14, openbox-request at icculus.org <openbox-request at icculus.org>
> wrote:
>> Send openbox mailing list submissions to
>> 	openbox at icculus.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://icculus.org/mailman/listinfo/openbox
>> or, via email, send a message with subject or body 'help' to
>> 	openbox-request at icculus.org
>>
>> You can reach the person managing the list at
>> 	openbox-owner at icculus.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of openbox digest..."
>>
>>
>> Today's Topics:
>>
>>    1. most aps ignore rc.xml (plmalternate plmalternate)
>>    2. Re: most aps ignore rc.xml (Jim Rees)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Sun, 12 Jan 2014 03:36:10 -0500
>> From: plmalternate plmalternate <plmalternate at gmail.com>
>> To: openbox at icculus.org
>> Subject: [openbox] most aps ignore rc.xml
>> Message-ID:
>> 	<CAB2o_TGBA=ie9caq7ej_mhTZfJm33UieE=Wask6VT74tn3hwRA at mail.gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Most of my aps ignore my ~/.config/openbox/rc.xml specifications for
>> window size and placement, despite "<position force="yes">". The only
>> ap I'm pretty sure is honoring them is Mirage, a picture viewer.
>> Thunar, firefox, gedit, k4dirstat, and galculator certainly don't.
>> I've gone so far as to write a script to launch thunar and then beat
>> it in to shape with wmctrl.  I've even thought about
>> recompiling some of the aps and trying to see if I can figure out how
>> to write the opening size and position in directly. I've never done
>> that and I'm not sure how much work it would be.
>>
>> I'm running Ubuntu Saucy 13.10, 32 bit, made from an installation cd
>> made from the mini.iso, which gives you a console with bash, apt-get,
>> and not much more. I added x, lightdm and it's gtk greeter, openbox,
>> thunar, lxterminal, conky (for a clock), firefox, and this and that.
>> So, it's a plain openbox environment, no desktop, no panels.  After
>> logging in, all I see is conky showing the time. I right click for a
>> menu and proceed from there.
>>
>> So, am I doing something wrong in the rc.xml, or maybe somewhere else?
>> Or have I just run into the border of the present state of the art
>> beyond which things don't yet work quite the way we'd like? Any
>> suggestions?
>>
>> my rc.xml is here:
>> http://pastebin.com/0cWbsz2P
>>
>> The applications section starts
>> shortly after a row of commented out asterisks. So searching for
>> "*****" should take you right to that part.
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Sun, 12 Jan 2014 11:31:48 -0500
>> From: Jim Rees <rees at umich.edu>
>> To: openbox mailing list <openbox at icculus.org>
>> Subject: Re: [openbox] most aps ignore rc.xml
>> Message-ID: <20140112163148.GA19288 at umich.edu>
>> Content-Type: text/plain; charset=us-ascii
>>
>> plmalternate plmalternate wrote:
>>
>>   Most of my aps ignore my ~/.config/openbox/rc.xml specifications for
>>   window size and placement, despite "<position force="yes">". The only
>>   ap I'm pretty sure is honoring them is Mirage, a picture viewer.
>>
>> This works for me. Two things look odd to me. One is your wildcard. Maybe
>> openbox stops searching for app stanzas when it finds the first match?
>> The
>> other is that you are only giving the app name, which I think should
>> work,
>> but I always give the class too.
>>
>> Here's what I've got for firefox:
>>
>>     <application name="Navigator" class="Firefox">
>>       <position force="yes">
>> 	<x>8</x>
>> 	<y>6</y>
>>       </position>
>>     </application>
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> openbox mailing list
>> openbox at icculus.org
>> http://icculus.org/mailman/listinfo/openbox
>>
>>
>> ------------------------------
>>
>> End of openbox Digest, Vol 59, Issue 4
>> **************************************
>>
> Thank you, sir. You taught me one thing right off the bat. From now on
> I'll always use xprop and never make reasonable assumptions about
> application's properties. Who'd have thought firefox was "named"
> "Navigarot". Now that I know it, I can of course see why. Anyway, I
> revised my rc.xml and copied the new version here:
> http://pastebin.com/AAWUhPBE
> I put your stanza at the top, added width and height, changed the
> width and height in the wildcard stanzas because Firefox sets a
> minimum I hadn't suspected until I used xprop to confirm the name
> "Navigator". I set these notably low, but above Firefox's minimum,  so
> that if I get Firefox to honor either of these stanzas, the change in
> size will be dramatic enough there will be no mistaking it. Once I get
> it working AT ALL I'll change things around so I can determine whether
> Firefox honors the first, the last, or the most specific stanza. ATM
> it's not honoring any of them.
>
> In the process of trying to figure this out I think I've discovered a
> bug, which I intend to report tonight or tomorrow unless someone tells
> me not to. It might be relevant.  The position Firefox DOES open at is
> ALMOST the same position I closed it at previously, but shifted down
> about 5 - 10 pixels, approximately the width of my fat window borders.
> This doesn't happen if I close Firefox in a window adjusted smaller
> that I usually use with the lower boundary well away from the screen
> edge but, so far as I can tell, only when I close it positioned as I
> normally do with the bottom border visible but just barely, sitting
> right on the bottom of the screen. I don't mean to drag in another
> topic, but I thought it might be related.
>
> I'm new to software mailing lists so if I'm violating any standard
> customs, please let me know. Should I go ahead and report both of
> these things as bugs, citing each report in the other in case they are
> linked, or should it stay in the mailing list a bit longer first?
>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 12 Jan 2014 20:52:06 -0500
> From: Jim Rees <rees at umich.edu>
> To: openbox mailing list <openbox at icculus.org>
> Subject: Re: [openbox] aps not honoring rc.xml position statements,
> 	Vol 59, Issue 4
> Message-ID: <20140113015206.GA24001 at umich.edu>
> Content-Type: text/plain; charset=us-ascii
>
> There used to be a bug in openbox having to do with window position near
> the
> bottom of the screen. It's been a while so I don't remember the
> details. It's fixed in the repo but if you have an older build maybe that's
> it? Someone else on this list might remember the details better than I.
>
> Firefox is notoriously bad about adhering to standards with regard to
> window
> position and size. It ignores all the standard X command line options and
> resources, among other problems. I remember filing a bug on bugzilla about
> 15 years ago about this, and I don't think it was ever fixed. MS Windows
> compatibility is a far higher priority for them than linux.
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 13 Jan 2014 11:56:14 +1000
> From: Anthony Thyssen <A.Thyssen at griffith.edu.au>
> To: openbox at icculus.org
> Subject: Re: [openbox] most aps ignore rc.xml
> Message-ID: <20140113115614.7a4b32f7 at chimera.itc.griffith.edu.au>
> Content-Type: text/plain; charset=US-ASCII
>
> On Sun, 12 Jan 2014 11:31:48 -0500
> Jim Rees <rees at umich.edu> wrote:
> | plmalternate plmalternate wrote:
> |
> |   Most of my aps ignore my ~/.config/openbox/rc.xml specifications for
> |   window size and placement, despite "<position force="yes">". The only
> |   ap I'm pretty sure is honoring them is Mirage, a picture viewer.
> |
> | This works for me. Two things look odd to me. One is your wildcard. Maybe
> | openbox stops searching for app stanzas when it finds the first match?
> The
> | other is that you are only giving the app name, which I think should
> work,
> | but I always give the class too.
> |
> | Here's what I've got for firefox:
> |
> |     <application name="Navigator" class="Firefox">
> |       <position force="yes">
> | 	<x>8</x>
> | 	<y>6</y>
> |       </position>
> |     </application>
> | _______________________________________________
> | openbox mailing list
> | openbox at icculus.org
> | http://icculus.org/mailman/listinfo/openbox
>
>
> You do need to ensure the application starts AFTER the window manager!!!
> :-)
>
> I usually don't rely on it. As while I like to position my windows on
> login (I use a personal session script to do that), I generally don't
> want specific positions for later windows of the appliactions.
>
> The exception to this is a few special ones I want located on a specific
> workspace. For example my music player, which I have special keyboard
> keys to to control regardless of what workspace it is in.
>
> The pet hate is most modern applications no long provide the standard
> X window geometry command line options to position initial windows.
>
> For example here is my scripted launcher for FireFox...
>
>   ( firefox & ) &
>   if id=`xwin_find 60 "Anthony .* Mozilla Firefox"`; then
>     echo "Main firefox window found (id=$id)"
>     # size, position, and iconify
>     xwit -resize 1024 960 -move 330 70 -iconify -id $id
>   else
>     echo "ERROR: Firefox Default window NOT FOUND!"
>   fi
>
> The script "xwin_find" I wrote and is based on the standard x-window
> utility "xwininfo".  You can get it from
>   http://www.ict.griffith.edu.au/anthony/software/#xwin_find
>
> "xwit" is a fairly common Window Helper application
> (also look at "xdotool" and "wmctrl" for alternatives.
> each has its own pluses/minuses/quirks.
> See http://www.ict.griffith.edu.au/anthony/info/X/progs.summary
>
>
>
>   Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
>  --------------------------------------------------------------------------
>   Real Programmers never grow old.
>        They suffer from burnouts, monumental crashes, or bugs in thier DNA.
>  --------------------------------------------------------------------------
>    Anthony's Castle     http://www.ict.griffith.edu.au/anthony/
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 13 Jan 2014 08:20:21 +0100
> From: Johan Vromans <jvromans at squirrel.nl>
> To: openbox at icculus.org
> Subject: Re: [openbox] most aps ignore rc.xml
> Message-ID: <m24n58tkju.fsf at phoenix.squirrel.nl>
> Content-Type: text/plain; charset=us-ascii
>
> Anthony Thyssen <A.Thyssen at griffith.edu.au> writes:
>
>> "xwit" is a fairly common Window Helper application
>> (also look at "xdotool" and "wmctrl" for alternatives.
>> each has its own pluses/minuses/quirks.
>> See http://www.ict.griffith.edu.au/anthony/info/X/progs.summary
>
> Devilspie is a useful tool as well.
>
>   (if (and (matches (window_name) "Mozilla Firefox")
>            (is (application_name) "Firefox"))
>       (geometry "1200x1055+0+0"))
>
> -- Johan
>
>
> ------------------------------
>
> Message: 5
> Date: Mon, 13 Jan 2014 17:44:10 +1000
> From: Anthony Thyssen <A.Thyssen at griffith.edu.au>
> To: openbox at icculus.org
> Subject: Re: [openbox] most aps ignore rc.xml
> Message-ID: <20140113174410.76478fa7 at chimera.itc.griffith.edu.au>
> Content-Type: text/plain; charset=US-ASCII
>
> On Mon, 13 Jan 2014 08:20:21 +0100
> Johan Vromans <jvromans at squirrel.nl> wrote:
> | Anthony Thyssen <A.Thyssen at griffith.edu.au> writes:
> |
> | > "xwit" is a fairly common Window Helper application
> | > (also look at "xdotool" and "wmctrl" for alternatives.
> | > each has its own pluses/minuses/quirks.
> | > See http://www.ict.griffith.edu.au/anthony/info/X/progs.summary
> |
> | Devilspie is a useful tool as well.
> |
> |   (if (and (matches (window_name) "Mozilla Firefox")
> |            (is (application_name) "Firefox"))
> |       (geometry "1200x1055+0+0"))
> |
> | -- Johan
> | _______________________________________________
> | openbox mailing list
> | openbox at icculus.org
> | http://icculus.org/mailman/listinfo/openbox
>
> But again it handles every window that opens.  not just the initial window.
> that is why I don't use it!  Though I did look into it.
>
>
>
>   Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
>  --------------------------------------------------------------------------
>    Understanding the question is just as important as the result -
>    which we all know is 42 in any case.     Douglas Eadline, Ph.D.
>  --------------------------------------------------------------------------
>    Anthony's Castle     http://www.ict.griffith.edu.au/anthony/
>
>
> ------------------------------
>
> Message: 6
> Date: Mon, 13 Jan 2014 09:31:21 +0100
> From: Johan Vromans <jvromans at squirrel.nl>
> To: openbox at icculus.org
> Subject: Re: [openbox] most aps ignore rc.xml
> Message-ID: <m2zjn0s2p2.fsf at phoenix.squirrel.nl>
> Content-Type: text/plain; charset=us-ascii
>
> Anthony Thyssen <A.Thyssen at griffith.edu.au> writes:
>
>> But again it handles every window that opens. not just the initial
>> window. that is why I don't use it! Though I did look into it.
>
> It does only handle main window(s) which I haven't experienced being a
> problem.
>
> For Mozilla I filed a bug (not taking command line -geometry into
> account) some 10 years ago, and they're still discussing it.
>
> -- Johan
>
>
> ------------------------------
>
> Message: 7
> Date: Mon, 13 Jan 2014 08:50:30 -0500
> From: Jim Rees <rees at umich.edu>
> To: openbox mailing list <openbox at icculus.org>
> Subject: Re: [openbox] most aps ignore rc.xml
> Message-ID: <20140113135030.GA1357 at umich.edu>
> Content-Type: text/plain; charset=us-ascii
>
> Johan Vromans wrote:
>
>   Anthony Thyssen <A.Thyssen at griffith.edu.au> writes:
>
>   > But again it handles every window that opens. not just the initial
>   > window. that is why I don't use it! Though I did look into it.
>
>   It does only handle main window(s) which I haven't experienced being a
>   problem.
>
>   For Mozilla I filed a bug (not taking command line -geometry into
>   account) some 10 years ago, and they're still discussing it.
>
> There used to be undocumented "-width" and "-height" command line options,
> although no way to set the position.
>
> Firefox also ignores the X "geometry" resource. That bug is over 20 years
> old and dates to the first release of Mozilla. It's #444496 in Bugzilla.
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>
>
> ------------------------------
>
> End of openbox Digest, Vol 59, Issue 5
> **************************************
>


More information about the openbox mailing list