Rob and Suraj, thanks for your answers.
>> You're using exec, once that line is reached, bash replaces itself >> with wmii. >> Just use "wmii" instead, or even: > > Correct. Indeed, the "exec" was the problem, I did't know that this is what evec is about. >> wmii || xmessage "Restart..." >> that way (assuming wmii returns 0 on successful exit) when you mean to >> exit, it's all fine. > > I recommend showing the xmessage in all cases (not just for non-zero > exit status) because sometimes you might accidentally exit wmii when > you did not really intend to (thinking about something + your brain on > auto-pilot + your fingers acting with muscle memory). Yes, I left the xmessage in for all return values, too. It is much saver that way (at least for me). Cheers, Tom