Ubuntu 14.04: A Pleasant Surprise

This is a long personal rant that most of you may find TL;DR. Feel free to skip it, or feel free to read it and enjoy a walk through my tumultuous past with Ubuntu.

If you have been reading posts on this blog you already know that it has been quite some time since I gave up on Ubuntu.

The last Ubuntu release that I had installed on ALL of my computers at home was probably 10.10. Then, Ubuntu announced a lot of changes so I switched to Fedora (verne) on most of my home systems. But, I have always found Fedora, and Redhat, a bit weird. Add to that the fact that I had a bunch of scripts that I used frequently to manage my Ubuntu systems, from package updates to package listing and everything else. But, more than anything else I missed the Ubuntu community.

I feel that, as a Linux distro, Ubuntu’s biggest achievement was the creation of a wide (and very helpful) fan-base around something as trivial as Linux. I say trivial because for people who have been using Linux for some time now, there were always newsgroups and mailing lists. But, Ubuntu’s web based “knowledge management system” (the wiki, askubuntu, etc) combined with, numerous Ubuntu-focused blogs that seem to crop up out of the blue made Ubuntu interesting. Add to that Google’s fantastic search engine, and Ubuntu’s popularity was guaranteed.

Way back in late 2004, a young engineer “gifted” me a whole bunch of Ubuntu CDs. All I could say was “OK! Thanks!”.

That night, at home, I installed Ubuntu on an ancient Thinkpad 600E. Without a doubt, Ubuntu was very easy to install, but, then almost 5 years earlier I had installed Mandrake Linux on that same notebook. And my thought/feeling was that Mandrake Linux felt far easier ages before Ubuntu came on the scene. Bottom line: Ubuntu’s ease of installation didn’t impress me. That night, after playing with Ubuntu for about 2-3 hours, I realized that Ubuntu wasn’t bad, but neither was it as great as most of my colleagues wanted me to believe. Ubuntu felt like a decent Debian based distro.

Oddly enough, I continued to install and use Ubuntu on all of my systems at home. But, I was NEVER happy with Ubuntu. And the fundamental reason was all the useless packages that they were pushing, or rather FORCING,  on to the users. I don’t like people pushing useless pieces of code onto me. And Ubuntu pushed and peddled a lot of useless, open source, crapware onto its users while leaving useful and essential packages out of the distro. And all along, while pushing this bad-ware onto us, Ubuntu did not include essential-ware like compilers and build-tools on their CDs! Or codecs!! You had to download and install the build-essential tools and restricted-extras!! But you had access to absolutely useless pieces of software like Tomboy, Gwibber, UbuntuOne and other stuff that I am fairly certain a VERY SMALL portion of Ubuntu user’s actually found useful.

It’s one thing to say that “you may find the following pieces of code interesting and useful” and its a completely different matter to actually go ahead and just install useless software onto a user’s system. But much worse than those useless software packages was the horrid package dependency tree that required you to uninstall the ENTIRE operating system if you attempted to uninstall a seemingly trivial package!

Realize something: if/when Microsoft installed crapware onto our system, we all – you and I – would be up-in-arms against the 800 lb gorilla from Seattle, WA. But, in Ubuntu’s case … most people seemed to be praising Canonical for peddling useless pieces of software while leaving useful pieces off the distro-CD.

In spite of all my complaints, I continued to use Ubuntu on almost all of my home computers for a L-O-N-G time. There was always one or a few old laptops dedicated to trying out weirdo Linux distros, but, most of my laptops at home ran some version of Ubuntu.

But, by Ubuntu 10.10, things were getting unbearable. Unity and Compiz were well set to make their way onto Ubuntu. And compiz kept crashing on my systems. And Ubuntu had a hard-time supporting hardware devices as trivial as 10-year old Ethernet chipsets, and Wifi and built-in cameras.

Even worse, the “social” features were getting tightly integrated into Ubuntu for reasons that I did not understand. Even worse, trying to remove the stupid “social indicators” like “you got mail” or “your FB friend is trying to bother you” meant a complete system uninstallation.

So, in stead of pulling out my left-over hair, I decided it was time to find a different Linux distro. So, in late 2010 … part ways with Ubuntu … I did.

Somtime in late 2010 or early 2011, I ran back to a distro I had used quite extensively in earlier life: Redhat. But, I never really liked Redhat. For an unknown reason RedHat never felt like a distro for human beings. RedHat always felt snobbish. Ubuntu’s community made Ubuntu the “Linux distro for human beings.” But, I didn’t want to use Ubuntu any more … and I wanted to try GNOME 3.0 … so Fedora seemed to be the best option.

I loved GNOME 3.0. I still do! In fact, I have an old Lenovo 3000 v100 running Ubuntu 13.10 minimal with all GNOME 3.x additions. I feel that GNOME 3.x is a nice departure from the usual Unix/Linux desktops. And I feel more people should contribute to the GNOME 3.x development to make it stable, leaner and overall better.

Within about 3 weeks of starting to use Fedora Verne I knew that I really needed a Debian based distro. And that is how my my search led me to my current favorite distro: Xubuntu.

I believe I started using Xubuntu from the 11.x series. Xubuntu felt like the desktop OS I had always wanted. It’s simple, but NOT ugly. You can install most of the software that is there in Ubuntu repos. And Xubuntu didn’t and still doesn’t come with half the crapware that Ubuntu packages by default. There’s no useless social integration. And there are no useless programs to do useless things that you really don’t want to do: like make notes in software written in C# using Mono on Linux! (What the …)

Sure, I still had to download the compilers and build-tools on Xubuntu, but that was a “hangover” from the parent (Ubuntu). And sure I still had to download the codecs and what have you, but that was because of the bad decisions the parent (Ubuntu) made. But most importantly Xubuntu felt like Linux, not a lame attempt at copying of some fruity, feline operating system that Ubuntu was trying to be and failing miserably. Add to that the fact that most of my scripts from the Ubuntu days worked flawlessly on Xubuntu. And most importantly, I once again had access to the fantastic and helpful Ubuntu community.

So, that was that. Back in Oct 2010 I severed my ties with Ubuntu. And then sometime in late 2011, I established ties with Xubuntu. And I have been using Xubuntu on all-but-one of my home systems for the past 2-3 years without any significant complaints.

For all practical purposes, I had completely forgotten Ubuntu. And I would have never thought of it if Ubuntu hadn’t sneaked up on me the way it did a week ago.

So, a week ago, I got myself a new laptop. At the time of ordering, I knew it did not have any version of Windows on it … which was the reason I bought it … but at least in India, the “cute” thing most of these PC vendors do is that they install FreeDOS on the system when they send it to you. Not the company which made my laptop! Or at least not that reseller from whom I bought the laptop. My new laptop came with Ubuntu 12.10 LTS!! Imagine my shock when I started the notebook and it said “finalizing Ubuntu“!! I was like “no! no! no! what the heck are you doing? nobody installs ubuntu in my house …” but, before I had finished uttering those words … in my head, of course … the laptop was happily smiling at me, asking me for login information. I figured what the heck, why not give it a try … so I logged in and looked around. And lo-n-behold, a lot of the complaints and the bitchin-n-moanin I had done as an Ubuntu user seemed addressed in that release!! I don’t know who did it: was it the hardware manufacturer or was it Canonical/Ubuntu. But, the Ubuntu installation on my new laptop did not have Tomboy or Evolution or Gwibber or all the useless social integration. It had UbuntuOne, but, I purged it even before that piece of software could say a word. There was that ugly Unity interface, but, I could live with it. Unfortunately, the application menu (file, edit, view, etc) still shows up in the top bar. And because of that, there’s no way to switch the “x [] _” window control buttons from left to right because … the application menu still shows up in the top bar. How idiotic is that? Who puts window controls in the top bar other than some tooty-frooty, lame, unncessarily high priced operating systems named after feline species?

But, you know what … just the absence of all that crapware (Tomboy, UbuntuOne, Gwibber, Evolution, etc) and a saner package dependency tree in Ubuntu 12.04 LTS made me happy. Just to give it a hard time, I purged avahi. Without complaints Avahi was gone from my system. I tried to uninstall a few more packages (cups, anyone?) and still no complaints. I was “almost” impressed.

I tried uninstalling a few apps (Thunderbird, etc) and thankfully, the package manager did not suggest that I should try a different distro like it used to in earlier days. So, after playing with Ubuntu 12.10 LTS on my new laptop for about 2 hours, I was pleasantly surprised. Surprised because Ubuntu seemed to have taken some feedback … not necessarily from me … but from a lot of its users and purged a lot of the crapware and cleaned up the package dependency tree. Yes, Unity was still around, as was Compiz … but, then it is never easy to convince people to do ALL the right things.

I attempted a system update from 12.10 LTS to 14.04 LTS but things seemed to break at first. Some editing in /etc seemed to fix a few things, but, I am not sure what else is broken at this point in time. On the whole the system seems to work fine. For an unknown reason this Ubuntu feels OK to use. I may actually use this Ubuntu installation for some time before I install Xubuntu on that new system.

Bottom line: I am going to play with my old friend “Ubuntu” for some more time. All I am hoping for is that my old friend (Ubuntu) doesn’t remind me all over again, all the reasons I had to hate it: like useless packages and even worse, a broken dependency tree that required you to uninstall the operating system or live with all the crapware.

Kudos to the Ubuntu team on FINALLY producing a decent enough Debian based Linux distro.


Show date and time in Xubuntu (as well as other Linux distros)

Microsoft Windows 8.1 has a very neat little feature I use a lot: you can hit “win+c” to bring up the “charm” which shows the clock along with a few other things. For me that ability to see the current date and time makes this “charm” useful. On a side note, I really do not know what that word “charm” means in the Microsoft world but let’s not digress

The fact is that I use my Xubuntu machines more often than my Windows machine. So, I wanted that “show the clock” ability on my Xubuntu 13.10. I basically wanted to hit “win+c”, like in Windows 8.1, and have the current date and time shown in a pop-up-window on my desktop.

I figured I could easily do this with a shell script. Ages ago, I had very briefly played with a command called Zenity. Zenity is a command line program from the GNOME world that lets you show various graphical dialogs. Basically, Zenity lets you add GUI to your shell script.

Knowing all that, I fired up a terminal and read through the man page for Zenity. After a few minutes of playing around with Zenity, I managed to put together a simple script that does what I want: to show the current date and time in a pop-up window on my desktop.

The second part was to associate this script with “win+c” keyboard shortcut. But, before setting up the keyboard shortcut, I put the script into /usr/local/bin on my system and made the script executable. Then, using the “application shortcuts” tab in “keyboard” settings of the Xubuntu “settings manager” I created the “win+c” keyboard shortcut to launch the script.

The end result of all that activity is that now when i hit “windows+c” i get a quick, big date and time window on my desktop. As currently implemented this date and time window disappears after 10 seconds, but, you could hit escape anytime before that to close the window.

NOTE: This is the output from version 1 of the script. Check the update below for newer version.

This is how my script pops up a window showing current date and time

My (first version) script pops up a window showing current date and time

UPDATE Feb 14, 2014: I updated the script to improve the pop-up window display. Specifically, I changed from Zenity’s “info” to “progress bar” dialog option. I changed a few colors and added text that indicates the window can be closed by hitting Escape key. Here is how the new pop-up window looks:

This is how my script pops up a window showing current date and time

My (second version) script pops up a window showing current date and time along with helpful text hinting how to close the window and a progress bar at the bottom indicating when the window will close by itself.

This script is especially useful to me because:

  • I hate multiple panels on my desktop
  • I “auto-hide” the top panel on my Xubuntu desktop
  • I love keyboard shortcuts!

Even if you do show the top panel on your desktop, this script may be useful because of its big date and time display. Try it to see if it is useful to you. And if you find it useful please leave a good/encouraging comment below … as that would be much appreciated. Please note that all comments are moderated, so some comments may not appear on this blog.

You can download the script from my GitHub Gists. The script carries a GPL license.

Note that the script uses Zenity supported Pango Markup to get the display to look “beautiful” with colors and bold formatting … although, as some Chinese or Western philosopher had said “beauty lies in the eyes of the beholder,” so you may want to change the formatting to suit your needs.


Xubuntu 13.10 … after the install

I meant to write this post a long time back, but, I had to attend to some important matters at home, so … here is the post now.

This post is more for my future reference, but, if some or most of the content helps you … that would be all the better.

So, immediately after installing Xubuntu, here are the thing I typical do:

Setup the desktop environment:

Using the settings manager, I set up the desktop environment to my liking. Some of the things I get done in the settings manager include:

  • Delete the bottom panel that Xubuntu has by default. This panel, I believe is designed to give you a fake-Mac like feeling, but, I don’t like it, so it gets deleted immediately after install.
  • I setup my fonts. I like big fonts. E.g. on one of my Xubuntu machines I am using 12pt Droid Sans, which is large enough that I don’t have to squint to read the contents on my desktop.
  • I clean up my main menu and uncheck/hide most of the programs that I don’t use and don’t need.
  • I use keyboard settings to setup application shortcuts. As an example, here are my current application shortcuts …
My Xubuntu keyboard settings.

My Xubuntu keyboard settings.

Setting up screen brightness:

All of my current laptops love to start up into highest brightness. That hurts my eyes. So, I like to set my screen brightness across boots by adding this line into my /etc/rc.local file, before the last exit line in that file:

echo 7 > /sys/class/backlight/acpi_video0/brightness

And with that line added, it is important to make sure that rc.local is actually executable. So:

$ sudo chmod +x /etc/rc.local

Enabling autologin:

I find it painful to select my user-id and then enter the password on my laptops. So, I end up enabling auto login. What that does is simple: the system directly boots into my account, bringing up my desktop directly. You could choose to do this at install time, but, I always forget that. So, I do it manually by editing the /etc/lightdm/lightdm.conf file to add this line:


Set up CapsLock as Control key:

This is fairly important for me because I have a bunch of systems that have CapsLock and Fn keys misplaced. (Yes, I am talking about you old IBM and new Lenovo Thinkpads!) Even more importantly, in my last 25 odd years of using PC-s, I have NEVER used the caps lock key for anything worth while. So, I like to reconfigure my caps lock to make it an additional control key.

First I edit the file /etc/default/keyboard and change XKBOPTIONS like so:


… and then I run this command to make sure the keyboard configuration changes forever:

$ sudo dpkg-reconfigure keyboard-configuration

Setup APT so it does not delete old .deb files:

At home I have a bunch of old systems running Xubuntu 13.10. And I live in India where we pay very high fees for very low speed, flaky Internet access. Also, the bandwidth caps are severe. E.g. I pay almost US $20 (equivalent) for a DSL plan that has the following caps: 1Mbps upto 6GB and about 400kbps after that. Clearly, preserving bandwidth is something I care about. And so, I don’t like to download the same deb packages again and again.

So, what I typically end up doing is that I update one of my Xubuntu systems, then tar up the /var/cache/apt directory and copy that tar onto the other systems. The /var/cache/apt directory has the deb files for latest packages somewhere under it. What this does, is that when I run “sudo apt-get update and sudo apt-get upgrade” on my other systems, they don’t need to download any packages! That’s a huge savings in data download.

(NOTE 1: till a couple of months ago, I had a script which linked my /var/cache/apt/archives directory to a directory on an external drive. The script would then update/upgrade/dist-upgrade the system. What all that would do is to put the updated deb files onto the external drive. Whenever I wanted to update a system, I would connect the external drive to it and run the script. This would avoid the whole tar-gz-scp-gunzip-untar business that I am doing right now to update my systems. I am currently not using that script because I am waiting for my new external HDD. I will publish that script sometime soon with the hope that it helps others.)

(NOTE 2: I need to learn about apt-offline and figure out if it would be easier/better for my case.)

So, the important thing here is to make sure that none of my systems delete old deb files. By default Xubuntu is setup to delete old deb files that are older than the pre-specified number of days, like 30 days or something. What I do is, I tell apt to not delete any of my old deb files … EVER! That is easy to achieve. I just edit /etc/apt/apt.conf.d/20archive file and change all numeric values to 0.

Reduce swappiness:

Ubuntu and its derivatives, like Xubuntu, are configured with a default swappiness value of 60. The swappiness value can range between 0 to 100. A swappiness value of 0 tells the kernel to avoid swapping processes out of memory as much as possible. On the other hand, a swappiness value of 100 tells the kernel to aggressively swap processes out of memory.

I have decent amounts of RAM in most of my current systems, spare one, which only has 2GB of RAM in it. So, I like to set the swappiness on my systems to 5, implying don’t swap too much as much as possible!

To achieve that I edit /etc/sysctl.conf file and add the following line to it:


Remove unwanted packages:

This is the penultimate step. In this step I get rid of the following packages:

  • Risteretto, the XFCE image viewer
  • Mines (package name gnomine and gnome-mines), because who’s got time to play games, eh?
  • Mousepad editor (package name mousepad)
  • Notes (package name xfce4-notes and xfce4-notes-plugin) because I keep my notes in Google Keep.
  • Catfish file search (package name catfish) because if I ever need to hunt down files, I open a terminal and play with find.
  • Orage calendar manager (package name orage) because I don’t think the Xubuntu guys-n-gals were serious when they included that package in the distro.
  • Thunderbird email client (package name thunderbird) because I just read my mail in my browser
  • Pidgin messenger (package name pidgin) because I have never, ever used it and really don’t see the need for it
  • GMusic browser (package name gmusicbrowser) because I don’t even know what this is for!
  • Abiword word processor (package name abiword, abiword-plugin-grammar and abiword-plugin-mathview) because … I never really use a word processor, but … (see next section)
  • GNumeric spreadsheet (package name gnumeric) because I find it hard to use!

Install useful packages:

This is the final step in my post-install modifications. In this step I install a few packages that I find useful.

  • Open SSH server (package name openssh-server) because I really like to ssh and scp into my systems.
  • GEdit, the GNOME text editor (package name gedit) because I feel comfortable using this nice piece of software for most of my normal text editing needs. Although, in reality I find myself launching vi from a terminal more often than using any fancy text editor.
  • Restricted extras which contains all sorts of codecs and other things I don’t really understand but i know I need for my system to be a useful music and video player (package name xubuntu-restricted-extras).
  • Libreoffice which contains a fairly full fledged office suite that satisfies most of my word processing, spreadsheet data analysis. creating presentations, and other office suite needs.
  • A bunch of tiny utilities like xchm (to read CHM files), fbreader (to view EPUB and Mobi files through a really ugly interface).
  • VLC Player if you want to.

And finally … after all those changes are done, I run:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
$ sudo reboot

… and I reboot into a sane system.