Hello I have two versions of a script that log a thin client into an x2go
server using a YAD graphical prompt which passes variables to pyhoca-cli.
The following works fine and logs you right in after entering AD username
and pass:
-----------------------------
#!/bin/bash
while true; do
frmdata=$(yad --center --undecorated
--image=/usr/share/wallpaper/sago-header-mod.jpg --image-on-top
--button="gtk-ok:0" --title "Login to Sago Linux Terminal Server" --form
--field="AD username" --field="Password:H")
frmusername=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $1 }')
frmpassword=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $2 }')
pyhoca-cli --server 10.0.201.242 -u $frmusername --password $frmpassword -c
startkde --sound none --kbd-layout us --kbd-type pc105/us -g fullscreen
--add-to-known-hosts
done
----------------------------------
However, this one, which adds a dropdown to choose a session, does not just
log in, it asked for interactive login at the console.. I don't understand
why this would be happening. Any ideas?
-----------------------------------
#!/bin/bash
while true; do
data=$(yad --center --undecorated
--image=/usr/share/wallpaper/sago-header-mod.jpg --image-on-top
--button="gtk-ok:0" --title "Login to Sago Linux Terminal Server" --form
--field="AD username" --field="Password:H" --field="Session:CB" "" ""
"kde!gnome!cinnamon!xfce!lxde!fluxbox")
eval $(echo $data | awk 'BEGIN {FS="|" } { printf
"user=%s\npass=%s\nsession=%s", $1, $2, $3 }')
case $session in
kde) cmd="startkde" ;;
gnome) cmd="gnome-session" ;;
cinnamon) cmd="gnome-session-cinnamon2d" ;;
xfce) cmd="startxfce4" ;;
lxde) cmd="startlxde" ;;
fluxbox) cmd="startfluxbox" ;;
esac
pyhoca-cli --server 10.0.201.242 -u $user --password $pass -c $cmd --sound
none --kbd-layout us --kbd-type pc105/us -g fullscreen --add-to-known-hosts
done
-----------------------------------
The following shows the messages on the 2nd script when testing:
Xlib.protocol.request.QueryExtension
pyhoca-cli[2083] NOTICE: preparing requested X2Go session
pyhoca-cli[2083] (PyHocaCLI) NOTICE: preparing requested X2Go session
pyhoca-cli[2083] (x2gosessregistry-pylib) NOTICE: registering X2Go session
Pyhoca-Client_Session...
pyhoca-cli[2083] (x2goclient-pylib) NOTICE: initializing X2Go session...
pyhoca-cli[2083] (x2gocontrolsession-pylib) NOTICE: connecting to
[10.0.201.242]:22
pyhoca-cli[2083] (x2gosession-pylib) NOTICE: SSH host key verification for
host [10.0.201.242]:22 with SSH-RSA fingerprint
,,7a:91:b6:50:99:3b:f3:61:86:7a:84:24:89:e1:6e:a6'' initiated. We are
seeing this X2Go server for the first time.
pyhoca-cli[2083] (x2goclient-pylib) WARN: HOOK_check_host_dialog: host
check requested for session profile Pyhoca-Client_Session: Automatically
adding host [10.0.201.242]:22 with fingerprint:
,,7a:91:b6:50:99:3b:f3:61:86:7a:84:24:89:e1:6e:a6'' as a known host.
pyhoca-cli[2083] (x2gosession-pylib) NOTICE: SSH host key verification for
host [10.0.201.242]:22 with SSH-RSA fingerprint
,,7a:91:b6:50:99:3b:f3:61:86:7a:84:24:89:e1:6e:a6'' initiated. We are
seeing this X2Go server for the first time.
pyhoca-cli[2083] (x2goclient-pylib) WARN: HOOK_check_host_dialog: host
check requested for session profile Pyhoca-Client_Session: Automatically
adding host [10.0.201.242]:22 with fingerprint:
,,7a:91:b6:50:99:3b:f3:61:86:7a:84:24:89:e1:6e:a6'' as a known host.
pyhoca-cli[2083] (PyHocaCLI) NOTICE: interactive login for user ,,jgb3025''
Password:
--------------------------------------------------------
Thanks for any possible help on this!
--
*"It is only when each individual has achieved inner peace that we will see
lasting outer peace in the world"
*