Elementary OS 0.4 Loki desktop customization

Elementary OS - Featured Image

Out of the box installation of Elementary OS will satisfy most of any user needs, period. It is a rock solid desktop operating system with most stable and user friendly interface amongst all I’ve seen in Linux world. And as with any Linux distribution, Elementary OS can also be additionally customized and tweaked which will make it even better. So let’s do it!

Prerequisites

You can get a VMDK virtual machine image of initial Elementary OS Loki installation in Downloads section of this site.

To complete this tutorial, an initial installation of Elementary OS Loki is required, and you can find a “how to” tutorial here. Also, but not mandatory, a basic knowledge of Linux command line and commands is required to complete this guide. The guide itself contains enough detailed information for you to successfully customize your Elementary OS Loki operating system. Upon completion you will have a great replacement for Windows or macOS that will suite you day-to-day needs.

Elementary OS customization – system settings

Start your newly installed Elementary OS, log in with your user and form Applications menu, fire up a Terminal application:

Elementary OS customization

Now we are going to modify how our boot loader (Grub) behaves, we are going to set up some variables which define how certain data will be presented to us (Locales). Also we are going to turn on automatic file system repair if any inconsistencies are detected during boot. Lets do it.

Open up /etc/default/grub with editor of your choice (I use Vim) and modify the following lines as shown below:

sudo vi /etc/default/grub
...
#GRUB_HIDDEN_TIMEOUT=0
...
GRUB_CMDLINE_LINUX_DEFAULT=""
...
GRUB_DISABLE_RECOVERY="true"

Save, close the file and update boot loader (Grub) so changes get applied:

sudo update-grub

Next thing we are going to do is modify some locales values. Execute the following in Terminal:

sudo update-locale LC_MESSAGES=POSIX
sudo update-locale LC_LANGUAGE=en_US.UTF-8
export LC_MESSAGES=POSIX
export LC_LANGUAGE=en_US.UTF-8

Last thing to do in this initial step is to configure automatic file system repair. Open /etc/default/rcS file in editor of your choice and modify the following line as shown below:

sudo vi /etc/default/rcS
...
# automatically repair filesystems with inconsistencies during boot
FSCKFIX=yes

Elementary OS customization – software repositories and updates

A debconf is application which helps us configure packages we want to install on our Ubuntu. Depending on verbosity it is set, it will ask various questions (or none) when packages are getting installed. For the purpose of this guide, I want full verbosity, so I need to reconfigure it a bit. Execute the following command:

sudo dpkg-reconfigure debconf

Select Dialog when asked which interface to use:

Elementary OS customization

Select low when selecting a priority questions:

Elementary OS customization

Now we will be asked all relevant questions during package (software) installation. Next thing, you may noticed during debconf reconfiguration is that annoying, blinding purple background color. I hate it, so let’s change that also. Execute the following commands:

sudo rm /etc/alternatives/newt-palette
sudo ln -s /etc/newt/palette.original /etc/alternatives/newt-palette

Next time you install some software a debconf dialog will be presented with nice and cold blue background which will not destroy your vision. Now we need to set up software repository configuration. Execute the following in Terminal window:

sudo echo -n > /etc/apt/sources.list
sudo echo -e "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main universe multiverse restricted
deb http://archive.canonical.com/ubuntu xenial partner" > /etc/apt/sources.list

Now let’s update software catalog (repositories). Execute the following in terminal window:

sudo apt-get update

To make things a bit simpler for us, regarding software updates and installation, we are going to install a terminal based package manager aptitude:

sudo apt-get install --no-install-recommends -y aptitude

Lets generate a configuration file for aptitude. Aptitude config can be different for each user, so if you have a computer which is used by several users, a different aptitude configuration can be applied for each user:

cd
mkdir .aptitude && touch .aptitude/config

Now we need to populate config file, so execute the following in Terminal window (replace “$USER_NAME” with your username):

cat <<EOF > /home/"$USER_NAME"/.aptitude/config
aptitude "";
aptitude::Delete-Unused-Pattern "";
aptitude::UI "";
aptitude::UI::Advance-On-Action "true";
EOF

Our system is now ready for software upgrade/installation.

Elementary OS customization – software installation

First we will perform an initial system upgrade:

sudo aptitude forget-new
sudo aptitude full-upgrade --purge -y

Depending of how extensive the amount of software to upgrade is, a certain questions will be asked by debconf. This guide will cover the ones that were asked during the time this article is written. First package configuration that requires user input during this upgrade is locales. I require only a en-US.UTF-8 locales so I un-marked everything else (if any):

Elementary OS customization

Also select en-US.UTF-8 as a default system locale:

Elementary OS customization

If asked anything regarding grub-pc package, just select OK and continue with default options. When done, execute the following in Terminal window to remove any old kernel/headers:

sudo dpkg -l | grep linux-image-extra-4 | tr -s " " | cut -d" " -f2 | sort -r | tail -n +2 | xargs sudo aptitude purge -y
sudo dpkg -l | grep linux-image-4 | tr -s " " | cut -d" " -f2 | sort -r | tail -n +2 | xargs sudo aptitude purge -y
sudo dpkg -l | grep linux-headers-4 | tr -s " " | cut -d" " -f2 | sort -r | tail -n +3 | tr "\n" " " | xargs sudo aptitude purge -y

