Advertisement
Guest User

nixperience

a guest
Dec 19th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/bash
  2. [ -d $HOME/.screenshots ] || echo 'creating "~/.screenshots" directory' && mkdir -p $HOME/.screenshots
  3. DIR="/home/$USER/.screenshots"
  4. TARGET="$DIR/screenshot.$1.$(date -Iseconds).png"
  5. [ -z $2 ] || LOGIN="-l $2"
  6. ssh $1 $LOGIN 'DISPLAY=:0 xwd -root | convert xwd:- png:-' > $TARGET
  7. DISPLAY=:0 notify-send "Скриншот с $1 получен и сохранён как $TARGET"
  8. display $TARGET &
  9. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement