I have the same problem with xsel. I do not know what causes it, but my workaround is to put my command inside a shell script and run the shell script instead. -- .