Voici quelques exemples de script autostart.sh permettant le lancement d'applications au démarrage:

#!/bin/sh
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the #Openbox session.

# D-bus
#if which dbus-launch >/dev/null && test -z #"$DBUS_SESSION_BUS_ADDRESS"; then
#
#      eval `dbus-launch --sh-syntax --exit-with-session`
#
#fi

xscreensaver -no-splash &

nitrogen --restore &

#xfce4-volumed &

conky &

wicd-client &

sleep 3
ivman &
tint2 &

#if [ $(pgrep #Thunar) ];                                                  # using Thunar as automounter
#    then true;
#    else Thunar --daemon &
#ossxmix -b -x #&                                                        # OSS4 mixer applet

batterymon &

/usr/bin/ibus-daemon --xim -d &
export  IBUS_SESSION_ID=`mktemp -u XXXXXXXX`
export  GTK_IM_MODULE=ibus
export  QT_IM_MODULE=ibus
export  XMODIFIERS=@im=ibus

exec openbox
# This shell script is run before Openbox launches.

# Environment variables set here are passed to the Openbox session.


# Set a background color

BG=""

if which hsetroot >/dev/null; then

    BG=hsetroot

else

    if which esetroot >/dev/null; then

    BG=esetroot

    else

    if which xsetroot >/dev/null; then

        BG=xsetroot
    fi
    fi

fi

test -z $BG || $BG -solid "#303030"


# D-bus

if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then

       eval `dbus-launch --sh-syntax --exit-with-session`

fi


# Make GTK apps look and behave how they were set up in the gnome config tools

if which gnome-settings-daemon >/dev/null; then

  gnome-settings-daemon &

fi

# Preload stuff for KDE apps

if which start_kdeinit >/dev/null; then

  LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &

fi
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.

# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then

       eval `dbus-launch --sh-syntax --exit-with-session`

fi

gnome-settings-daemon &

xscreensaver -no-splash &

/usr/lib/gnome-volume-manager/gnome-volume-manager --sm-disable &

sh /home/xavier/.conky/conky.sh &

#idesk &

update-notifier &

gnome-power-manager &


nm-applet &

fbpanel &

sleep 3
drapes &
xcompmgr -fF -I-.002 -O-.003 -D6 -cC -t-5 -l-6 -r5 &
# This shell script is run before Openbox launches.
# Environment variables set here are passed to the Openbox session.

# Définir une couleur d'arrière-plan
BG=""
if which hsetroot >/dev/null; then
    BG=hsetroot
else
    if which esetroot >/dev/null; then
	BG=esetroot
    else
	if which xsetroot >/dev/null; then
	    BG=xsetroot
	fi
    fi
fi
test -z $BG || $BG -solid "#000000"

# D-bus
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
       eval `dbus-launch --sh-syntax --exit-with-session`
fi

# Make GTK apps look and behave how they were set up in the gnome config tools
if test -x /usr/libexec/gnome-settings-daemon >/dev/null; then
  /usr/libexec/gnome-settings-daemon &
elif which gnome-settings-daemon >/dev/null; then
  gnome-settings-daemon &
# Make GTK apps look and behave how they were set up in the XFCE config tools
elif which xfce-mcs-manager >/dev/null; then
  xfce-mcs-manager n &
fi

# Preload stuff for KDE apps
if which start_kdeinit >/dev/null; then
  LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &
fi

# Run XDG autostart things.  By default don't run anything desktop-specific
# See xdg-autostart --help more info
DESKTOP_ENV=""
if which /usr/lib/openbox/xdg-autostart >/dev/null; then
  /usr/lib/openbox/xdg-autostart $DESKTOP_ENV
fi

###############################################################
#            Programmes au démarrage                          #
###############################################################

# Se souvenir du nom des bureaux
xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP
# fond d'écran (utilise feh)
feh --bg-scale /chemin/vers/fond_ecran.png &
# Conky
sh -c "sleep 5; conky -c /home/[user]/.conkyrc;" &
# Config tablette graphique
/home/[user]/scripts/xsetwacom_perso.sh &
# Transparence
xcompmgr -fF -I-.002 -O-.003 -D3 &
# Tint2
sleep 2 && tint2 &
#Dock
sleep 2 && adeskbar &
  • exemple_autostart.sh.txt
  • Dernière modification: Le 11/02/2013, 12:26
  • par Christophe c