Skip to content

Setting up Ubuntu at TU Delft

Since summer 2023 the TU Delft provides an Ubuntu image for laptops and desktops. Currently (12/9/2023) this is version 22.04 LTS.

The instructions below help setup the computer after installation by the user. To follow these instructions the user must have sudo-rights. If this is not the case, please send an e-mail to servicepunttnw@tudelft.nl with your netid and the TUD number located on the sticker of your TU Delft computer requesting these rights.

Note that most of these instructions are from my own experience and are not necessarily supported by ICT! You can contact me if you have questions but I will not be responsible for using these instructions.

Known challenges (previously known as bugs)

  • when connected via WiFi to eduroam the computer will not get out of sleep mode! This is serious challenge and can only be solved by either not sleeping your computer, turn off WiFi before sleep, or only use wired network.
  • it’s not possible to use the graphic Software Updater, please use apt (or apt-get or aptitude) and snap.
  • the Discover was not available, please use apt search and snap search.
  • it’s not possible to set a different shell (like fish, see below).

Tricks (previously also known as bugs…)

  • the background image cannot be changed via the graphic interface. This can be solved by commenting out all lines in /etc/dconf/db/local.d/locks/00-wallpaper and afterwards give the command /usr/bin/dconf update in the terminal.

Security

Fail2ban

This service will block frequent attacks to your computer. Please check the manual on how to setup this up for ssh.

During installation you might need to install postfix mailserver. Make sure to setup postfix as Satellite with relay-host dutmail.tudelft.nl.

sudo apt install fail2ban
sudo systemctl start fail2ban.service
sudo fail2ban-client status

Rkhunter

This program can check for rootkit attacks to your computer.

sudo apt install rkhunter

SSH

Most likely this is already installed…

sudo apt install ssh

Printing

To install the Follow-Me printer you first need to retrieve the right URI (created with your netid) via the instructions in this link:

Important

Only follow the instructions on the website https://linuxprint.tudelft.nl until you reach the page Advanced Driver Print. On this page you find the URI under 4. In Device URI enter the exact address below…. Copy/Save the complete string starting with ipps://linuxprint.tudelft.nl:443/ipp/r/... for later use.

Now follow the instructions in this link:

Important

In Step 2. use the URI you found in the previous step! Do not use the printserver.tudelft.net/FollowMe.

Important

In Step 2. use the URI you found in the previous step! Do not use the printserver.tudelft.net/FollowMe.

Storage

Storages like staff-umbrella (a.k.a. project storage), staff-group and staff-bulk can be accessed using the SSHFS protocol.

Warning

This might be rewritten to rclone instead of sshfs as the latter is no longer maintained

sudo apt install sshfs
sshfs -o follow_symlinks -o workaround=rename \
 -o transform_symlinks \
 -o ServerAliveInterval=60,ServerAliveCountMax=60 \
 -o TCPKeepAlive=yes \
 ${netid}@sftp.tudelft.nl:/ $mntpnt 

Note that this connection will time-out and will disconnect after sleep.

Mail and calendar

Preferably use evolution for e-mail, calendar and contacts. For this select Exchange Web Service and login with <netid>@tudelft.nl and associated password.

S/MIME

Surfdrive

Nice to have

Text expander Espanso

Programs to use

Shell

Fish

Preferably I’m using fish shell. This can be installed on most Linux distributions with sudo apt install fish. You can set this shell as your default shell with chsh -s /usr/bin/fish.

Starship

This is a very powerful and helpful prompt that can be used in most shells available. Please use it as it will give you so much more needed information inside your shell.

Follow the installation instructions here:

Webbrowser Firefox

Editor Kate

Screen snapshot Spectacle

Backup

Notes

Programs to install

Development

sudo apt install build-essentials cmake pkg-config

Latex

sudo apt install texlive-full

5GB storage is used for texlive-full

Pandoc

sudo apt install pandoc

pandoc-citeproc is no longer available…

Python

Python is default available in most Linux distributions. For virtual environments I’m not using Miniconda anymore but switched to venv. Below you will find instructions on how to setup a virtual environment with venv. In the chapter about direnv you can see how to automagically activate this environment upon “entering” the directory with the environment.

  1. install python3-venv:

    sudo apt install python3-venv
    
  2. go to the directory where you want to create a virtual environment

  3. setup the virtual environment with venv:

    python3 -m venv env
    

    this will create the directory env with all files for the virtual environment 1. start the virtual environment:

    source env/bin/activate
    

    if you’re using starship with bash you will see the name of your venv directory (here env) between colons in your prompt. This indicates that you are now using the virtual environment. 1. add the packages you need in requirements.txt. One per line. 1. install these packages with pip:

    pip install -r requirements.txt --upgrade
    

    all packages in requirements.txt are downloaded and installed inside the virtual environment

Everything is now setup to use the virtual environment with the installed packages. You can always start this environment with source env/bin/activate.

Upgrade packages

Make sure that you regularly update the packages when inside the virtual environment with python install -r requirements.txt --upgrade

The previous instructions for setting up Miniconda are still available

Miniconda
  1. download Installer from https://docs.conda.io/en/latest/miniconda.html
  2. run installer:

    sh Miniconda3-latest-Linux-x86_64.sh
    
  3. if you use fish shell initialise conda:

    source miniconda/etc/fish/conf.d/conda.fish
    conda init fish
    

Direnv

This program allow you to run scripts one you enter the configured directory. This is nice for starting the right virtual environment in Python for a certain directory (e.g. mkdocs).

sudo apt install direnv

Follow these instructions depending on your shell:

For bash I added the following line to ~/.bashrc:

# starting direnv
eval "$(direnv hook bash)"

The .envrc for the directory containing this documentation looks like this:

source env/bin/activate
unset PS1
unset PS1

In bash on Linux there is a small annoyance using activate in .envrc. This can be solved with unset PS1

After creating this file you can “activate” the .envrc with direnv allow inside the directory containing this .envrc file.

The previous instructions for Miniconda in .envrc are still available:

Miniconda in .envrc
source ~/miniconda3/etc/profile.d/conda.sh
conda activate mkdocs

Gimp

Via Discover.

Visual Studio Code

Follow instructions on this link:

Teams

Teams works nice.

Signal

Zoom

Do not install Zoom. As a dependency it will install dbus which messes up your system!

Tricks

Webapps

Youtube

Enable DRM in Firefox

Whatsapp

Spotify


Last update: 2023-09-14