Skip to content

Instantly share code, notes, and snippets.

@gannino
Forked from sgdc3/xrdpMac.sh
Last active February 28, 2020 20:38
Show Gist options
  • Save gannino/78c06c1f756a7ec8efb7986aae297b44 to your computer and use it in GitHub Desktop.
Save gannino/78c06c1f756a7ec8efb7986aae297b44 to your computer and use it in GitHub Desktop.
Xrdp install script for OSX
#!/bin/sh
echo Controllo stato csrutil....
SIP_status=`/usr/bin/csrutil status | awk '/status/ {print $5}' | sed 's/\.$//'`
if [ $SIP_status = "enabled" ]; then
echo Devo disabilitare il CSR dalla recovery mode per continuare!
echo Adesso si riavviera'' il sistema, premere simultaneamente i tasti Mac e R
echo Una volta avviata la recovery mode aprire il terminale e scrivere
echo
echo csrutil disable
echo reboot
echo
read -n1 -rsp $'Premere un tasto per continuare...\n'
sudo reboot
exit 0
fi
echo Controllo stato installazione brew...
which -s brew
if [[ $? != 0 ]] ; then
# Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
else
brew update
fi
echo Installazione dipendenze
brew install wget
brew install git
brew install autoconf
brew link autoconf
brew install automake
brew install gettext
brew install libtool
brew install pkg-config
brew install tree
brew install Caskroom/cask/xquartz
brew tap homebrew/x11
brew install freerdp
echo Compilazione e installazione openssl...
git clone https://github.com/openssl/openssl
cd openssl
./Configure darwin64-x86_64-cc
make
sudo make install
cd ..
echo Compilazione e installazione xrdp...
git clone https://github.com/neutrinolabs/xrdp
cd xrdp
./bootstrap
./configure -prefix=/usr -sysconfdir=/etc -localstatedir=/var CFLAGS="-m32 -mmacosx-version-min=10.11"
#./configure PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
make
sudo make install
cd ..
echo Modifica dei valori nel file di configurazione xrdp...
sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak
sudo sed -i '.original' 's/.so/.dylib/g' /etc/xrdp/xrdp.ini
@gannino
Copy link
Author

gannino commented Feb 28, 2020

https://mangoobyt.blogspot.com/2017/08/install-xrdp-on-osx.html

Install XRDP on OSX

Install XCode commandline tools: xcode-select --install
Install XQuartz
Install homebrew
brew install openssl
brew install pkg-config
brew install nasm
wget https://github.com/neutrinolabs/xrdp/releases/download/v0.9.3/xrdp-0.9.3.tar.gz
tar -zxvf xrdp-0.9.3.tar.gz
cd xrdp-0.9.3
./configure PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
make
sudo make install
wget https://github.com/neutrinolabs/xorgxrdp/releases/download/v0.2.3/xorgxrdp-0.2.3.tar.gz
tar -zxvf xorgxrdp-0.2.3.tar.gz
cd xorgxrdp-0.2.3
./configure PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
make
sudo make install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment