Created
December 2, 2016 12:47
-
-
Save sgdc3/e870b365dbd060eeb9bd776b4f465d19 to your computer and use it in GitHub Desktop.
Xrdp install script for OSX
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
#!/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