Fix the Missing Ubuntu One Nautilus Integration in Ubuntu 13.10

Ubuntu One Nautilus Integration

If you have made a fresh clean installation of Ubuntu 13.10, you would have noticed one announced missing feature. The Ubuntu One icons and context menu is missing from Nautilis (File Manager). Why is it missing?? Couldn’t find a valid reason even in Launchpad although Ubuntu One was supposed to be important to Ubuntu. Anyway…

To fix, you will need to install to packages from 13.04 and restart Nautilis. Follow these steps:

Download the required two packages:

wget -O ubuntuone-client-gnome_4.2.0-0ubuntu1_amd64.deb
wget -O libsyncdaemon-1.0-1_4.2.0-0ubuntu1_amd64.deb

Install them:

sudo dpkg -i ubuntuone-client-gnome_4.2.0-0ubuntu1_amd64.deb
sudo dpkg -i libsyncdaemon-1.0-1_4.2.0-0ubuntu1_amd64.deb

Restart Nautilus:

nautilus -q

Back to the day and satisfied days πŸ™‚


Run root Commands in Linux (Ubuntu) Without Password

Terminal Windows

Terminal Windows

Recently a student of mine asked me about running sudo commands in a shell script without prompting for the password. I thought finding the solution would be as easy as typing the question in Google and reading the first result returned. But that was not the case.

The following steps will help you achieve the desired output:

  1. Create a new script file (replace with your desired script name):
    vim ~/

    The script will be created in the user’s home directory

  2. Add some commands that only a root or sudo user can execute like creating a folder at the root directory level:
    mkdir /abc

    Note:Don’t add sudo to these commands. Save and exit (using :wq!)

  3. Assign execute permissions to it using:
    sudo chmod u+x
  4. Make changes so that this script doesn’t require a password.
    1. Open the sudoers file:
      sudo vim /etc/sudoers
    2. Add the following line at the end:
      ahmad ALL=(root) NOPASSWD: /home/ahmad/

      Replace ahmad with whatever your username is. Also make sure this is the last line. Save and exit.

  5. Now when running the command add sudo before it like:
    sudo ./

    This will run the commands inside the script file without asking for a password.

Note: Only the script file mentioned in the sudoers file is exempted from asking a password. The rest will behave as usual.

Remove Unwanted Audio Tracks from Video Files

AVI Files

AVI Files

It is now possible to have multiple audio tracks in a single video. This is becoming common for Movies and Documentaries. This way a single video is good for serving people of different lingual backgrounds. However, like me you might not be interested in all those tracks. In this tutorial, we will remove all the unwanted tracks.

The tool we will be using is avconv and in a previous post I have mentioned how to install it in Ubuntu, so I will not be going into the installation part again.

Check how many Tracks are there

First of all we need to check on the track details and for that, run the following command (the extension can be mp4, mov, mkv, avi or any other):

avconv -i file_name.mkv

In my case, I got the following output:

avconv version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers
  built on Mar 30 2013 22:20:06 with gcc 4.7.2
[matroska,webm @ 0xc31d40] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'file_name.mkv':
  Duration: 00:46:15.28, start: 0.000000, bitrate: 768 kb/s
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1280x720, PAR 1:1 DAR 16:9, 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
    Stream #0.1(rus): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s (default)
    Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
At least one output file must be specified

The lines in bold tell us how many tracks are there.

Removing the track

Since I have no interest in Russia audio, I would like to remove it. In my case I would like to keep the second track. Here is the command:

avconv -i file_name.mkv -map 0:0 -map 0:2 -acodec copy -vcodec copy output.mkv

If your track is different, for instance you want to keep the first track, replace -map 0:2 with -map 0:1 and it will work.

Another advantage you will get is a reduction in file size, which is always a good news. πŸ™‚

Fix the Count Badge of Firefox in Ubuntu Unity

Firefox Count Badge

Firefox Count Badge

With Ubuntu’s Unity interface comes a nice feature of displaying progress or count badge for the application in their Launcher, just as in the picture here. Today however when I updated by browser to Firefox 23 on my Ubuntu 13.04 system, my system crashed (not because of Firefox) and I had to close everything that was open.

I was in a process of downloading two files in Firefox when this crash happened. Everything was working fine after that expect that the count badge and progress was stuck for Firefox. Even a system restart didn’t help.

A Solution of My Own

My natural reaction was to Google it but on this rare occasion, Uncle Google had no answer for me or maybe I wasn’t putting search expression well enough. Anyway, I though of looking for the user profile files and see if any clue was there. So the following is what I did and it worked for me.

I listed all the directories and files in my home directory using ls -la and ls -la ~/.config
Which is a common place for configuration files for various application but unfortunately Firefox isn’t one of those. But what I did find was the hidden .mozilla folder. So after going deeper into the directory structure, this is the file which had answer to my question:

~$ ls -la ~/.mozilla/firefox/nlqcscp8.default/downloads.sqlite
SQLite Database Browser

SQLite Database Browser

One more was that I didn’t have any program to open SQLite file, so I had to install such a software also:

~$ sudo apt-get install sqlitebrowser

Now all I had to do was to open this Application, locate the downloads.sqlite file and delete the rows as should in the picture. Save and done!

Firefox back to normal πŸ™‚

Smartly download stuff from the Command Line using wget

Terminal Windows

Terminal Windows

Normally you would be downloading files from the internet using your browser and its own download manager would be the right choice. However, what if you need to download files on the server which has command-line (terminal) only or you want to download a long list of files but one at a time or you want to limit the maximum download speed so that it doesn’t eat up all your limit. These are just a few of the cases in which wget command comes in handy.

Installing wget

For Linux, the fun part is that it is already installed on every Linux machine. You can verify this running the command:

wget --version

For Windows, there is a download available here. For simplicity, select the option labelled “Complete package, except sources”. Once downloaded, install it. The installation path on Windows XP is “C:\Program Files\GnuWin32\bin” but you can add it to the PATH environment variable to make it easily accessible.

For MAC OS, it doesn’t come installed but getting it is easy. Before installing wget, you need to get HomeBrew, the package manager for MAC OS. Go to and install it by simply running the command mentioned there.

Once HomeBrew is installed, run the following command to install wget:

brew install wget

Once it is installed and ready, we can get started

Downloading a Single File


This will start downloading the file to the current folder in which the Terminal prompt is. Besides downloading, it will display the progress in percentage, the download speed, total bytes downloaded and remaining time.

Downloading a Single File to a Different Location

The file downloaded in above command will be saved in the current working directory of the Terminal and with the name as it was its original name.

To save it with a different name:

wget -O

To save it in a different location, give the path also (which can be relative of absolute):

wget -O /home/user1/

Resume Download for a File

If your file was partially downloaded, you can resume it by using the -c switch, which is for continue.

wget -c

To Limit the Max Download Rate/Speed

wget --limit-rate=50K

This will not download at speed more than 50KB per second.

Download Files in the Background

If there are numerous task and you want that wget keeps on downloading them in the background:

wget -b

Download Multiple Files from a List of URLs

The wget command can take input URLs from a text file with a URL on every line and it will pipeline them for downloading:

wget -i list_of_urls.txt

These are only some of the scenarios I had to come across. I will inshAllah be updating the list of commands as the need arises.

Change Display/Screen Resolution using Linux Command

Display Application in Ubuntu

Display Application in Ubuntu

To change the Screen Resolution in Ubuntu, simply type Display in the Unity Launcher and run the application. The snapshot of the Display application is taken from Ubuntu 12.10 and is also the same in previous versions also. Similar application is available in other Linux distributions.

But there is a handy command that can do the same thing even faster or can help you create a script (depends how creative and productive you plan to be). The command is simple:


This will display all the possible resolution profiles available for the current system (more can also be added and you can find help on

To change to a known resolution:

xrandr -s 1024x768

And you have it! πŸ™‚

Install LibreOffice 4.x on Ubuntu 12.04 and 12.10

LibreOffice 4.x

LibreOffice 4.x

Document Foundation, the developers behind LibreOffice released Version 4.0 on 7th February 2013. Ubuntu 12.04 however is still stuck with Version 3.5 and Ubuntu 12.10 with Version 3.6 of LibreOffice. Its always nice to be up-to-date with the latest versions. This is what is covered in this post.

The first step is to install the PPA repository and there are two choices you have.

  1. To Add 4.0 Repository (this will remain limited to 4.0 and its subversions only like 4.0.x):
    sudo add-apt-repository ppa:libreoffice/libreoffice-4-0
  2. To Add Latest Repository (also offers 4.0.x but later will automatically update to 4.x and above):
    sudo add-apt-repository ppa:libreoffice/ppa

Which ever road you take, the next steps are the same. Run the update command and upgrade the distribution (simple upgrade won’t work):

sudo apt-get update
sudo apt-get dist-upgrade

And you have the latest LibreOffice πŸ™‚