#!/bin/bash ## Must not use $HOME for zaitcevx, it points to zaitcev's $HOME. blitzchunk=$HOME/blitz-chunk if [ \! \( -f /bin/cat -a -f /usr/bin/xclip \) ]; then echo "blitz: No cat or xclip" >&2 fi # Use a file for trace / debugging. A pipe is too anonymous. /bin/cat > "$blitzchunk" # # The xclip places itself into background by default, but does not daemonize # correctly, so ssh hangs. Therefore, we background it by hand from shell. # The option -quiet makes xclip to run in the foreground. DISPLAY=:0.0 /usr/bin/xclip -quiet -selection clipboard "$blitzchunk" >/dev/null 2>&1