[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: howto serialize tasks in .xsession



On Sat, Feb 28, 2004 at 11:55:44PM -0500, Greg Folkert wrote:
> On Sat, 2004-02-28 at 18:50, Nano Nano wrote:
> > I run a hybrid desktop: gnome-control-center is installed, but not 
> > metacity.  Fluxbox is my WM; but I remove gnome-session as a Session 
> > Manager so I have No Session Manager.  Here is my .xsession:
> > 
> > #!/bin/sh
> > ARGS="--hide-menubar --window-with-profile=Default"
> > #gnome-control-center
> > gnome-settings-daemon --oaf-activate-iid=OAFIID:GNOME_SettingsDaemon --oaf-ior-fd=21 &
> > xscreensaver -nosplash &
> > kdeinit &
> > gbuffy &
> > #xmms &
> > gnome-terminal $ARGS --geometry=80x25+1+22 &
> > gnome-terminal $ARGS --geometry=95x25+582+22 &
> > gnome-terminal $ARGS --geometry=80x40+1+418 &
> > gnome-terminal $ARGS --geometry=95x40+582+418 &
> > exec fluxbox
> > 
> Break them out to a script with a sleep statement. That way it'll
> non-block. Changes would be something like:

Ug, what a gruesome hack, but it works.  For what its worth, putting a 
blocking "sleep 1" right after the gnome-settings-daemon is enough time 
for it to init itself, because nothing else heavyweight has started yet.

It'll probably fail periodically, sleeping always does.  Even if you 
sleep 10 seconds, murphy's law says something's going to block it 10 
seconds!  (It always happens).

The strange thing is gnome-settings-daemon spits out some debug output 
when its ready (apparently to stdout or stderr) but if you try to 
redirect them it doesn't.  I thought I could block looking for that 
output, but it's tricky.

Anyway, thanks.



Reply to: