в автозапуске wm стоит скрипт .dwm/autostart.sh, который запускает нужные программы. Дело в том, что иногда не запускаются то терминал, то keepassx, иногда даже не запускается chrome. Как переделать так, чтобы запускалось всё ?
cat .dwm/autostart.sh | egrep -v "(^#.*|^$)"
sleep 0.1
imwheel &
sleep 0.1
kbdd &
sleep 0.1
$HOME/.dwm/scripts/startup/client/keepassx.sh;
sleep 0.1
$HOME/.dwm/scripts/startup/client/terminal.sh;
sleep 0.1
$HOME/.dwm/scripts/startup/client/chrome.sh
sleep 0.1
$HOME/.dwm/scripts/startup/client/rtorrent_client.sh &
sleep 0.1
if [[ -x "$(command -v icedove)" ]]; then
sudo -u user sh -c 'icedove 2>/dev/null &'
fi
$HOME/.dwm/scripts/startup/client/skype.sh
sleep 0.1
$HOME/.dwm/scripts/startup/client/tkabber.sh
sleep 0.1
$HOME/.dwm/scripts/startup/daemon/thunar.sh
sleep 0.1
$HOME/.dwm/scripts/startup/daemon/utorrent.sh
sleep 0.1
$HOME/.dwm/scripts/startup/client/xchat.sh
exit 0
cat $HOME/.dwm/scripts/startup/client/keepassx.sh | egrep -v "(^#.*|^$)"
ABBR='keepassx'
PROGRAM='keepassx'
me=`basename $0`;
running=`ps h -C $me | grep -v $$ | wc -l`;
[[ $running > 1 ]] && exit;
ps -ef | grep opt | grep -n ${PROGRAM} | awk '{print $2}' | xargs kill -9
running=`ps h -C ${PROGRAM} | grep -v $$ | wc -l`;
[[ $running = 0 ]] && sudo -u user sh -c "${ABBR} 2>/dev/null &";
cat $HOME/.dwm/scripts/startup/client/terminal.sh | egrep -v "(^#.*|^$)"
me=`basename $0`;
running=`ps h -C $me | grep -v $$ | wc -l`;
[[ $running > 1 ]] && exit;
for i in 1 2
do
cd $HOME;bash -c 'st -c my_tag3 -e tmux' &
done;
for i in 1 2
do
cd $HOME;bash -c 'st -c my_tag2 -e sudo tmux' &
done;
cat $HOME/.dwm/scripts/startup/client/chrome.sh | egrep -v "(^#.*|^$)"
ABBR='google-chrome'
PROCESS='chrome'
KillExistsProcess()
{
while true; do
for i in `ps h -C ${PROCESS} | grep -v $$ | awk '{print $1}'| uniq`;
do
kill -9 ${i};
done
sleep 1
running=`ps h -C ${PROCESS} | grep -v $$ | wc -l`;
[[ $running = 0 ]] && break;
done
}
KillExistsProcess
running=`ps h -C ${PROCESS} | grep -v $$ | wc -l`;
if [[ $running = 0 ]]; then
# rm -rf ~/.local/share/keyrings/*
sudo -u user sh -c "${ABBR} 2>/dev/null &"
else
KillExistsProcess
fi