From b0cd6082e49167322586ed863d3fcadbea7515ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mario=20H=C3=B6llein?= Date: Wed, 5 Feb 2020 15:03:36 +0100 Subject: [PATCH] -auth kann jetzt auch explizit angegeben werden --- getScreen | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/getScreen b/getScreen index 04e8d9f..02594ff 100755 --- a/getScreen +++ b/getScreen @@ -5,4 +5,8 @@ if [ $1 = "" ]; then echo "xvnc_scanrechner scanhost" fi echo "Passwort für root auf $1 eingeben:" -ssh -t -L 5900:localhost:5900 root@${1} "x11vnc -localhost -nolookup -nopw -display :0 -auth \$(ps axuww | egrep 'Xorg.*-auth' | grep -v egrep | sed -e 's#^.*-auth *##' | awk '{print \$1}')" +if [ $2 != "" ]; then + ssh -t -L 5900:localhost:5900 root@${1} "x11vnc -localhost -nolookup -nopw -display :0 -auth $2 " +else + ssh -t -L 5900:localhost:5900 root@${1} "x11vnc -localhost -nolookup -nopw -display :0 -auth \$(ps axuww | egrep 'Xorg.*-auth' | grep -v egrep | sed -e 's#^.*-auth *##' | awk '{print \$1}')" +fi -- 2.43.0