[openbox] how about xdg-autostart being able to order .desktop execution

Anthony Thyssen A.Thyssen at griffith.edu.au
Mon Nov 2 20:38:43 EST 2009

On Mon, 2 Nov 2009 15:24:13 -0500
Dana Jansens <danakj at orodu.net> wrote:

| Hi Ted,
| 2009/11/2 Xavier Toth <txtoth at gmail.com>:
| > I'm using idesk with openbox and starting it with a desktop file in
| > /etc/xdg/autostart. idesk will put desktop icon on top of other
| > windows unless I start it last. I was thinking about something like
| > xinitrc.d where the files are sorted before execution.
| I think that's a really nice idea, but I do see some problems.  First
| if there is an order specified, then every application adding things
| to autostart needs to pick a number somehow, and they may all just
| pick the same one since it is an independent choice.  Second, all the
| autostart apps are launched asynchronously, since they are not
| expected to ever exit, thus there is no way to know when to launch the
| second one, compared to the first one, and so on.  So at what point
| does the last one begin execution exactly?
| You said that idesk must be run last, you can delay it by running a
| script which "wait"s a few seconds before running idesk.  It's a hack
| to work around idesk, but that might help.  I'm not sure what a
| solution would look like to properly order the autostart system.
An alternative is to use some tool that 'waits' for a specific window to
appear (or a timeout in case it never appears).

their are a number of tools that can do this but I wrote my own script
"xwin_find" using  xwininfo  Attached.

Now I start a program and wait for it to appear befor either doing
other things to the window just just continue with the start of the
next application.

for example... start firefox and what for it...

  firefox -P default -geometry 820x1000+530+70 &
  xwin_find -q 60 "Mozilla Firefox"

Or start it and resize and iconify its window!

  firefox -P default -geometry 820x1000+530+70 &
  if id=`xwin_find 60 "Mozilla Firefox"`; then
    echo "Firefox window found (id=$id)"
    # size, position, and iconify
    xwit -resize 820 1000 -move 530 70 -iconify -id $id
    echo "Firefox window timeout"

  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
   Neelix: "Is something wrong?"
   Doctor: "Yes, Terribly wrong!" (to Kes) "Your brain is not on file!"
                                 -- StarTrek Voyager "Time and Again"
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xwin_find
Type: application/octet-stream
Size: 2444 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20091103/322c28bd/attachment.obj>

More information about the openbox mailing list