# Build dsci-lab_ws2025 Linux Mint 22.04.5, WS 2025 This file: * Build of `dsci-lab_ws2025`, 2025-09-15 * Basis: Linux Mint 22.1 "Xia", Xfce Edition, source: * GPT-5: "Linux Mint 22.1 "Xia" is a long-term-support (LTS) release based on Ubuntu 22.04 LTS (Jammy Jellyfish) ... Linux kernel 5.15 (Ubuntu 22.04 default)" previous versions: * dsci-lab WS 2024: Important: You are *not* requested to build the dsci-lab by yourself. Instead you are advised to download the fully configured dsci-lab as a ready-to-use virtual machine, see {doc}`t_download`. However, if you are a lecturer or a interested student you might want to learn how we set up the dsci-lab. Here are the steps. ## Install VM Virtual Box 7.1 * {ref}`install-virtualbox` ## Download ISO image https://linuxmint-installation-guide.readthedocs.io/en/latest/ * download ISO file, hier z.B. https://mirror.dogado.de/linuxmint-cd/stable/22.1/linuxmint-22.1-xfce-64bit.iso * save etc. to `~/VirtualBox VMs/dsci-lab_ws2025/linuxmint-22.1-xfce-64bit.iso` * download sha256sum: https://mirrors.kernel.org/linuxmint/stable/22.1/sha256sum.txt * check sha265usm: https://linuxmint-installation-guide.readthedocs.io/en/latest/verify.html ``` jb@jb-ThinkPad-T16-Gen-2:~/VirtualBox VMs/dsci-lab_ws2025$ sha256sum -b linuxmint-22.1-xfce-64bit.iso 6451496af35e6855ffe1454f061993ea9cb884d2b4bc8bf17e7d5925ae2ae86d *linuxmint-22.1-xfce-64bit.iso ``` ## Create the virtual XUbuntu machine Start Oracle VM Virtual Box Manager 7.1 Name und Betriebssystem: * Maschine > Neu > Name: e.g. *dsci-lab_ws2025* * Ort: z.B. `/home/jb/VirtualBox VMs` * ISO Abbild: `/home/jb/VirtualBox VMs/dsci-lab_ws2025/linuxmint-22.1-xfce-64bit.iso` * Typ: Linux * Subtyp: Ubuntu * Version: Ubuntu 22.04 * Button unbeaufsichtigte Installation: ÜBERSPRINGEN! unbeaufsichtigte Installation: * verwenden wir nicht Hardware * Hauptspeicher: minimal 4096 MB, besser z.B. 16000 MB ;-) ) * Prozessoren: 1 Festplatte * jetzt eine Festplatte erstellen: `/home/jb/VirtualBox VMs/dsci-lab_ws2025/dsci-lab_ws2025.vdi` * Dateityp und Variante der Festplatte: VDI; * Größe: hier mindestens 100 GB angeben * Virtualbox 7.1: Volle Größe im Voraus allozieren: NEIN * (vormals Virtualbox 6: Art der Speicherung: **dynamisch alloziert**) Press FERTIGSTELLEN; Start machine *dsci-lab_ws2025*. * Start Linux Mint * Install Linux Mint * Select language: "Deutsch" * Tastaturbelegung: German > German * Multimadia-Codecs installieren: JA * Aktualisierungen herunterladen: Ja * Installationsart: Festplatte löschen und installieren (this will clean only your newly allocated virtual hard disc, NOT the disk of your host system;-) ); JA > Jetzt installieren * Änderungen auf die Festplatte schreiben? ja, weiter * Wo befinden Sie sich? > Berlin * "Who are You?": * Name: Data Scientist * Name des Rechners: dsci-lab-ws2025 * Benutzername: dsci * password: dscidsci A basic version of xubuntu will be installed. "Die Installation ist abgeschlossen. Sie müssen jetzt den Rechner neu starten, um das System zu benutzen" * "Jetzt neu starten" * "Please remove instalation medium": nothing to do, press ENTER Your freshly installed Linux Mint Linux starts. Login: * user: **dsci** * password: **dscidsci** It starts a guided tour: "Willkommen" ## Update Basic System: MUST! System auf den neuestes Stand bringen: * "Willkommen"-Tour > Erste Schritte > Aktualisierungsverwaltung * OR Startmenue > System > Aktualisierungsverwaltung: OR as an alternative to using "Aktualisierungsverwaltung" you can keep the system current with `apt`: ```sh sudo apt update; sudo apt upgrade ``` Try it! Your system already should be up to date. Restart the machine afterwards. Login again. We will use the command line hereafter where possible. Get a new terminal by typing `Strg-Alt-t`. NEU 2025-09-15, HOST: Copy the basic updated installation ``` jb@jb-ThinkPad-T16-Gen-2:~/VirtualBox VMs/dsci-lab_ws2025$ cp -rp dsci-lab_ws2025/ dsci-lab_ws2025_Grundinstallation_2025-09-15T1100 ``` Start firefox: ``` ## VirtualBox Guest Extensions Oracle Virtual Box > Geräte > Gasterweiterungen einlegen: A window pops up, showing the directory `/media/data/VBox_GAs_7.1.12/` > rightclick on background, "Open Terminal here", a new terminal opens. Type in: ```sh sudo ./VBoxLinuxAdditions.run ``` Some new kernel modules will be built. To replace the running kernel modules with the new ones you have to reboot the VM: 2024-09-19: Machine says "VirtualBox Guest Additions: reloading kernel modules and services": The mouse cannot be used any more. However, CTRL-T works. We shut down the machine manually: ```sh sudo reboot ``` Login again. You now should be able to resize the VM window. Try it! Activate bidirectional Copy & Paste from Windows-Host to VB etc. ``` Geräte > Gemeinsame Zwischenablage > bidirektional ``` After updating virtualbox on the host you might want to update the guest extensions on the guest. Simply repeat the steps above. Donn't forget to reboot your guest engine. ## Firefox Privacy Start firefox. Hit the "ALT"-button to show the menu. Edit > Settings (Bearbeiten > Einstellungen): * Home > New Windows and Tabs (Startseite und neue Fenster): point default to `https://www.startpage.com/` * Inhalte des Firefox-Startbildschirms: privacy! ... but do not deactivate these widges (don't close your eyes), but go to * Datenschutz und Sicherheit > Benuzerdefiniert > Cookies und Website-Daten * Cookies und Website-Daten beim Beenden von Firefox löschen: Check! * Hauptpasswort verwenden: Enter a save password! * Chronik: Firefox wird eine Chronik > nach benutzerdefinierten Einstellungen anlegen * "Die Chronik löschen, wenn Firefox geschlossen wird": Check! * Datenerhebung durch Firefox und deren Verwendung * (de-)select whatever you want Extras > Add-Ons und Themes > Erweiterungen * Ghostery – datenschutzorientierter Werbeblocker * optionally configure Ghostery: "ausführen in privaten Fenstern erlauben" ## document this installation properly To document subsequent personal installations of your VM you might wish to update this very file you are reading currently. * In Firefox push the `.md`-Button in the upper right corner of the page and save the file to `Downloads/build.md`. * Alternatively you might want to download the markdown-source of this file locally: ```sh cd ~/Downloads wget http://jbusse.de/dsci-lab/_sources/build.md cd ``` Edit the file `build.md` e.g. with Mousepad. Alternatively you want to use your favourite programming editor. ## vim, emacs, vscode Only if you are over 50 years old ;-) you still want to stick to `vim` or `emacs`: ```sh sudo apt install vim emacs ``` If you are a normal young student we recommend to dive eventually into *Microsoft Visual Studio Code* (aka VS Code) : ```sh snap install code --classic ``` > From File > Preferences > Settings, search for telemetry, and set the Telemetry: Telemetry Level setting to off. This will silence all telemetry events including crash reporting from VS Code. You will need to restart VS Code for the setting change to take effect. Optionally also get MyST-Marksown Syntax extension for VS Code: ## More basic Packages At this stage you have a clean, brand new virtual XUbuntu machine, with VirtualBox Guest extensions enabled. To get our dsci-lab version you have to install some more packages. You can do so by simply copying the following commands into a terminal (open a new terminal e.g. by typing `Strg-Alt-t`): ### freeplane incl. Java Mindmap (incl. Java): ```sh sudo apt install freeplane ``` ### GitHub Desktop TBD GitHub Desktop - The Linux Fork: ```sh wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list' sudo apt update && sudo apt install github-desktop ``` ca 300 MB (!) ### LaTeX recommends using the texlive distribution. We have found that in combination with jupyterbook (see below) the following packes are actually required, with a total size about 2 GB (!): ```sh sudo apt install imagemagick\ texlive-latex-recommended texlive-latex-extra \ texlive-fonts-recommended texlive-fonts-extra \ texlive-xetex latexmk texlive-lang-german\ xindy biber texlive-science ``` ## (Mini-)Conda Important: **DO NOT install Conda with sudo*. Install Miniconda with the role of a normal user instead. Every user and every virtual conda environment are completely independent from each other. There is no system-wide installation. Installing on Linux: * https://docs.conda.io/projects/conda/en/stable/user-guide/install/linux.html > Miniconda installer for Linux. > https://docs.anaconda.com/miniconda/ > Linux * Miniconda3 Linux 64-bit > ricght click > save to `Downloads/Miniconda3-latest-Linux-x86_64.sh` ```sh cd cd Downloads chmod +x ``` Miniconda Installer: > *Quick command line install*: ``` mkdir -p ~/miniconda3 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm ~/miniconda3/miniconda.sh ~/miniconda3/bin/conda init bash ``` > ==> For changes to take effect, close and re-open your current shell. <== Why close and re-open? Conda puts an extra virtual environment layer over the standard Python installation, so we can work with multiple Python configurations in parallel. To learn more about virtual environments: * * Your termial command line now should start with `(base)`, which is the name of your current virtual environment: ``` (base) dsci@dsci-lab-ss24:~$ ``` Keep `conda` current: ```sh conda update --all ``` (Note:Instead of installing miniconda you instead want to install `anaconda` (). Anaconda is much more complete than miniconda, but IMHO fo "fat". In our dsci-lab we prefer a lightweight system. This allows you to look more easily "under the hood", to understand what's going on, and to maintain the whole system - the dependencies in our setup are complex enough anyhow.) ### Install pandas, jupyter notebook, jupyterbook As said: Conda is minimalistic. Tus we have to install some modules by ourselfes. Some important ones are: ```sh pip install pandas numpy matplotlib scikit-learn seaborn \ rdflib owlrl markdownify lxml markdown python-slugify \ jupyter jupyter-book jupytext ``` Note: We do install these packages into the virtual conda environment `base`. If we decide to create another virtual conda environment, it will be empty again, and we have to populate it with libraries again. This is the reason (a) why we prefer lightweight environments, and (b) why we want to learn how to install libraries by ourselfes. Test the jupyterbook installation: Build the book according to ```sh mkdir -p ~/c cd ~/c jb create jupyterbook-test ``` build html: ```sh jb build jupyterbook-test firefox jupyterbook-test/_build/html/index.html & ``` build pdf via LaTeX: ```sh jb build jupyterbook-test --builder pdflatex atril jupyterbook-test/_build/latex/book.pdf & ``` Start Jupyter. Jupyter will launch firefox. Stop Jupyter again: ```sh jupyter notebook & jupyter notebook stop ``` ## System login screen image TBD: CHANGE TO MINT LINUX Download desired image to `/Downloads`. cp this image with sudo rights into folder `/usr/share/xfce4/backdrops/`: ``` cd /usr/share/xfce4/backdrops/ sudo mv /tmp/IMG_2247.JPG . sudo chmod 655 IMG_2247.JPG ``` "Bildschirmhintergrund des Nutzers verwenden, falls verfügbar": NO Open Whisker-Menue > Settings > LightDM GTK+ Greeter * select image in folder `backdrops` * enter install password * select background image ## customize user install background image copy private background image into folder `Documents`. right click on background > desktop settings > folder Documents > select image ## Zotero https://www.jbusse.de/dsci-lab/h_zotero.html # Export OVA Maschine aktualisieren, Gasterweiterungen installieren, Shared Folder deaktivieren, Medium auswerfen, Maschine 'runterfahren, USB auf 1.0 umstellen, dann *Export OVA*: * /home/jb/v/dsci-lab_ws2025.ova * "alle Netzwerkadressen mit einbeziehen" * Hersteller-URL: jbusse.de/dsci-lab SHA und Größe der Datei feststellen: ``` ls -ls v/dsci-lab_ws2025.ova # 11558000 -rw------- 1 jb jb 11835387904 Sep 30 09:20 v/dsci-lab_ws2025.ova sha256sum v/dsci-lab_ws2025.ova # xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx v/dsci-lab_ws2025.ova ``` Auf den Server hochladen, auch dort `sha256sum` berechnen, kontrollieren, erst dann in {doc}`t_download` eintragen. # Admin Aktualisieren: ```sh sudo apt update; sudo apt upgrade ``` ## next steps