#!/bin/sh # This part runs on local machine, usually from a GNOME or KDE menu. if [ -f /usr/bin/xsel ]; then xcmd="/usr/bin/xsel -b -o" elif [ -f /usr/bin/xclip ]; then xcmd="/usr/bin/xclip -selection clipboard -o" else echo "blitz-to: No xsel nor xclip" >&2 exit 1 fi if [ \! -f /usr/bin/ssh ]; then echo "blitz-to: No ssh" >&2 exit 1 fi if [ "$#" != 1 ]; then echo "Usage: blitz-to hostname" >&2 exit 1 fi # This echo appears in the empty terminal window. echo Blitzing... exec $xcmd | /usr/bin/ssh "$1" blitz