Mercurial > hg > dml-home
comparison etc/setup_as_root.sh @ 81:85ab26e84d4e dml-dockerised
more unsupervised
author | wolffd <wolffd.mail@googlemail.com> |
---|---|
date | Mon, 04 Jun 2018 18:21:56 +0100 |
parents | ad0bfbaddf6a |
children | f75c7bc1d3c1 |
comparison
equal
deleted
inserted
replaced
80:ad0bfbaddf6a | 81:85ab26e84d4e |
---|---|
1 #!/bin/sh | 1 #!/bin/bash |
2 # ---------------------- CONFIGURATION PART ---------------------- | 2 # ---------------------- CONFIGURATION PART ---------------------- |
3 | 3 |
4 HAVE_MATLAB=no | 4 HAVE_MATLAB=no |
5 SWI_GUI=no | 5 SWI_GUI=no |
6 SETUP_X=yes | 6 SETUP_X=yes |
38 # exit 1 | 38 # exit 1 |
39 #fi | 39 #fi |
40 DO= | 40 DO= |
41 fi | 41 fi |
42 # APT GET installs | 42 # APT GET installs |
43 $DO apt-get install build-essential autoconf mercurial git pkg-config screen | 43 $DO apt-get install -y build-essential autoconf mercurial git pkg-config screen |
44 $DO apt-get install libossp-uuid-dev libssl-dev zlib1g-dev unixodbc-dev libsmf-dev libsqlite3-dev | 44 $DO apt-get install -y libossp-uuid-dev libssl-dev zlib1g-dev unixodbc-dev libsmf-dev libsqlite3-dev |
45 $DO apt-get install graphviz lilypond pdf2svg texlive-font-utils p7zip-full | 45 $DO apt-get install -y graphviz lilypond pdf2svg texlive-font-utils p7zip-full |
46 $DO apt-get install vorbis-tools lame sox faad flac libsox-fmt-all fluidsynth | 46 $DO apt-get install -y vorbis-tools lame sox faad flac libsox-fmt-all fluidsynth |
47 $DO apt-get install mysql-server-5 libmyodbc | 47 $DO apt-get install -y mysql-server-5 libmyodbc |
48 | 48 |
49 # Only if you want SWI Prolog GUI | 49 # Only if you want SWI Prolog GUI |
50 if [ $SWI_GUI == yes ]; then | 50 if [ $SWI_GUI == yes ]; then |
51 $DO apt-get install libxpm-dev libxt-dev libjpeg-dev libx11-dev libxft-dev libxinerama1 libfontconfig1-dev | 51 $DO apt-get install -y libxpm-dev libxt-dev libjpeg-dev libx11-dev libxft-dev libxinerama1 libfontconfig1-dev |
52 fi | 52 fi |
53 | 53 |
54 # If you have MATLAB | 54 # If you have MATLAB |
55 if [ $HAVE_MATLAB == yes ]; then | 55 if [ $HAVE_MATLAB == yes ]; then |
56 DO=$DO DRY_RUN=$DRY_RUN as_root.d/init_matlab.sh | 56 DO=$DO DRY_RUN=$DRY_RUN as_root.d/init_matlab.sh |
61 | 61 |
62 if [ $SETUP_X == yes ]; then | 62 if [ $SETUP_X == yes ]; then |
63 echo "Setting up X server..." 1>&2 | 63 echo "Setting up X server..." 1>&2 |
64 if [ $HEADLESS == yes ]; then | 64 if [ $HEADLESS == yes ]; then |
65 echo "Installing dummy video driver for headless X server..." 1>&2 | 65 echo "Installing dummy video driver for headless X server..." 1>&2 |
66 $DO apt-get install xinit xserver-xorg-video-dummy | 66 $DO apt-get install -y xinit xserver-xorg-video-dummy |
67 | 67 |
68 $DO install --mode=644 -bC xorg.conf /etc/X11 | 68 $DO install --mode=644 -bC xorg.conf /etc/X11 |
69 else | 69 else |
70 echo "Installing X server and window manager..." 1>&2 | 70 echo "Installing X server and window manager..." 1>&2 |
71 $DO apt-get install xinit blackbox | 71 $DO apt-get install -y xinit blackbox |
72 fi | 72 fi |
73 | 73 |
74 if [ $DRY_RUN == yes ]; then | 74 if [ $DRY_RUN == yes ]; then |
75 $DO dpkg-reconfigure x11-common | 75 $DO sudo sed -i \ |
76 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config | |
77 | |
76 else | 78 else |
77 echo | 79 echo |
78 echo "I am about to configure x11-common." | 80 echo "I am about to configure x11-common." |
79 #echo "Please select 'Anybody' to allow dml to start the X server automatically." | 81 #echo "Please select 'Anybody' to allow dml to start the X server automatically." |
80 #echo "Press RETURN to continue." | 82 #echo "Press RETURN to continue." |
81 #read | 83 #read |
82 #$DO dpkg-reconfigure x11-common | 84 #$DO dpkg-reconfigure x11-common |
83 sudo sed -i \ | 85 $DO sudo sed -i \ |
84 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config | 86 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config |
85 fi | 87 fi |
86 fi | 88 fi |
87 | 89 |