cwm - 共通事項 - 自動起動 - Alpine Linux


 クラウディア


1. 概要
2. 自動起動

1. 概要

 「Alpine Linux」では、何も仕掛けが用意されていないので、「ArcoLinux」の真似をします。

2. 自動起動

 ログインユーザで。

sh
cat << EOF >> ~/.xprofile
#!/bin/sh

if [ $DESKTOP_SESSION = 'cwm' ]; then
        homedir=$(echo $HOME)
        sh $homedir/.config/cwm/autostart.sh
fi

if [ $DESKTOP_SESSION = '/usr/share/xsessions/cwm' ]; then
        homedir=$(echo $HOME)
        sh $homedir/.config/cwm/autostart.sh
fi
EOF

cat << EOF >> ~/.config/cwm/autostart.sh
#!/bin/sh

function run {
 if ! pgrep $1 ;
  then
    $@&
  fi
}
EOF
exit
 あとは、「~/.config/cwm/autostart.sh」に自動起動したいプログラムを追加するだけです。