Setting up Ubuntu Desktop

assuming the server stuff is done already


Know in advance if you want BIOS/CSM or EFI/SecureBoot

Also avoid ZFS if you plan to run a XEN host

Desktop network & firewall

See the FIREWALL section in better network for ubuntu and disable SSHD

    systemctl stop ssh
    systemctl disable ssh

System preparation

Tune your SSH client

Create a desktop user

useradd -m -g users -G adm,cdrom,sudo,plugdev,lpadmin USERNAME

and eventually make things faster (sudo without password) on a workstation, as long as you are the only sysadmin in the box

grep :11: /etc/group
grep wheel /etc/group
groupadd -g 11 wheel
usermod -a -G wheel root
usermod -a -G wheel ADMIN

cat >> /etc/sudoers <<-EOF

Enable ctrl-alt-backspace to kill X like in the old days

dpkg-reconfigure keyboard-configuration

    altgr-intl      English (intl., with AltGr dead keys)

allow ctrl+alt+del

Desktop environment

Take a pick

And eventually setup Conky


Eventually make sure you’ve got a default desktop system in place –or– possibly switching from the Server version

apt install ubuntu-desktop

Additional packages for the command line

Then a few desktop-oriented ones

apt install \
    adwaita-icon-theme-full \
    chromium-browser \
    deluge \
    discount \
    firefox \
    gnome-tweaks \
    imagemagick \
    ipcalc \
    libheif-examples \
    mpv \
    pandoc \
    pm-utils \
    rxvt-unicode \
    scrot \
    speedcrunch \
    secure-delete \
    terminator \
    thunderbird xul-ext-lightning \
    wireshark \
    xautolock xtrlock \

    # enigmail \
    # sylpheed sylpheed-plugins \
    # claws-mail \
    # filezilla \
    # vlc \

in case you want to reach file-shares

    # samba nautilus-share \

define your favorite tools

update-alternatives --config x-terminal-emulator
dpkg-reconfigure wireshark-common
usermod -aG wireshark USER

#gnome-tweak-tool gnome-shell-extensions
gnome-tweaks # --> Appearance...
rm -rf .config/gtk-3.0/
rm -rf .config/gtk-4.0/


Chromium w/o keyring

--password-store=basic %U

Don’t forget to install Ad Blockers on FF on Chrome such as

Ad Block Plus
uBlock Origine

Eventually enable mail checks

vi /etc/bash.bashrc

export MAIL=/var/mail/$USER
export MAILCHECK=1
/usr/bin/biff y

Moar applications

see apps

Additional notes

moar sysprep

systemctl stop blueman-mechanism.service
systemctl stop bluetooth.service
systemctl stop

systemctl disable blueman-mechanism.service
systemctl disable bluetooth.service
systemctl disable

this one remains up for pulseaudio or something (real time kit)

systemctl restart rtkit-daemon.service
systemctl enable rtkit-daemon.service

remove snap

snap list
snap remove ...

apt purge snapd
systemctl stop var-snap.mount
systemctl disable var-snap.mount
umount /var/snap/
rmdir /var/snap/

disable zfs snapshots

as user

systemctl --user start zsys-user-savestate.timer
systemctl --user enable zsys-user-savestate.timer

as root

mv /etc/apt/apt.conf.d/90_zsys_system_autosnapshot.disabled /etc/apt/apt.conf.d/90_zsys_system_autosnapshot

multiple displays

see video

station’s cron

now even on a workstation, you might want to enable outgoing email and daily scan your own servers

crontab -e

# full path required for sendmail on ubuntu
00 2 * * * /root/DAILYSTATION 2>&1

and grab the sample script from there

external drive

cfdisk ...
mkfs.ext4 -T largefile -m 0 /dev/...
e4label /dev/... NEWNAME
lsblk --fs --ascii

workstation networking

check your network settings handled by Network Manager

nmcli device show ens2

disable automount

gsettings set automount false
gsettings set automount-open false
gsettings set automount false
gsettings set automount-open false




Setup your default workgroup when mounting windows file shares

    sudo apt install smbclient cifs-utils
    #smbfs samba
    vi /etc/samba/smb.conf


recent AMD boards


iwl3945 power saving issue

experienced on IBM/Lenovo T60 / R60e

If you get this error in the logs while loosing iwl3945 wireless network connectivity

BSM uCode verification failed at addr 0x00003800+0 (of 900), is 0xa5a5a5a2, s/b 0xf802020
Unable to set up bootstrap uCode: -5

and this error when trying to UP the wireless network interface,

    SIOCSIFFLAGS: Input/output error

==> disable wlan power saving using NetworkManager

vi /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

wifi.powersave = 2

service NetworkManager restart
iwconfig wls3

kodi / ureadahead

(optional) you might also want to remove that one in case it is installed and not needed (it was spamming my logs)

    sudo apt remove ureadahead
    #sudo apt purge ureadahead

oem install

Choose the OEM auto-install if you need to delivery the computer to someone-else: finish-up the process as oem user, then click on the Prepare for shipping and the user will have a little setup wizard next boot.

Finish-up as OEM user, choose preferred mirror for packages

Control Center -> Software Sources

and apply updates using the little shield button in the systray.

install additional languages depending on target users

Control Center -> Languages

make sure Firefox is also available language-specific.

You’re now ready to click “Prepare for shipping” on the Desktop and reboot.

Note. few things are missing with this method e.g. Adblock for Firefox.


How to Add and Delete Users on Ubuntu 18.04


4.3. Creating an ext4 File System

Creating ext4 partition from console

monitors and brightness

Set primary monitor on 16.04

‘xrandr’ command (solved)

4 Ways to Fix the Laptop Brightness Problem In Ubuntu

Cannot change brightness (Ubuntu 16.04 LTS, Unity)

Disable automatic ZSys snapshots - ZFS on root

suspend & hibernate

How can I suspend/hibernate from command line?


Copyright © 2024 Pierre-Philipp Braun