Table of Contents
Ubuntu 18.04, SciProg, AMC, V002
Image name: UB_18.04_EE_SciProg_AMC_2020-04-19_V002_rb
Created for the Summer Semester 2020, the Corona Semester
Description
Ubuntu 18.04 Desktop Image to support the courses Scientific Programming (SciProg) and Applied Measurement and Control (AMC) of the 'Environment and Energy' study program at the Rhine-Waal University of Applied Sciences. Maintained by R. Becker (2020-04-18)
Most significant features installed:
Feature | for SciProg | for AMC |
---|---|---|
Anaconda3 Python Suite | x | |
Arduino IDE | x | |
Thonny Phython Editor | x | |
git client | x | x |
US and DE keyboard layout | x | x |
Created for the Summer Semester 2020, the Corona Semester
Download Binary Image from FTP Server
Download (4.5 GB) UB_18.04_EE_SciProg_AMC_2020-04-18_V002_rb.ova
Credentials for the Linux VM:
Username: studi
Password: linux123
This Linux image can be started with the virtual machine VirtualBox.
How it was built
For transparency we explain how we built it.
Install VirtualBox
Download VirtualBox directly for your host operating system (the operating system on your computer, e.g. Windows or Mac OS) from https://www.virtualbox.org/
Install Vagrant
Use Vagrant to Pull the Basic Ubuntu Image
Adapting the automatic screen resolution with the official Ubuntu 18.04 image running on VirtualBox VM is a problem. Also copy-paste between Windows and the Ubuntu VM sometimes does not work.
The easiest way for me is to use a vagrant Ubuntu Desktop image provided by the user “peru”: https://app.vagrantup.com/peru/boxes/ubuntu-18.04-desktop-amd64
It already provides several features which make life easier (some mentioned above).
Install Vagrant on your local machine.
Create a meaningful directory, e.g. my-ubuntu
.
Download the vagrant file below into my-ubuntu
by clicking on the link above the code text.
- vagrantfile
Vagrant.configure("2") do |config| config.vm.box = "peru/ubuntu-18.04-desktop-amd64" config.vm.box_version = "20200401.01" end
Open a command line interface (CLI) such as Windows cmd
in the directory my-ubuntu
. If you type dir
you should see the file vagrantfile
.
On the command line execute vagrant up
. This will pull the Ubuntu Desktop image named in the Vagrant file.
This will start the Ubuntu image in the VirtualBox VM.
Changes in the VM
Upgrade the Installed Software
Log in with vagrant / vagrant
sudo apt update sudo upgrade update
Additional software
sudo apt install curl
Additional Keyboard Layouts
Log in with vagrant / vagrant
The default keyboard layout is English en
. Use the “Settings” App (the gear symbol) to add additional keyboard layouts. You should install at least German (no dead keys). In languages like French with accents above vowels dead keys are used to modify letters, e.g. with a dead key layout pressing `
followed by a
yields à
. In plain German it is annoying to be forced to press two keys, namely an accent followed by a black, to get the accent only. The modifier no-dead-keys
eliminates this behavior. If an accent key is pressed the accent is typed immediately.
After adding more layouts a keyboard selection dropdown menu occurs on the top right of the desktop. Choose your appropriate layout (e.g. en or de).
Add User studi
Log in with vagrant / vagrant
Execute sudo adduser studi
Choose the password linux123
and user name studi
. Leave the other fields empty.
Endow the user studi
with comprehensive rights by adding him or her to the relevant user groups:
sudo usermod -a -G sudo,dialout,adm,cdrom,dip,plugdev,lpadmin,sambashare studi
Thonny
Log in with studi / linux123
Thonny is a light weight Python editor for beginners: https://thonny.org/
The Thonny version in the Ubuntu 18.04 Software Center is too old.
There are several ways to install the latest version of Thonny, e.g.:
- Download the latest Thonny bash installation script and execute with bash:
sh thonny-3.2.7.bash
- If Python3 is installed (e.g. as part of Anaconda3) you can execute:
pip install thonny
bash <(curl -s https://thonny.org/installer-for-linux)
Arduino
Log in with studi / linux123
Source: https://www.arduino.cc/en/guide/linux
Download the latest Arduino installer package (e.g. Linux 64 Bits) from https://www.arduino.cc/en/Main/Software
Unpack the archive by right clicking and selecting “unpack” (not just change into the still compressed archive). Change into the directory and execute install.sh as root, e.g. in a terminal sudo ./install.sh
Install Anaconda3 Python Distribution for User studi
Log in with studi / linux123
Source: https://docs.anaconda.com/anaconda/install/linux/
# On Debian based systems: sudo apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
In your browser go to https://www.anaconda.com/distribution and choose Linux Distribution.
Download the lastest Linux installer! Currently (2020-04-17) it is:
https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
You can also use the command wget
is a Linux terminal to download the installer. Open a terminal in the Linux VM pressing <Ctrl>-<Alt>-T
cd ~/Downloads wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh sh ./Anaconda3-2020.02-Linux-x86_64.sh
- Read and accept the license and answer with yes.
- Accept the default installation directory
/home/studi/Anaconda3
: answer with yes - Refuse the installer to modify your shell scripts to start an environment: answer with no.
This will install the Anaconda3 Python distribution into the location /home/studi/anaconda3
The final remarks by the installer:
You have chosen to not have conda modify your shell scripts at all. To activate conda's base environment in your current shell session: eval "$(/home/studi/anaconda3/bin/conda shell.YOUR_SHELL_NAME hook)" To install conda's shell functions for easier access, first activate, then: conda init If you'd prefer that conda's base environment not be activated on startup, set the auto_activate_base parameter to false: conda config --set auto_activate_base false Thank you for installing Anaconda3! =========================================================================== Anaconda and JetBrains are working together to bring you Anaconda-powered environments tightly integrated in the PyCharm IDE. PyCharm for Anaconda is available at: https://www.anaconda.com/pycharm
Conda Environment
If you chose “activate conda environment” during anaconda3 installation it modifies the command line prompt, i.e.
(base) studi@linux:~$
See: https://askubuntu.com/questions/1026383/why-does-base-appear-in-front-of-my-terminal-prompt
Anaconda Desktop Button
Download the file below by clicking on anaconda.desktop
and move it into the right folder:
mv anaconda.desktop $HOME/.local/applications/anaconda.desktop
- anaconda.desktop
[Desktop Entry] Version=1.0 Type=Application Name=Anaconda-Navigator GenericName=Anaconda Comment=Scientific Python Development Environment - Python3 Exec=bash -c 'export PATH="${HOME}/studi/anaconda3/bin:$PATH" && ${HOME}/anaconda3/bin/anaconda-navigator' Categories=Development;Science;IDE;Qt;Education; #rb: ${HOME} is not evaluated in Icon: Icon=${HOME}/anaconda3/lib/python3.7/[...]/anaconda-icon-256x256.png Icon=/home/studi/anaconda3/lib/python3.7/site-packages/anaconda_navigator/static/images/anaconda-icon-256x256.png Terminal=false StartupNotify=true MimeType=text/x-python;
Chromium Browser
Source: https://wiki.ubuntuusers.de/Chromium/Installation/
sudo apt-get install chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg sudo apt-get install chromium-codecs-ffmpeg-extra
Git Client
suto apt install git