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