Quantcast
Channel: LowEndTalk
Viewing all articles
Browse latest Browse all 39981

Graphical dialog/YAD bash script help

$
0
0

Anyone good with yad?

So basically this BASH script works fine, Debian boots into a minimal Matchbox WM environment and this script is autorun which displays a nice graphical prompt allowing entry of AD username and pass, and then the vars get passed to pyhoca-cli which logs the computer into a remote x2go-server linux terminal server.. it works without issue.

However what I want to do is add an additional drop-down selection to the YAD graphical prompt (after the first two fields), where the user can select the session (eg kde, xfce4, lxde & fluxbox), and then pass that selection to the pyhoca-cli command to replace startkde with something like start$frmdata (from the dropdown selection)...

Not sure exactly how to do this...

root@lxtrms-thinclient-colodesk:~# cat /home/colodesk/start_pyhoca.sh #!/bin/bash while true; do frmdata=$(yad --center --undecorated --image=/usr/share/wallpaper/header-mod.jpg --image-on-top --button="gtk-ok:0" --title "Login to 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 some.private.ip.addr -u $frmusername --password $frmpassword -c startkde --sound none --kbd-layout us --kbd-type pc105/us -g fullscreen --add-to-known-hosts done


Viewing all articles
Browse latest Browse all 39981

Trending Articles