Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using dwm on an opensuse box where I don't have root permissions. I launch dwm using "custom session" from KDM, which executes my .xsession.

$ cat .xsession
exec ~/bin/startdwm

cat ~/bin/startdwm
#!/bin/bash

xscreensaver -nosplash &
ivman &
while true
do
xsetroot -name "$(date +"%H:%M:%S|%d-%m")"
sleep 1 
done &
exec /home/nahum/bin/dwm > .dwm.log

The problem I have is the following: I exit this session with WIN+SHIFT+Q, I have always a process left over ivman and sleep. How do I kill them?

Thanks, Oz

share|improve this question

1 Answer 1

up vote 1 down vote accepted

After doing the exec there's not much you can do. Without that, you could save the background PIDs twice and kill them later when dwm terminates.

ivman &
IVMAN_PID=$!
...
/home/nahum/bin/dwm > .dwm.log
kill $IVMAN_PID
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.