aboutsummaryrefslogtreecommitdiff
path: root/freerdp2-session.in
diff options
context:
space:
mode:
Diffstat (limited to 'freerdp2-session.in')
-rwxr-xr-xfreerdp2-session.in75
1 files changed, 0 insertions, 75 deletions
diff --git a/freerdp2-session.in b/freerdp2-session.in
deleted file mode 100755
index 571330f..0000000
--- a/freerdp2-session.in
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/bash
-
-#
-# Copyright © 2018 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
-# Copyright © 2012 Canonical Ltd.
-#
-# This program is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranties of
-# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
-# Author lightdm-remote-session-freerdp (where we forked from): Ted Gould <ted@canonical.com>
-#
-
-NULL=
-FREERDP2_OPTIONS=""
-
-if [ -f /etc/default/lightdm-remote-session-freerdp2 ]; then
- . /etc/default/lightdm-remote-session-freerdp2
-fi
-
-socket="$HOME/.freerdp2-socket";
-if [ -e "$socket" ]; then
- 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 }')
-
- # FIXME: it seems, pulseaudio is not started at this point for the guest user
- # However, launching it here with pulseaudio -D feels wrong in the age of systemd
-
- # give the RDP server a little bit of time to recover from libpam-freerdp2's freerdp2-auth-check test connect.
- sleep 1
-
- FREERDP2_OPTIONS="/f \
- /v:"${AUTH_INFO_HOST}" \
- /u:"${AUTH_INFO_USER}" \
- /d:"${AUTH_INFO_DOMAIN}" \
- /from-stdin \
- -toggle-fullscreen \
- ${FREERDP2_OPTIONS} \
- ${NULL}"
-
- logger -t $(basname $0) "xfreerdp called with options: ${FREERDP_OPTIONS}."
-
-
- # FIXME: get audio working... add /sound:sys:pulse to xfreerdp cmdline args...
- echo "$AUTH_INFO_PASSWORD" | /usr/bin/xfreerdp ${FREERDP_OPTIONS} 2>&1 \
- | logger -t lightdm-remote-session-freerdp2 -- \
- ${NULL} &
-
- unset AUTH_INFO_PASSWORD
-
- # wait for another second to give the xfreerdp process to settle in process list
- sleep 1
-
- USERID=$(id -u)
- wait $(pgrep -u ${USERID} xfreerdp)
-
- # FIXME: possibly stop pulseaudio here with -k again (we have seen permissioned denied warnings, when doing this. Better approaches?)
-
-else
- zenity --warning --text="Unable to locate FreeRDP socket"
-fi;
-
-rm -f "$socket"