Skip to content

Instantly share code, notes, and snippets.

@datacustodian
Last active April 25, 2024 03:48
Show Gist options
  • Save datacustodian/49baadc001360e52ffd98a6d8b272dbb to your computer and use it in GitHub Desktop.
Save datacustodian/49baadc001360e52ffd98a6d8b272dbb to your computer and use it in GitHub Desktop.
Ubuntu Desktop Post-Installation Steps

Ubuntu Desktop Post-Installation Steps

Ubuntu Desktop comes pre-loaded with many software packages, so it is pretty usable as is. Every step in this guide is optional; follow only the steps you need.

Note: Use apt-get command instead of apt command if you are running a Ubuntu version older than 16.04 LTS.

Table of Contents

Update to Latest Packages
Remove Outdated Unused Packages
Disable Guest Account
Disable User List
Better Vim
SSH Server
SSH Client Session Timeout (Optional)
Firewall
Anti-Virus
User Management
Language Support
LibreOffice Upgrade
Google Chrome
Adobe Flash Player
Archiving Software
VeraCrypt
Mount NFS Volumes Over the Network
Mount Windows Volumes Over the Network
Java
MySQL Client
PostgreSQL Client
Image Manipulation
Audio Player/Editor
Video Player
Video Converter
3D Modeler
Vector Graphics
CD/DVD Burning Application
Virtual Machine Manager for KVM
Remote Desktop
Software Development

Update to Latest Packages

sudo apt update
sudo apt dist-upgrade
sudo apt install software-properties-common

Remove Outdated Unused Packages

sudo apt autoremove

Disable Guest Account

http://ubuntuhandbook.org/index.php/2016/04/remove-guest-session-ubuntu-16-04/

sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" > /etc/lightdm/lightdm.conf.d/50-no-guest.conf'

Restart your computer.

Disable User List

Ubuntu 20.04 Focal Fossa uses gdm as the login greeter.

https://help.gnome.org/admin/system-admin-guide/stable/login-userlist-disable.html.en

You can disable the user list shown on the login screen by setting the org.gnome.login-screen.disable-user-list GSettings key.

When the user list is disabled, users need to type their user name and password at the prompt to log in.

Set the org.gnome.login-screen.disable-user-list key

Create the gdm profile which contains the following lines:

/etc/dconf/profile/gdm

user-db:user
system-db:gdm
file-db:/usr/share/gdm/greeter-dconf-defaults
gdm is the name of a dconf database.

Create a gdm keyfile for machine-wide settings in /etc/dconf/db/gdm.d/00-login-screen:

[org/gnome/login-screen]
# Do not show the user list
disable-user-list=true

Update the system databases:

# dconf update

Better Vim

Ubuntu 16.04 LTS Desktop installs the vim-tiny package by default, so you might find that Vim sessions do not keep command history. One solution is to install the vim-nox package.

sudo apt install vim-nox

Note that Ubuntu 16.04 LTS Server installs a Vim package that allows Vim command history to work out-of-the-box.

SSH Server

sudo apt install openssh-server

SSH Client Session Timeout (Optional)

You might need to create the ~/.ssh directory:

mkdir -p ~/.ssh

By default SSH sessions will timeout according to server settings. In order to maintain a long-running SSH session, create or modify ~/.ssh/config and add the following:

ServerAliveInterval 60
ServerAliveCountMax 5

Save and then start a new SSH session

Firewall

sudo apt install ufw
sudo ufw disable
sudo ufw enable
sudo ufw default deny incoming
sudo ufw default allow outgoing
# localhost 
sudo ufw allow from 127.0.0.1 to 127.0.0.1
# SSH from anywhere (OPTIONAL)
# sudo ufw allow ssh 
# SSH from subnet (OPTIONAL)
# sudo ufw allow from 192.168.0.0/24 to any port 22
sudo ufw logging medium
sudo ufw status verbose

Anti-Virus

Install ClamAV:

https://help.ubuntu.com/community/ClamAV

sudo apt install clamav clamav-daemon clamtk

To update virus definitions:

sudo freshclam

User Management

User operations on the username anotheruser:

sudo adduser anotheruser
# Grant sudo (OPTIONAL)
sudo usermod -aG sudo anotheruser 
# Require password change on next successful login
sudo chage -d 0 anotheruser

Language Support

Go to System Settings from the left menu bar and then Language Support. For an initial Ubuntu Desktop installation, the system should prompt you to install missing languages. Click Yes, then add the languages of your choice after focus returns to the dialog box.

Next,

If you use Gnome:

sudo apt install language-selector-gnome

If you use KDE:

sudo apt install language-selector-kde

Install Fcitx:

Ubuntu 22.04 LTS and after: sudo apt install fcitx5
Ubuntu 20.04 LTS and before: sudo apt install fcitx 

For Chinese:

Ubuntu 22.04 LTS and after: sudo apt install fcitx5-chinese-addons
Ubuntu 20.04 LTS and before: sudo apt install fcitx-googlepinyin

Run input method configuration:

im-config

Select fcitx.

Restart your computer.

Click on Keyboard Icon near upper right corner and select ConfigureFcitx; the keyboard will turn in to the Linux penguin Tux. :) Use "Input Methods" tab to add languages of your choice.

LibreOffice Upgrade

Warning: This process takes time, depending on your system hardware and Internet connection speed. On modest hardware and connection in 2017, it takes about 15 minutes.

https://wiki.ubuntu.com/LibreOffice#Installing_a_newer_version_of_LibreOffice_than_available_via_Ubuntu_repositories

sudo add-apt-repository ppa:libreoffice/ppa
sudo apt update
sudo apt install python-software-properties ttf-ubuntu-font-family
sudo apt dist-upgrade
sudo apt autoremove

If You Change Your Mind (Optional)

You can revert LibreOffice to stock version in Ubuntu main repository

sudo apt install ppa-purge && sudo ppa-purge ppa:libreoffice/ppa

Google Chrome

Ubuntu 22.04 LTS

https://itslinuxfoss.com/install-google-chrome-ubuntu-22-04/

Ubuntu 20.04 LTS

https://linuxize.com/post/how-to-install-google-chrome-web-browser-on-ubuntu-20-04/

As of September 2020, keeping google-chrome.list in /etc/apt/sources.list.d no longer produces an error running apt command.

Ubuntu 18.04 LTS

https://linuxize.com/post/how-to-install-google-chrome-web-browser-on-ubuntu-18-04/

Ubuntu 16.04 LTS

https://www.linuxbabe.com/ubuntu/install-google-chrome-ubuntu-16-04-lts

Press CTRL+ALT+T to open a terminal window, then edit sources.list file with nano text editor. You need to enter your password.

sudo nano /etc/apt/sources.list

Use the down arrow key to scroll to the bottom of this file. Copy the following APT line and paste it at the end of the file.

deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

Press CTRL+O to save the file. Then press CTRL+X to exit out of this file. After that, enter the following command to download Google's signing key.

wget https://dl.google.com/linux/linux_signing_key.pub

Then use apt-key command to add it to your keyring so the package manager can verify the integrity of Google Chrome package.

sudo apt-key add linux_signing_key.pub

Now update package list and install the stable version of Google Chrome.

sudo apt update
sudo apt install google-chrome-stable

Check if the file google-chrome.list exists in /etc/apt/sources.list.d. If it exists, then remove the deb pacakge entry we added just now from /etc/apt/sources.list file. Leaving two identical deb entries in different .list files under the /etc/apt directory will produce an error like "Target ... is configured multiple times" every time you run sudo apt update command.

Adobe Flash Player

WARNING: STOP using Flash Player!

Still, no knowledge should be forbidden. So if you are really sure you want to enable Flash:

sudo apt install flashplugin-installer

Archiving Software

sudo apt install p7zip-full
sudo apt install p7zip-rar

VeraCrypt

Download VeraCrypt from the current location:

https://www.veracrypt.fr/

Warning: VeraCrypt was hosted on CodePlex, which is shutting down soon:

https://veracrypt.codeplex.com/

https://aka.ms/codeplex-announcement

Extract VeraCrypt setup binaries:

tar xjf veracrypt-1.19-setup.tar.bz2

Setup VeraCrypt Console:

./veracrypt-1.19-setup-console-x64

Setup VeraCrypt GUI:

./veracrypt-1.19-setup-gui-x64

Click "Search your computer" widget on upper left corner and type veracrypt to launch VeraCrypt

Make sure dmsetup package is installed to avoid an error when mounting VeraCrypt volumes:

sudo apt install dmsetup

Ignore "Possible missing firmware" warnings.

Mount NFS Volumes Over the Network

sudo apt install nfs-common

Mount Windows Volumes Over the Network

sudo apt install cifs-utils

Ubuntu 16.04 LTS (maybe earlier) out-of-the-box will mount, read, and write local NTFS volumes.

Java

Java 9

http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java9-installer
sudo apt install oracle-java9-set-default

Java 8

http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install oracle-java8-installer
sudo update-alternatives --config java

sudo nano /etc/environment

At the end of this file, add the following line for Java 8:

JAVA_HOME="/usr/lib/jvm/java-8-oracle"

Save and exit the file, and reload it.

source /etc/environment

This command should return the path you just set:

echo $JAVA_HOME

MySQL Client

sudo apt install mysql-client
sudo apt install mysql-workbench

PostgreSQL Client

sudo apt install postgresql-client

Image Manipulation

Install GIMP:

https://www.gimp.org/

sudo apt install gimp

Audio Player/Editor

sudo apt install audacity

Video Player

sudo apt install vlc
# RECOMMENDED but optional to install all licensed codecs
sudo apt install ubuntu-restricted-extras
# OPTIONAL
# sudo apt install browser-plugin-vlc

Video Converter

sudo add-apt-repository ppa:stebbins/handbrake-releases
sudo apt update
sudo apt install handbrake-gtk handbrake-cli 

3D Modeler

sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt update
sudo apt install blender

Vector Graphics

Install Inkscape via PPA for Ubuntu 16.04 LTS and later:

sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt update
sudo apt install inkscape

CD/DVD Burning Application

sudo apt install k3b

Remote Desktop

Use Remmina remote desktop application packaged with Ubuntu.

If for some reason Remmina isn't packaged. do the following:

sudo apt-add-repository ppa:remmina-ppa-team/remmina-next
sudo apt update
sudo apt install remmina remmina-plugin-rdp remmina-plugin-gnome libfreerdp-plugins-standard

Virtual Machine Manager for KVM

sudo apt install ssh-askpass
sudo apt install virt-manager

Software Development

Please refer to Ubuntu Desktop For Software Development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment