Created
August 23, 2015 18:07
-
-
Save YuriyGuts/a8d0ce8fb73e9feb8689 to your computer and use it in GitHub Desktop.
Connect to a Remote Desktop (RDP) session through TS Gateway on Linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
GATEWAY=gateway.company.com | |
DOMAIN=company.local | |
RESOLUTION=1920x1080 | |
if [ -z "$1" ]; then | |
read -p "Computer name (e.g. CP1234): " COMPUTERNAME | |
else | |
COMPUTERNAME=$1 | |
fi | |
if [ -z "$2" ]; then | |
read -p "Username: " USERNAME | |
else | |
USERNAME=$2 | |
fi | |
if [ -z "$3" ]; then | |
read -s -p "Password: " PASSWORD | |
else | |
PASSWORD=$3 | |
fi | |
echo | |
echo "Running FreeRDP..." | |
echo | |
xfreerdp /cert-ignore /sec:nla \ | |
/size:$RESOLUTION /bpp:24 /rfx +smartsizing +fonts +aero +clipboard +async-input +async-update -offscreen-cache -glyph-cache \ | |
/v:$COMPUTERNAME.$DOMAIN \ | |
/d:$DOMAIN \ | |
/u:$USERNAME@$DOMAIN \ | |
/p:$PASSWORD \ | |
/g:$GATEWAY \ | |
/gd:$DOMAIN \ | |
/gu:$USERNAME@$DOMAIN \ | |
/gp:$PASSWORD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install a beta version of FreeRDP that supports TSG Gateway connections. | |
# | |
# Based on the official instructions at: | |
# https://github.com/FreeRDP/FreeRDP/wiki/Compilation | |
# | |
# Install prerequisite libs | |
sudo apt-get update | |
sudo apt-get install build-essential git-core cmake libssl-dev libx11-dev libxext-dev libxinerama-dev libxcursor-dev libxdamage-dev libxv-dev libxkbfile-dev libasound2-dev libcups2-dev libxml2 libxml2-dev libxrandr-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libxi-dev libgstreamer-plugins-base1.0-dev libavutil-dev libavcodec-dev libcunit1-dev libdirectfb-dev libxtst-dev | |
# Clone the source code | |
git clone git://github.com/FreeRDP/FreeRDP.git FreeRDP | |
# Check out an older branch that actually works | |
# 1.2.0+ versions seem to have an issue with TSG authentication | |
cd FreeRDP | |
git checkout 1.1.0-beta+2013071101 | |
# Generate Makefile | |
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_SSE2=ON -DWITH_FFMPEG=OFF -DWITH_XINERAMA=OFF -DWITH_XCURSOR=OFF . | |
# Compile | |
make | |
# Install the binaries to the system | |
sudo make install | |
# Link the shared libraries | |
echo '/usr/local/lib/freerdp' | sudo tee /etc/ld.so.conf.d/freerdp.conf | |
sudo ldconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment