What's the * for? You don't really want to remove every file starting with ".xsession-errors", you ONLY want to remove the file ".xsession-errors". I'd suggest doing:
sh -c 'rm -f ~/.xsession-errors'
What's the * for? You don't really want to remove every file starting with ".xsession-errors", you ONLY want to remove the file ".xsession-errors". I'd suggest doing:
sh -c 'rm -f ~/.xsession-errors'