Auto Start in XFCE4

Loïc Lahalle lists-lah at laposte.net
Wed Jan 21 11:23:54 CET 2004


Fabian Hänsel a écrit :

>Uwe Dippel <udippel at uniten.edu.my> wrote:
>
>  
>
>>Ed wrote:
>>    
>>
>>>Is there a way to have programs automatically start at launch of
>>>desktop?
>>>      
>>>
>>There is. Read the Forum.
>>
>>Place them in ~/Desktop/Autostart
>>
>>Only this doesn't work for me, whatever I put (there are samples, 
>>scripts, you name it).
>>~/Desktop/Autostart/myscript works well whenever I type it in a
>>console. It would never at start of XFCE4
>>    
>>
>
>The autostart files are only executed if they are executeable by the
>user.
>
>They will be called from startxfce4. Means they won't be executed
>unless you use the script startxfce4 or put something appropriate into
>your xinitrc.
>
>  
>
I don't know if it's the right way to do that. But I fix it by editing 
my xinitrc (it was empty before) with :

# Start-up stuff from ~/Desktop/Autostart directory, if it exists
if [ -d "$HOME/Desktop/Autostart" ]; then
cd $HOME/Desktop/Autostart
for i in `ls -1 -L 2>/dev/null`; do
if [ -x $i ] && [ ! "${i:${#i}-1:1}" = "~" ]; then
# Only start executable scripts which are not a backup
./$i &
fi
done
cd $HOME
fi

Hope it works for you !

    - Loïc -



More information about the Xfce mailing list