Skip to content

Instantly share code, notes, and snippets.

@ElToro1966
Created October 10, 2018 06:40
Show Gist options
  • Save ElToro1966/1cfbc64249db62fa3f2fb3b2ab475c9c to your computer and use it in GitHub Desktop.
Save ElToro1966/1cfbc64249db62fa3f2fb3b2ab475c9c to your computer and use it in GitHub Desktop.
Post Ubuntu 18.*.* Install Script
#!/bin/sh
# installation of additional software for Ubuntu 18.* #
# tested on Ubuntu Budgie 18.04 #
# TODO: functions for checking network, previous install, working install
# check if a network connection is available #
ping -c 1 8.8.8.8
if [ $? != 0 ]
then
echo "No network available. Set up network via netplan - /etc/netplan/"
exit
fi
# update & upgrade #
echo "Root credentials needed to continue:"
echo
sudo apt update
sudo apt -y upgrade
echo "installing gnome-terminal (helper program)"
echo
sudo apt -y install gnome-terminal
# add Nextcloud #
echo "Add nextcloud client? (Yy/Nn)"
read answer
if [ "$answer" = "Y" ] || [ "$answer" = "y" ]
then
sudo add-apt-repository ppa:nextcloud-devs/client
sudo apt update
sudo apt -y install nextcloud-client
fi
# add Dropbox #
echo "Add Dropbox client? (Yy/Nn)"
read answer
if [ "$answer" = "Y" ] || [ "$answer" = "y" ]
then
# install #
sudo apt -y install nautilus-dropbox
dropbox update
# configure #
dropbox autostart y
fi
# add Mozilla Firefox, Thunderbird and Lightning (calendar) #
# (for Bungie and other Ubuntu versions that does not have these preinstalled) #
# TODO: Check that firefox, googler and thunderbird isn't installed already. #
sudo apt -y install firefox
sudo apt -y install googler
sudo apt -y install thunderbird
sudo apt -y install xul-ext-lightning
# fix issue with icons in email-list
sudo apt-get install fonts-symbola
# TODO: Run Thunderbird and Firefox to establish profiles #
# copy Thunderbird and Mozilla profiles, if they are accessible #
# see also https://support.mozilla.org/en-US/kb/moving-thunderbird-data-to-a-new-computer #
echo "Add existing Thunderbird profile? (Yy/Nn)"
read answer
# TODO: Find both existing profiles and target directories. Present alternativeswhen present #
# TODO: Change profile.ini: ALter profile name to copied profile #
if [ "$answer" = "Y" ] || [ "$answer" = "y" ]
then
echo "Specify Thunderbird profile path:"
read tbprofilepath
echo "Specify Thunderbird file name - *******.default (exclude .default):"
read tbprofilefile
cp -r "$tbprofilepath"/"$tbprofilefile".default ~/.thunderbird/"$tbprofilefile".default
fi
echo "Add existing Firefox profile? (Yy/Nn)"
read answer
if [ "$answer" = "Y" ] || [ "$answer" = "y" ]
then
echo "Specify Firefox profile path:"
read ffprofilepath
echo "Specify Firefox file name - *******.default (exclude .default):"
read ffprofilefile
cp -r "$ffprofilepath"/"$ffprofilefile" ~/.mozilla/firefox/"$ffprofilefile".default
fi
# Internationalization #
# Spell-checkers for Firefox, Thunderbird and LibreOffice #
# For a complete list of available languages, see #
# https://github.com/hunspell/hunspell/wiki/Dictionary-Packages #
echo
echo "Adding dictionaries for spell checking"
sudo apt -y install hunspell-da
sudo apt -y install hunspell-de-de
sudo apt -y install hunspell-es
sudo apt -y install hunspell-el
sudo apt -y install hunspell-fr-modern
sudo apt -y install hunspell-gl
sudo apt -y install hunspell-no
sudo apt -y install hunspell-pt-pt
sudo apt -y install hunspell-sv
# add Chromium, if not installed already #
sudo apt -y install chromium-browser
# add languages to Chromium #
python - << EOF
import json
import os
data = json.load(open(os.path.expanduser("~/.config/chromium/Default/Preferences"), 'r'))
data['intl'] = {"accept_languages": "en-US,en,nb,fr-FR,gl,de,pt-PT,es-ES,sv"}
data['spellcheck'] = {"dictionaries":["en-US","nb","de","pt-PT","es-ES","sv"],"dictionary":""}
with open(os.path.expanduser('~/.config/chromium/Default/Preferences'), 'w') as outfile:
json.dump(data, outfile)
EOF
# Keyboard layouts #
# All available settings can be found in ./usr/share/X11/xkb/rules/xorg.lst #
gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'es'), ('xkb', 'no'), ('xkb', 'gr')]"
# MiSCELLANEOUS APPS & TOOLS #
sudo apt -y install gimp
sudo apt -y install keepass2
#TODO: copy keepass profile
#sudo apt -y install firejail
sudo apt -y install openvpn
sudo apt -y install nmap
sudo apt -y install moreutils
sudo apt -y install smartmontools
sudo apt -y install geany
sudo apt -y install mplayer
sudo apt -y install smplayer
sudo apt -y install minitube
sudo apt -y install ubuntu-restriced-extras
sudo apt -y install corebird
#TODO: copy corebird profile
sudo apt -y install firejail
sudo apt -y install vlc
sudo apt -y install abcde
sudo apt -y install flac
sudo apt -y install elinks
sudo apt -y install xtightvncviewer
# DEVELOPER SPECIFIC #
sudo apt -y install vim
sudo apt -y install git
sudo apt -y install jq
sudo apt -y install docker.io
sudo snap install heroku --classic
cd ~/Downloads
sudo -s
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.20.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
sudo apt -y install tree
sudo apt-get install git-lfs
sudo apt -y install python-pip
pip -V
# setting up virtual environments
geckodriver --version
# TODO: If not geckodriver..."geckodriver: command not found"
# TODO: Check for latest lin64 & compare #
cd ~/Downloads
wget "https://github.com/mozilla/geckodriver/releases/download/v0.20.1/geckodriver-v0.20.1-linux64.tar.gz"
gunzip geckodriver-v0.20.1-linux64.tar.gz
tar -xvf geckodriver-v0.20.1-linux64.tar
sudo cp geckodriver-v0.20.1-linux64 //usr/local/bin/
cd -
echo 'PATH=//usr/local/bin:$PATH' >> ~/.bashrc
# Install virtualenvwrapper (to use with virtualenv)
sudo -H pip install virtualenvwrapper
# and make bash load virtualenvwrapper automatically
echo "source virtualenvwrapper.sh" >> ~/.bashrc
source ~/.bashrc
#make virtual environments
sudo apt install python3-distutils
mkvirtualenv --python=python3.6 superlists
workon superlists
pip install "django<1.12" "selenium<4"
pip install requests
deactivate
mkvirtualenv --python=python3.6 django_python3
workon django_python3
pip install "django" "selenium"
pip install requests
deactivate
mkvirtualenv --python=python3.6 sqlalc_python3
workon sqlalc_python3
pip install sqlalchemy
pip install selenium
pip install requests
deactivate
mkvirtualenv --python=python3.6 flask_python3
workon flask_python3
pip install flask
pip install selenium
pip install requests
deactivate
# NETWORK SPECIFIC #
sudo apt -y install nfs-common
# DECRYPTION #
# libdvdcss
cd ~/Downloads
echo deb http://download.videolan.org/pub/debian/stable/ / | sudo tee -a /etc/apt/sources.list
echo deb-src http://download.videolan.org/pub/debian/stable/ / | sudo tee -a /etc/apt/sources.list
wget -O - http://download.videolan.org/pub/debian/videolan-apt.asc | sudo apt-key add -
sudo apt update
sudo apt -y upgrade
sudo apt -y install libdvd-pkg
sudo dpkg-reconfigure --terse libdvd-pkg
# SECURITY #
# tor
mkdir ~/Tor
sudo wget --random-wait --retry-connrefused "https://www.torproject.org/dist/torbrowser/8.0/tor-browser-linux64-8.0_en-US.tar.xz" -P ~/Tor/
sudo tar -xvJf ~/Tor/tor-browser-linux64-8.0_en-US.tar.xz -C ~/Tor
# TODO: Copy Tor-profile
# TODO
# copy OpenVPN certificates to /etc/openvpn #
# sudo cp ~/.install/vpn/* /etc/openvpn
# sudo /etc/init.d/openvpn restart
# time needed to connect to the VPN server (30s with reserve) and mounting drives #
# sleep 30 && sudo mount -a
# MISCELLANEOUS #
# REMOVE some unneeded apps #
sudo apt -y remove geary
# TODO: Add shortcuts to pop-up side-menu #
@ElToro1966
Copy link
Author

To run after installing Ubuntu 18.*. Some work remaining.

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