Skip to content

Instantly share code, notes, and snippets.

@pleasemarkdarkly
Last active November 20, 2020 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pleasemarkdarkly/f3745a93d67e9b6fac9031287cb2b434 to your computer and use it in GitHub Desktop.
Save pleasemarkdarkly/f3745a93d67e9b6fac9031287cb2b434 to your computer and use it in GitHub Desktop.
#!/bin/bash
# os check gist / wget -O -https://bit.ly/31UIrbw | bash
# os check builtin
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
platform='darwin'
fi
if [[ $platform == 'linux' ]]; then
echo "linux...continue"
elif [[ $platform == 'darwin' ]]; then
echo "darwin...exit"
exit 0;
fi
arch=`uname -p`
if [[ "$arch" == 'aarch64' ]]; then
echo "architecture ($arch) is compatiable with script...continue"
elif [[ "$arch" == 'armhf' ]]; then
echo "architecture ($arch) is compatiable with script...continue"
# echo "architecture ($arch) is not compatiable with script"
elif [[ "$arch" == 'x86_64' ]]; then
echo "architecture ($arch) is compatiable with script...continue"
exit
else
echo "unhandled architecture ($arch) case..."
exit
fi
echo "install x2go prereqs"
sudo apt-get install \
libc6 \
lsof \
bc \
openssh-server \
openssh-client \
libconfig-simple-perl \
pwgen libdbd-pg-perl \
libdbd-sqlite3-perl \
libfile-basedir-perl \
libcapture-tiny-perl \
adduser \
xauth \
psmisc \
net-tools \
sshfs x11-apps \
x11-session-utils \
x11-utils \
x11-xfs-utils \
x11-xkb-utils \
x11-xserver-utils \
fontconfig \
xinit \
xfonts-base \
x11-common
wget https://cloudfront.debian.net/debian-archive/debian/pool/main/libj/libjpeg8/libjpeg8-dev_8d-1+deb7u1_armhf.deb
sudo dpkg --force-conflicts --force-depends -i ./libjpeg8-dev_8d-1+deb7u1_armhf.deb
rm libjpeg8-dev_8d-1+deb7u1_armhf.deb
# https://github.com/Automattic/node-canvas/issues/524
sudo apt-get install \
libcairo2-dev \
libjpeg62-turbo-dev \
libpango1.0-dev \
libgif-dev \
build-essential \
g++
echo "https://github.com/kapolos/armhf-x2go.git"
git clone https://github.com/kapolos/armhf-x2go.git
cd armhf-x2go-master/
sudo dpkg --force-depends -i *.deb
sudo apt-get -f install
cat<<EOF
WILL INSTALL ===> cups cups-client cups-common cups-core-drivers cups-daemon cups-filters cups-filters-core-drivers
cups-ppdc cups-server-common desktop-file-utils ghostscript gsfonts libcupscgi1 libcupsmime1
libcupsppdc1 libfile-which-perl libfontembed1 libqpdf13 poppler-utils ssl-cert
EOF
echo "sudo apt-get install x2goclient on the remote machine"
echo "run x2goclient and type (server ip address) and your username and pwd as your remote ssh access"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment