rdp (623B)
1 #!/bin/sh 2 3 # to be used with the rdpmenu script 4 5 set -x 6 7 if test -z "$1"; then 8 echo "Usage: ./rdp <server_name>" 9 exit 10 fi 11 12 RDP_FILE="$XDG_DATA_HOME/rdp/$1" 13 CONN_SETTINGS="/size:1920x1080 /dynamic-resolution /from-stdin /cert:tofu /tls:seclevel:0 -grab-keyboard" 14 CONN_SERVER=$(cat $RDP_FILE | grep "server=" | sed "s/server=//") 15 CONN_USER=$(cat $RDP_FILE | grep "user=" | sed "s/user=//") 16 CONN_PASS=$(cat $RDP_FILE | grep "pass=" | sed "s/pass=//") 17 CONN_DOMAIN=$(cat $RDP_FILE | grep "domain=" | sed "s/domain=//") 18 19 pass show "$CONN_PASS" | xfreerdp /v:"$CONN_SERVER" /u:"$CONN_USER" /d:"$CONN_DOMAIN" $CONN_SETTINGS