Making session startup wait for an application to exit

George Hartzell hartzell at alerce.com
Fri Mar 31 03:20:53 UTC 2006


Kevin Oberman writes:
 > Is there any way to add an application to the startup so that the
 > startup will block until that application is complete?
 > 
 > It seems like it does this for some of the internal apps (like nautilus
 > and gnomepanel), but I don't see a way to make it wait for an
 > application I want to run to completion before my session is started.

I run startx from a text console.

If you want it to run *before* gnome starts, you could try a .xinitrc
like this (make sure it's executable):

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# start some nice programs

export SSH_ASKPASS=ssh-askpass-gtk2
#twm&exec xterm
exec ssh-agent /bin/sh -c "ssh-add < /dev/null; gnome-session"



More information about the freebsd-gnome mailing list