forgot to "Reply All"
-------- Original Message --------
Subject: Re: Startup script
Date: Wed, 01 Oct 2008 09:03:54 -0700
From: Mike Mattie <[EMAIL PROTECTED]>
To: Jouni Rinne <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Jouni Rinne wrote:
Because awesome seems to lack an inbuild method of starting programs at startup
(unlike my previous wm-of-choice, fluxbox), and kdm, gdm and other display
managers completely ignore .xinitrc and .Xsession, I made the following wrapper
script:
#!/bin/bash
STARTFILE=${HOME}/.config/awesome/startup
if [ ! -e $STARTFILE ]; then
touch $STARTFILE
chmod +x $STARTFILE
fi
$STARTFILE
exec awesome
Then I modified the /usr/share/xsessions/awesome.desktop to run the wrapper
script. (KDM uses the mentioned .desktop file, at least on Gentoo). The
programs
to start should be placed in the ~/.config/awesome/startup file.
Maybe something similar could be integrated in the future versions of awesome?
Jouni Rinne
I noticed that you decided to go with the lua spawn() method. I have
sometimes wanted similar
features such as starting programs but I usually do not do it in the
window manager as I have a couple I switch between when the other
develops bugs that render it unusable.
An alternative approach that isn't tied to a specific window manager is
an arrangement like this:
xsession/core -- a script that launches the gnome daemons, cleans up the
environment, changes priority levels etc.
xsession/current - a simple file that sets WM="x" so you can select
window managers
without altering a source file under
version control/
xsession/x - a file with window manager specific configuration.
The core based upon the WM= value from current sources xsession/x
to perform window manager specific pre-launch, and launching..
in xsession/x there is something like this (awesome's for example)
<snip>
awesome 2>>$X_SCRIPT_LOG&
WM_PID=$!
</snip>
here is the relevant part of core
<snip>
source "$X_SCRIPT_DIR/$WM"
wait $WM_PID
kill $DBUS_SESSION_BUS_PID
</snip>
This setup allows you to do post window manager setup after the "wait"
command and
still clean up things like gnome etc.
Hopefully this helps someone who occasionally ends up juggling various
window managers.
Cheers,
Mike Mattie
--
To unsubscribe, send mail to [EMAIL PROTECTED]