In most cases everything should be fine, but just to be sure, we will install linux image and headers packages again:

sudo aptitude install -y linux-image-generic-hwe-16.04 linux-headers-generic-hwe-16.04

If a need occurs where you need to install an application from source, a build-essential package is required, so we will install it in the following step. Also a memory test program memtest86+ will be installed (not required if running a virtual machine):

sudo aptitude install -R -y memtest86+ build-essential

Let’s add a few additional repos for some extra software not available trough official Elementary OS repos:

curl -s https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public | sudo apt-key add -
sudo curl -s -o /etc/apt/sources.list.d/draios.list http://download.draios.com/stable/deb/draios.list
wget -q https://dl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add -
echo -e "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
echo -e "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/oracle-java.list
sudo aptitude update

Now we can install our first batch of software which will be a various utilities to help us in our day to day work:

sudo aptitude install -R -y openssh-server safecat sharutils lynx zip unzip lrzip pbzip2 p7zip p7zip-full rar pigz unrar acpid inotify-tools sysfsutils dstat htop lsscsi iotop itop nmap ifstat iftop tcptrack whois atop mcelog zram-config sysstat gpm localepurge mc screen vim smartmontools lm-sensors ethtool apt-file sysdig dma

Again debconf will require of us to answer a few questions, so let’s do it in order of appearance. Select No when asked to activate sysstat cron job:

Elementary OS customization

Select OK to continue:

Elementary OS customization

Select OK to continue:

Elementary OS customization

Select OK to continue:

Elementary OS customization

Select OK to continue:

Elementary OS customization

Select OK to continue:

Elementary OS customization

Select OK to continue:

Elementary OS customization

Select OK to continue:

Elementary OS customization

Select en and en-US.UTF-8 (or what ever your preferred language is) and select OK to continue:

Elementary OS customization

Select Yes to continue:

Elementary OS customization

Select Yes to continue:

Elementary OS customization

A few post installation steps are required now:

sudo apt-file update
sudo sed -i 's/^#startup_message/startup_message/g' /etc/screenrc

Elementary OS comes with a small amount of default software installed, like eMail client, web browser, media player etc. which I don’t like, nor use, so let’s remove it:

sudo aptitude purge -y geary midori-granite noise audience software-center update-manager libatkmm-1.6-1 libcairomm-1.0-1 libglibmm-2.4-1c2a libpangomm-1.4-1 libtimezonemap1 sbsigntool software-center-aptdaemon-plugins ubuntu-release-upgrader-gtk update-notifier apparmor brltty ufw update-manager-core ed nano gnome-orca onboard onboard-data update-notifier-common oneconf oneconf-common python-oneconf python3-oneconf apport whoopsie toshset epiphany-browser epiphany-browser-data pantheon-mail pantheon-online-accounts-plugin-fastmail pantheon-online-accounts-plugin-mail appcenter

A second batch of software can now be installed. Again this will be various system tools and helper utilities:

sudo aptitude install -y -R btrfs-tools busybox-static cryptsetup-bin dmeventd dmsetup dnsutils elementary-os-overlay friendly-recovery ftp hdparm info iputils-tracepath irqbalance jfsutils lshw lsof ltrace lvm2 mlocate mtr-tiny powermgmt-base rsync strace tcpdump telnet time ubuntu-release-upgrader-core update-manager-core

Same as before, we again need to give some answers to debconf. Select Yes to enable irqbalance:

Elementary OS customization

Select No to continue:

Elementary OS customization

Ok, now that we have installed system utils and removed unwanted software, we can actually install software we will use:

sudo aptitude install -R -y filezilla firefox google-chrome-stable oracle-java8-installer oracle-java8-set-default skype xdg-user-dirs:i386_ thunderbird transmission libreoffice-calc libreoffice-impress libreoffice-writer brasero clementine gmtp browser-plugin-vlc
dconf-editor gdebi gparted flashplugin-installer ttf-mscorefonts-installer gstreamer0.10-nice gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer1.0-fluendo-mp3 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base:i386 ubuntu-restricted-extras libav-tools xine-plugin

If any questions appear by debconf, just press Enter and continue with defaults, except when asked do you accept Oracle Java and ttf-mscorefonts-installer license. Then select Yes to continue.

Elementary OS customization – Clean Up

Our Elementary OS is ready! To do things proper all the way, we need to clean up the system from installation leftovers:

sudo aptitude clean

If you are using Terminal to get work done, you may notice that default history settings are just not enough. Let’s tweak them a bit to be more verbose (replace “$USER_NAME” with your actual user name):

sed -i 's/^HISTSIZE=1000/HISTSIZE=5000/g' /home/"$USER_NAME"/.bashrc
sed -i 's/^HISTFILESIZE=2000/HISTFILESIZE=10000/g' /home/"$USER_NAME"/.bashrc
sed -i '/^HISTFILESIZE=10000/a \HISTTIMEFORMAT="%d/%m/%y %T "' /home/"$USER_NAME"/.bashrc

With all this in place, you can now reboot your computer and start using your newly installed Elementary OS. Thank you for reading and enjoy!

2 thoughts on “Elementary OS 0.4 Loki desktop customization”

  1. Hi, great guide!
    As I’m a Linux newbie can I do all of this customization if I installed a XanMod custom kernel?

Leave a Reply

Your email address will not be published. Required fields are marked *