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 networking

See desktop networking

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
export DEBIAN_FRONTEND=noninteractive


Eventually setup Netfilter with NFTABLES to allow only outbound connections

    dpkg -l | grep iptables
    apt purge iptables
    apt install nftables
    mv /etc/nftables.conf /etc/nftables.conf.dpkg-dist
    vi /etc/nftables.conf

see NFTABLES SETUP and enable

    systemctl start nftables
    systemctl enable nftables
    systemctl status nftables

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 \
chromium-browser \
deluge \
firefox \
imagemagick \
mpv \
rxvt-unicode \
scrot \
terminator \

# thunderbird xul-ext-lightning enigmail \
# sylpheed sylpheed-plugins \
# claws-mail \

# filezilla \
# vlc \
# nautilus-share \ # with samba

update-alternatives --config x-terminal-emulator

And a few workstation-oriented one

apt install \
biff \
discount \
pandoc \
texlive \

# irssi \


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

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

graphics & displays

lshw -c video
xrandr --output HDMI-A-1-0 --auto --right-of eDP

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 | /usr/sbin/sendmail -t

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