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.


Change default font in LibreOffice 4.x Spreadsheets

LibreOffice (henceforth referred to as LO, in this post) is a decent piece of software. I think what makes it better is the price: free.

But, LO is also a VERY FRUSTRATING piece of software. Or at least I find LO very frustrating. I mean, things that a user should be able to do quickly and easily have to be done in a round about way.

I love to do most of my work in plain, pure, simple text files. But, then, there are times when you have to create “documents” and presentations. My usual method of operation for a long time was:

  • I would write my documents in text form (i.e., as an ASCII text file in gedit or even “cat > fileName”) and then add HTML tags to the document “manually” (yeah! go ahead call me crazy)
  • I would write the outline for my presentations in text form (again, as an ASCII text file) and then use the some presentation creator (e.g., like the one in Google Drive) to create the final presentation

Till about 3 months ago, the only reason I would invoke a spreadsheet (typically Excel, which was the only reason I would need a Windows and an Office licence) would be to create a pretty-chart to insert into a document or a presentation. Other than that I was blissfully ignorant of all the cool things Excel and other spreadsheets could do although frankly the real reason was that I didn’t care that those spreadsheet apps could do so much.

If I had to do some “significant” (not really) calculations on a given piece of data, then, till about 3 months ago, I would do my calculations by starting either bc/dc or the python interpreter. For longer calculations, I would write simple python code. (My knowledge of Python is restricted to writing elementary programming constructs, but, my calculations were also pretty simple till 3 months ago, so that knowledge sufficed.)

So, that was that … till about 3 months ago.

Then, about 3 months ago, I “discovered” the power of spreadsheets. (Now you know I have been living under a rock for a LONG time, right?) And I instantly fell in love with them. My current understanding is that spreadsheets are great not only for creating pretty-charts from cooked-up data, but, they are also good for routine calculations.  With a spreadsheet you don’t have to worry about “how am I going to read that data into my program”. Why? Because you work with the data … directly. Your program is specified as a bunch of formulas that you insert into various cells where you want some calculations done. And most of these spreadsheets, but, especially Excel, come with an extensive library of functions you can use to manipulate your data. Pretty cool, isn’t it?

Now, all that sounds great and works well, but, there’s one big problem in Linux-land. No, the problem isn’t that there’s no good spreadsheet software. In fact, if you search online you would find a lot of open source spreadsheet software for Linux. The problem is that none of that spreadsheet software is as “nice” as Excel.

LibreOffice Calc comes pretty close to be being “nice” but it is like using Excel 1980 rather than using Excel 2013. Why do I say that? Because even a simple function like “set default font for ALL my spreadsheets … now and in the future” is absent. And the developers seem to have no intention to provide that function for whatever philosophical reasons. Mind you, we are talking about LibreOffice 4.x here, not LibreOffice 0.04.

(On a side note, the biggest problem with open source software is that there are TOO MANY philosophers who “initiate” the code and then never contribute a line to that code but continue to rule as the “Benevolent Dictators“. And in the world we live in, where we love to make Gods out of humans, we accept these “abusive” benevolent dictators as Gods for no apparent reasons.)

So, anyway, I googled around and did not find any workable solution for my little problem of “set default font for ALL my spreadsheets … now and in the future” in LibreOffice 4.x Calc. There were things like: create a default template (how?) or choose File->Template (not there in LO 4.x), etc. So, I figured I would try my own trick. And luckily it worked, so here it is for my future reference. If it helps you, all the better.

So, what’s the procedure to “set default font for ALL my spreadsheets … now and in the future” in LibreOffice 4.x Calc? Here’s what I did:

First, I created a new, empty spreadsheet file. Then, I chose “Format->Styles & Formatting …”. Then I right clicked the “Default” list-member and chose “modify”.


Modify The Default

In LibreOffice 4.x Calc, choose “Format->Styles & Formatting” and then, choose to “Modify” the “Default”

In the Font tab, I chose to set my font to “Ubuntu, size 16”. Yeah! I like B-I-G fonts.

Choose Your Font ... wisely.

Change the default font. I like B-I-G fonts, so I chose “ubuntu font, size 16” as shown here.

With that done, I chose to save this file as a “template”. I called it “libreOfficeCalcTemple”, although LO added an ots extension to it. This file was saved in “~/.config/libreoffice/4/user/template/” directory which has been set as the default path where LibreOffice 4.x would save its template files.

Now, under ordinary circumstances, I expected that a new invocation of LibreOffice Calc would automatically pick up this spreadsheet template from the default path. But, NOPE! It didn’t even recognize that spreadsheet template’s existence. What gives? I don’t know! And frankly, I don’t care.

So, then, I started LibreOffice (the general program, not the calc/spreadsheet part of it). This brought up this screen:

Start LibreOffice general program

Start LibreOffice, the general program, without any specific functionality (spreadsheet, wordprocessing, etc) and choose “Templates …”

From there, I clicked the “SpreadSheets” tab, and chose to import my “saved” template. Once my template showed up, I chose “Set default” to make that my default template.

Set your template as default

Set your chosen template as the default template for all your spreadsheets henceforth.

Once all that was done, the next invocation of LibreOffice 4.0 Calc came up with “my” font specification.

The point here is that for something as trivial as “set default font for ALL my spreadsheets … now and in the future” I had to jump through infinite hoops (create template file, save it, pull it up again, set it as default, etc) which I feel is unnecessary trouble. So, my humble request to the LibreOffice devs: please set your “high” philosophies aside and create a piece of software that is easy and fun to use. We don’t want a Microsoft Office replacement. We just want a functional, fun and easy to use “office” software. Because if we really wanted to do something the hard way we would all just move to Emacs (JK. BTW, that’s coming from a guy who has used Emacs EVERYDAY for 5+ years … but just used … never really written any Emacs extensions).

Anyway, so if that tip helps you, all the better. If not, ignore my rant.

Grab files from web servers with wget

wget and curl are two fantastic utilities to grab content from the Interwebs. In their simplest forms, both these utilities allow you to download publicly available files from web sites. In reality, each of them is a very complex beast that you would have to learn and practice for a very long time to claim any level of mastery. Point being, we are not here to teach/learn either wget or curl and all their intricacies. There are lots of blog posts, web pages and web sites that teach you how to master wget and curl, so we will leave all that teaching to those posts, pages and sites.

What I want to demonstrate here is an interesting problem I faced today. So, I use wget fairly regularly to download content from the web that I like to read later. As I mentioned earlier, all the content under consideration here falls into publicly available and publicly accessible files on various web sites. If you are point-n-click fan, then you can choose to right-click on a particular link and then choose to save it. That is too much of a trouble for me. I like to “automate” things. 🙂 So, I just make a note of the complete path to the file and save it. Then, I add wget in front of the complete paths of all those files I want to save for later reading, and save all this as a simple shell script. Finally, just before going to bed, I run that download script containing wget followed by comlete URLs of files I want to download. Within a few moments all the files that I need are downloaded, without me having to right-click and choose save … a million times.

Now, is any of that innovative? Absolutely not! So, what problem did I face today? Well! I was trying to download a few files from a site (a stock market in India, which we will not name here) using wget, but, wget failed to get them and in stead gave me “HTTP error code 403 forbidden” error message.

Under ordinary circumstances I would have given up on downloading those files, but, the funny thing was that I could download those files with Firefox “right-click and save”!! Why would that be? It seems that stupid, crazy engineers at some companies (like this stock market in India) can deny output to browsers that they do not know about. So, if a site has been coded to serve information to say, Firefox and IE, then, any other user-agent (browser or bot, etc) could be denied access to the data. Or at least that’s how I understand it. Why would they do that? Who knows! Like I said, my guess is they are stupid and crazy. But, that being so, what’s an ordinary human to do? Thankfully, I had dealt with this problem earlier, so, I ran wget but gave it a user-agent string of Firefox. And within moments, wget was downloading files like there was no tomorrow. So, the command is:

$ wget -U Firefox "URL of file to download"

The “-U Firefox” helps wget announce itself as the “Firefox browser”. That may seem like cheating, but, its not. It is the site that is incorrectly coded.

Bottom line: wget is one fantastic utility.

Trouble in TP-Link land!

Some time back I wrote a post about how my D-Link DSL router’s Wifi broke down leaving me with no way to access critically important sites like Facebook, Twitter, Pinterest and Google+. So, I had to hunt down an old TP-Link MR3020 router and create a hideous looking wireless network that had more wires than I would have loved to have around. Thanks to all the goofing around I did back then (and recorded meticulously in that blog post), I have been able to browse the Interwebs and consume all the knowledge that is out there (e.g. mother kitteh’s love their little kitteh’s, doggeh’s love to chase their own tails, etc).

A few days back a strange and interesting phenomenon happened. I live in a small apartment that is probably not more than 30 ft in length and not more than 20 ft in width. This house would have been a great loft, if the builder hadn’t decided to provide “privacy” to the bedroom. So, there’s one big wall that separates the bedroom from the rest of the house.

The Wifi signal from the TP-Link MR-3020 router reaches most parts of the house, but, there’s a section of cupboards in the bedroom where it does not reach. I would not have detected that dead-zone had it not been for a tiny little Samsung N150 netbook that I am converting (at snail’s pace) into a simple home server. To keep things manageable, I put the Samsung N150 netbook, an external monitor and a Canon scanner+printer into one of the cupboards. But, with that setup in the cupboard, I was not able to access the Interwebs from the Samsung. And even worse, I was not able to access the Samsung N150 netbook and its connected printer/scanner from the other computers in my house. A quick check revealed what I was scared of: the Sammy had no Wifi connectivity!

Pulling the Sammy 2 feet out of the cupboard and into the open enabled it to connect to my home Wifi network. Hmm! What’s a human to do in such a situation? There’s only one thing: get more networking equipment. So, I quickly logged onto a local online retailer and ordered the cheapest Wifi box I could find, which incidentally happened to be a TP-Link WR702-N wireless device. This box is a tiny Wifi device that can be configured in various ways … if you can get to it!

So, the box arrived today (mid May 2014) afternoon, but, this being the peak summer season in India, I decided to ignore it till evening. Then, in the evening, I pulled the TP-Link WR702-N out of the box and decided to configure it in “repeater mode” with the hope of extending my current Wifi network’s range deep into the cupboards.

As with all TP-Link products, the router came packed in a neat little box. The device itself is very small in size, if you care about that aspect of it. The most shocking part of the whole package was a seemingly well written “Quick User Guide” (QUG) that was inside the package. Now … I like to live dangerously, so I don’t RTFM (read the fine manuals) that accompany the devices I buy. But, considering all the trouble I had earlier in configuring the TP-Link MR3020 router, I figured it would help to RTFM this time through. At first impression,  was I impressed with the beautifully done, poster size “Quick User Guide” that came with my new TP-Link WR702-N Wifi device? Yes I was!

According to the QUG all I had to do was connect to the “default/preconfigured” Wifi network on the TP-Link WR702-N Wifi device, configure it using a simple menu and I would be in networking heaven. Then reality hit me

Here is my suggestion if you get yourself the TP-Link WR702-N Wifi device: shred the freakin’ QUG and throw away the pieces so that you never mess your mind. God save the world! That TP-Link WR702-N Quick User Guide is not only utterly useless, it is completely wrong. Why do I say that: because you CANNOT connect to the “default, preconfigured” Wifi network on the TP-Link WR702-N. Since there’s no obvious way to get into the box, there’s no obvious way to configure the box! But, I figured out a way! Here’s what I did:

The TP-Link WR702-N has two ports: a tiny USB port and an Ethernet port. Cables for both the ports are provided with the box. So, connect the cables to the TP-Link WR702-N  appropriately. Then, connect the other ends of those cables to your computer. Now starts the fun part. Your computer/laptop/netbook/whatever is going to spin round and round to get an IP address from the TP-Link WR702-N, but, the TP-Link WR702-N is NOT going to give any IP address to your computer. Why? I don’t know! I really don’t! So, what should you do? Irrespective of whether you are on Windows, or Linux or Mac OS X, you gotta do these steps:

  • disable DHCP on your computer’s Ethernet port
  • configure a static IP address on your computer’s Ethernet port – anything in the 192.168.0/24 range would do, but, is the TP-Link WR702-N device’s default address, so, I chose

In my specific case, my laptop runs Xubuntu 13.10, so I had to do all those things (disable DHCP and configure an IP address manuall) from the Network Manager configuration utility. VERY IMPORTANT: do NOT, and I repeat, DO NOT, try to configure the IP address for your computer’s Ethernet port from the shell. I tried being a smart whatever, but quickly realized that Network Manager continuously ran DHCP client on my Ethernet port. So, even if I configured the IP address manually (sudo ifconfig eth0 up), NM would undo that configuration within the next few moments and then go into a loop requesting IP address from the TP-Link WR702-N.

So, your best bet is to edit your network connections and add a new Ethernet interface that would have a manually configured IP address, in stead of a dynamically acquired IP address.

Network Connections shows two Ethernet interfaces: Eth0-1 and Eth0.

Setup two interfaces on your Linux box. Eth0-1 has a manually configured IP address that lets it connect to the TP-Link WR702-N device. Eth0 is the default Ethernet interface that fetches its IP address dynamically using DHCP.

Here is how my Eth0-1 is setup:

Eth0-1 configuration

Setup Eth0-1 with a manual IP address, in this case. (NOTE that i had changed the IP address of the TP-Link WR702-N router to be earlier.)

Once you have done that, login to the TP-Link WR702-N Wifi device and start setting it up. To do that you need to start your browser and point it to (or in my case). Assuming you haven’t done any changes yet, the login and password are both set to admin by default. Now, you would be tempted to get into the “Quick Setup” option provided by TP-Link WR702-N configuration utility/web page. But, don’t do that. In stead go through the process manually.

In my case, I wanted to configure the TP-Link WR702-N box as a Wifi Repeater. So, I had to setup the following:

In “Working Mode” I chose the “Repeater” mode as shown here and saved it.

Setting the TP-Link WR702-N in Wifi Repeater Mode

Setting the TP-Link WR702-N in Wifi Repeater Mode

In “Wireless Settings” I configured the Wifi network that I wanted to “repeat”. For this example, assume that the network name is “abracadabra” and the security password for the network is “bogusPassword”. Also, assume that the MAC address of the TP-Link MR3020 is “”64:70:02:55:55:55” which in TP-Link case translates as “64-70-02-55-55-55”. (Seriously! Who in his right mind uses dashes in stead of the universally accepted colons to write a MAC address? TP-Link does!) Don’t forget to save all that info once you have configured your TP-Link WR702-N device. So, here’s how the whole configuration looks in my case:

The wireless settings on my TP-Link WR702-N box setup as a Wifi Repeater

The wireless settings on my TP-Link WR702-N box setup as a Wifi Repeater.

In “DHCP Settings” I chose to disable DHCP because my TP-Link MR3020 issues appropriate, preconfigured, IP addresses to my notebooks, tablets, and phones.

Disable DHCP on the TP-Link WR702-N

Disable DHCP on the TP-Link WR702-N

Once all that was done, I chose to reboot!

Just reboot, already!

Just reboot, already!

Then, when the  TP-Link WR702-N came back up, it was ready to play its role in my network: that of a Wifi repeater.

Bottom line: never RTFM … especially TP-Link manuals and their online help. (JK)

PortableApps on Xubuntu

This is not going to be news to anyone, but, I just got PortableApps running on Wine on Xubuntu 13.10.

Backstory: A few weeks back I got myself a tiny netbook that runs Windows 8.1 on some really low end AMD CPU/GPU combo. This netbook is so underpowered that it cannot even render those “curves” around window corners. There are no special effects and there are no graphical gizmos on this machine.

That being the case, I figured now or later some Linux distro was gonna find its way onto this netbook. So, I didn’t want to install all the usual apps on this notebook: firefox, chrome, libreoffice, etc. And the easiest option seemed to be to try out PortableApps. So, I pulled out an old hard drive, plugged it into an external case, formatted it and installed PortableApps onto it. Within moments a few usual suspects (firefox, chrome, libreoffice, Notepad++, etc) found their way onto the drive. A few moments later the PortableApps icon appeared on the task bar and in the system tray of the Windows 8.1 running on the netbook. I started a few apps and made sure things were working. So far so good.

Now! A few days back, for reasons that don’t concern us here, I installed Wine on my Xubuntu laptop. And today, during some idle time (an empty mind is a devil’s workshop) a thought suddenly occured to me: would PortableApps run on Wine on Xubuntu? There was only one way to find out: I plugged in the PortableApps hdd into my Xubuntu laptop, and chose to run the PortableApps “Start.exe” with Wine. I got some warning saying the autorun.inf or some such file was modified … blah, blah, blah! I decided to ignore that warning. (I know that’s not good. But, I catted the Autorun.inf file and it seems alright to me. We will only know when I plug this back into Windows 8.1.) A small window popped up that had the PortableApps icon in it. Clicking that icon brought up the PortableApps menu! Choosing to start some apps brings them up nicely. I am happy!

PortableApps Menu seen while running PortableApps running on Wine on Xubuntu.

PortableApps running on Wine on Xubuntu. 😀

The obvious question is: why? Why in the world would you want to do this? I mean most apps that you could install through PortableApps are freely available in all Linux distros. So, why? Why go crazy? The answer, my friend is … well! Hmm! There is no answer. I just wanted to try it out. And it works. But, now I am thinking my external drive could very well end up becoming the place where I plunk all my notes, docs, presentations and spreadsheets.

So, if you want to run PortableApps on your Linux distro, you very well can. Go ahead and try it out, you will love it.

A quick script to list all installed packages

I wanted a list of all the installed packages on my Xubuntu system. The easiest choice was to start the Ubuntu Software Center and click on the “Installed” tab. But, that requires at least one mouse/touchpad click and that is painful for me! So, I wanted a command-line option. Naturally, I googled for it but came up with no quick-to-use, ready-made solutions. So, I read glanced through the Ubuntu Community AptGet Howto and put together a quick, tiny script that is now publicly available as yet another GitHub Gist.

You will have to download the gist which will arrive in “tar.gz” format. So, you untar-gz it (tar fxvz <gist-name>.tar.gz). You will find the script itself under “<gist-name>/” directory after the untar-gz finishes. So, once you have the script, copy it to a convenient location like say “/usr/local/bin“. Assuming you haven’t renamed the script file itself, you should now see the file as “/usr/local/bin/listInstalledPackages.sh“. So, “chmod 555 /usr/local/bin/listInstalledPackages.sh” and you are good to go.

Assuming “/usr/local/bin” is in your PATH, here are some simple ways to use the script:

$ listInstalledPackages.sh | less

That will generate a paginated list of all the packages installed on your system.

$ listInstalledPackages.sh | wc -l

That will generate a total count of how many packages are installed on your system.

$ listInstalledPackages.sh | grep -i bluetooth | less

That will generate a paginated list of installed packages that have the string “bluetooth” in them. You can obviously use any other single word in place of bluetooth to find packages with that specific string.

$ listInstalledPackages.sh | grep -i pidgin | less # list all installed packages with pidgin in them
$ listInstalledPackages.sh | grep -i zenity | less #list all installed packages with zenity in them
$ listInstalledPackages.sh | grep -i ibus | less #list all installed packages with ibus in them

So, that’s that! 😀

This script should work on most Debian based systems like:

  • Debian itself
  • Ubuntu, Lubuntu, Xubuntu, Kubuntu
  • Linux Mint
  • Bodhi Linux
  • CrunchBang Linux
  • Kali Linux
  • etc.

If you want to know how this simple script works, read the comments at the bottom of the script file.


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.