Copy and paste: `xsel`(see [here](/aw/os/shell/CopyPaste)) `xclip`. ## Pasting an Image with xclip ```bash xclip -selection clipboard -t image/png -o > "image_file.png" ``` for which I have written a simple script ```bash #!/bin/bash o="$1" if [ -n "$CLOBBER" -a -e "$o" ]; then /bin/rm -f "$o" || { echo "can't overwrite $o"; exit 1; } elif [ -e "$o" ]; then echo "Not overwriting $o" exit 2 fi xclip -selection clipboard -t image/png -o > "$o" ``` so that I need only type ```bash paste_png image_file.png ``` or ```bash CLOBBER=y paste_png image_file.png ``` (I could make it easier to clobber if I find I'm doing it alot, but of course you could `export CLOBBER=y` so that you don't have to use `CLOBBER` on every command. That's why I'm a fan of allowing the use of environment variables for most options of a command.)