aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfreerdp2-session.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/freerdp2-session.in b/freerdp2-session.in
index fe6fb62..d6a168e 100755
--- a/freerdp2-session.in
+++ b/freerdp2-session.in
@@ -22,7 +22,13 @@
socket="$HOME/.freerdp2-socket";
if [ -e "$socket" ]; then
- socat unix-connect:"$socket" - | /usr/bin/xfreerdp /sound:sys:pulse /f /from-stdin
+ AUTH_INFO="$(socat unix-connect:"$socket" -)"
+ AUTH_INFO_USER=$(echo "$AUTH_INFO" | awk '{ print $1 }')
+ AUTH_INFO_PASSWORD=$(echo "$AUTH_INFO" | awk '{ print $2 }')
+ AUTH_INFO_DOMAIN=$(echo "$AUTH_INFO" | awk '{ print $3 }')
+ AUTH_INFO_HOST=$(echo "$AUTH_INFO" | awk '{ print $4 }')
+ echo "$AUTH_INFO_PASSWORD" | /usr/bin/xfreerdp /sound:sys:pulse /f /v:"${AUTH_INFO_HOST}" /u:"${AUTH_INFO_USER} /d:"${AUTH_INFO_DOMAIN} /from-stdin
+ unse AUTH_INFO_PASSWORD
else
zenity --warning --text="Unable to locate FreeRDP socket"
fi;