Skip to content

Instantly share code, notes, and snippets.

@sgdc3
Created December 2, 2016 12:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save sgdc3/e870b365dbd060eeb9bd776b4f465d19 to your computer and use it in GitHub Desktop.
Save sgdc3/e870b365dbd060eeb9bd776b4f465d19 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"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment