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

Re: Additionals directory



Kevin Forge wrote:

[ ... ]

>
> Thought about it for a few minutes and this "kde" script should work.
>
> ##
> mv ~/.xinitrc ~/.xinitrc.bak
> cp $KDEDIR/bin/.xinitrc ~/
> startx
> pause 20 seconds ## I can't remember what command dose this
> mv ~/.xinitrc.bak ~/.xinitrc
> ##
>
> Then again it's probably crap, but you get the idea.
> It's untested and just mearly demonstraights the concept.
> is there a way to override an existing ~/.xinitrc without
> moving it ?

I don't think so, that is the first place that is checked.  But as far
as the script above is concerned, I think the following is safer as
"start_kde" (I'm assuming that the .xinitrc file shoudl be used; I think
most distros use .Xclients):

#! /bin/bash
cp -f ~/.xinitrc ~/.xinitrc.sav.$$
trap "mv -f ~/.xinitrc.sav ~/.xinitrc" 1 2 3 14 15
if [ -n "$KDEDIR" ] ; then
    echo "$KDEDIR/bin/startkde" > ~/.xinitrc
    startx &
    sleep 60
    mv -f ~/.xinitrc.sav ~/.xinitrc
    trap -
    wait
else
    echo "ERROR:  \$KDEDIR is not defined.  Cannot start kde."
fi