Use %q over %s in the clipboard test.
Try xsel over xclip for clipboard support on Linux.