<div dir="ltr"><div><br></div><div style>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.</div><div style><br></div><div style>
The following works fine and logs you right in after entering AD username and pass:</div><div style><br></div><div style>-----------------------------</div><div style><div>#!/bin/bash</div><div>while true; do</div><div>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")</div>
<div>frmusername=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $1 }')</div><div>frmpassword=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $2 }')</div><div>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</div>
<div>done</div></div><div>----------------------------------</div><div><br></div><div style>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?</div>
<div style><br></div><div>-----------------------------------</div><div>#!/bin/bash</div><div><br></div><div>while true; do</div><div><br></div><div>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")</div>
<div><br></div><div>eval $(echo $data | awk 'BEGIN {FS="|" } { printf "user=%s\npass=%s\nsession=%s", $1, $2, $3 }')</div><div><br></div><div>case $session in</div><div> kde) cmd="startkde" ;;</div>
<div> gnome) cmd="gnome-session" ;;</div><div> cinnamon) cmd="gnome-session-cinnamon2d" ;;</div><div> xfce) cmd="startxfce4" ;;</div><div> lxde) cmd="startlxde" ;;</div><div> fluxbox) cmd="startfluxbox" ;;</div>
<div>esac</div><div><br></div><div>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</div><div><br></div><div>done</div>
<div>-----------------------------------</div><div><br></div><div style>The following shows the messages on the 2nd script when testing:</div><div style><br></div><div style><div>Xlib.protocol.request.QueryExtension</div>
<div>pyhoca-cli[2083] NOTICE: preparing requested X2Go session</div><div>pyhoca-cli[2083] (PyHocaCLI) NOTICE: preparing requested X2Go session</div><div>pyhoca-cli[2083] (x2gosessregistry-pylib) NOTICE: registering X2Go session Pyhoca-Client_Session...</div>
<div>pyhoca-cli[2083] (x2goclient-pylib) NOTICE: initializing X2Go session...</div><div>pyhoca-cli[2083] (x2gocontrolsession-pylib) NOTICE: connecting to [10.0.201.242]:22</div><div>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.</div>
<div>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.</div>
<div>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.</div>
<div>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.</div>
<div>pyhoca-cli[2083] (PyHocaCLI) NOTICE: interactive login for user ,,jgb3025''</div><div>Password:</div></div><div>--------------------------------------------------------</div><div><br></div><div style>Thanks for any possible help on this!</div>
<div><br></div>-- <br><b><font color="#888888">"It is only when each individual has achieved inner peace that we will see lasting outer peace in the world" <br></font></b>
</div>