xinitrc issues
Matthew Weier OPhinney
matthew-lists at weierophinney.net
Fri Jun 20 16:49:36 CEST 2003
I've been using ROX-Session, but I noticed that with an XFwm/ce4 CVS
update I did yesterday, it hasn't been working as well as I'd like.
Mainly, I've been noticing strange behaviour with how the pinboard is
started (the window ROX-Filer creates for the pinboard gets decorations,
and doesn't become the root window).
Since the main functionality I've enjoyed from ROX-Session has been
getting programs started on session initialization, I decided I'd look
into XFwm/ce4's $HOME/.xfce4/xinitrc script and see if I could get it
working with ROX-Filer again. I had some difficulties, and the results
of that are the xinitrc script attached.
Basically, I noticed (1) that the 'ls' command run by the script to find
files in the Autostart directory doesn't take into account that some of
these may be symbolic links, which makes the executable test fail for
those files. I added the '-L' switch to correct this.
Second, the order in which the various programs are executed causes some
*very* big issues. I discovered, through trial and error at a failsafe
xterm, that xfwm4 *MUST* be started before ROX-Filer for the pinboard to
manifest correctly; it also seems that a good number of net_wm-compliant
programs have issues if they cannot find a net_wm-compliant WM running
when they begin. So I moved the xfce-mcs-manager and xfwm4 commands to
precede running the Autostart programs. This works because each runs in
the background.
Third, I commented a section for any other programs that the user may
wish to execute. In this area I commented in entries for xftaskbar4 and
xfdesktop.
Finally, the last thing to execute is the panel; I left this verbatim
from the script in CVS.
Comments appreciated!
--
Matthew Weier O'Phinney
http://weierophinney.net/matthew/
-------------- next part --------------
#!/bin/sh
# First, start the settings manager and the WM
xfce-mcs-manager
xfwm4 --daemon
# Next, grab any startup programs you want, starting with stuff in the
# $HOME/Desktop/Autostart directory
ASDIR="${HOME}/Desktop/Autostart"
if [ -d $ASDIR ]; then
for i in `ls -1 -L ${ASDIR}/ 2>/dev/null`; do
CURFILE="${ASDIR}/$i"
if [ -x ${CURFILE} ]; then
${CURFILE} &
fi
done
fi
# Any other things you want at startup go here...
#xftaskbar4 &
#xfdesktop &
# Finally, start the panel
panel=`which xfce4-panel`
if test "x$panel" != "x" ; then
$panel
ret=$?
while [ $ret -ne 0 ] ; do
xmessage -center -file - -timeout 20 -title Error <<EOF
A crash occured in the panel
Please report this to the xfce4-dev at moongroup.com list
Meanwhile the panel will be restarted
EOF
cat >&2 <<EOF
A crash occured in the panel
Please report this to the xfce4-dev at moongroup.com list
Meanwhile the panel will be restarted
EOF
$panel
ret=$?
done
fi
More information about the Xfce4-dev
mailing list