Category Archives: Tips and Tricks

KeePassX – The Best Password Manager for Ubuntu/Linux

KeePassX is a cross-platform password manager application. It has very high security standards. Since, it stores data locally in encrypted format, it’s probably a better alternative to any online password manager. If you want to share it across multiple devices/platforms just sync the database file using some apps like Dropbox. Make sure you’re synchronizing the encrypted file(*.kdb), not the raw *.xml export or anything else.

add password keepassx

It has simple and lightweight graphical interface, with all the basic features, to make password management easier for everyone. It comes in very handy if you manage lots of online accounts at various sites, because having a unique and strong password for each website is highly recommended. With KeePassX, the Master Password is all you need to remember.

Installing/Setting up KeePassX on Ubuntu [14.04 LTS]

It’s very likely (in most common GNU/Linux distributions – Debian, Ubuntu, Linux Mint etc) that it’s already there in your default package repository. Just open a terminal (default shortcut : Ctrl+Alt+t) and type

sudo apt-get install keepassx

After installing KeePassX, set up the Master Password or Key. And you should also configure/specify the location for storing the database file. KeePassX will prompt you to enter the master key every time you open the application. Keep a very long Master password (I use 22 letters with lower & upper case letters, numbers and special characters) and remember that. On the other hand, you could also use key pairs instead of password. (or both if you wish)

Additional features include a random password generator, storing urls, comments, usernames, attachments etc in a simple and easy way. Passwords can be easily organized in multiple groups and unique icons can be specified for each group.

Visit the official site to know more about the features (or to get package for other distro) and drop a comment here if you’ve any question/issue related to KeePassX.

Taskwarrior – Terminal based TODO Application

Taskwarrior is a command line app for managing your todo list. It’s lightweight, simple and fast. If you spend lot of time on terminal (as a developer or system administrator) then constantly switching to a web app or another GUI based todo app may not be very productive thing to do. In that case, you may want to try a simple command line application instead.


Taskwarrior has human-friendly natural command line syntax. You will also like its simplicity. I like how it doesn’t reinforce any particular methodology (whether you prefer GTD or something else, it doesn’t matter). Here is a simple command for adding a task :

task add Write an article about task due:tomorrow

Installing Taskwarrior in Ubuntu/Linux

If you’re using a GNU/Linux distribution such as Ubuntu, then it’s already there in your package repository (I’ve tested on Ubuntu 14.40 LTS) under the name ‘task‘.

sudo apt-get install task

For older version or other distributions you may want to download it from official site.

Few important commands you should know

  • task add sample task (adding a task, you could specify other things like priority or due date etc)
  • task list (it lists all the pending task with their ids and other details)
  • task 5 done (marks the task with the id 5 completed)
  • task 4 delete (deletes the task with id 4)
  • task all (displays all the pending and completed tasks)

If you want to know more about the features read the man pages (man task) or read some tutorials on official website.

Optimize WordPress for Speed – In 5 simple steps

Improving the load time for a wordpress blog has lots of benefits – good user experience (faster page loads also results in more pageviews), better rankings in search engines (SEO), reduced cost (due to reduction in resource (RAM, CPU, cycles and bandwidth) usage) etc.

So, if you run a wordpress blog/website that needs a little optimization you should follow this guide. But you need root access to your server. If you’re on a shared server, then first things you should do is move to a VPS; it’s cheap, faster and more secure and you also get full control over the server environment.

I’m using Digital Ocean for this blog and I’m pretty happy with the performance (read my review on digital ocean and the article about setting up wordpress on vps server). They’ve plan starting at $5/mo, cheaper than most of the shared hosting providers. Signup using my referral link and get 2 months of free hosting – $10 credit to give it a try.

speed up wordpress

Step 1. Enable Caching

Caching static resources such as images, css, js etc on the browser helps in reducing page load time on subsequent page visits.You can enable browser caching either using a plugin or manually. If you’re using Apache, then you can skip this step as Hyper Cache will do that for you (using htaccess config).

Caching static content (browser)
Login to your server(over ssh) and type (I assume you’re using Ubuntu or any debian derivative for OS with nginx as the web server, otherwise change command accordingly) :

sudo nano /etc/nginx/sites-available/site.conf

Add these lines to enable browser caching with nginx.

Save the file (Ctrl x and y) and reload the nginx server to apply above configuration.

sudo service nginx reload

PHP caching If you’re using lots of plugin then the php code will take lots of time and resources to execute, that means server response time will be high (not a good thing). So, caching php code means – the server will send cached html instead of generating it on every single request (which is lot faster). As a result, the server response time (as well as TTFB (Time to First Byte)) will go down (that means faster page load, even on first visit). To enable php caching there are lots of ways, the most simple way is to use HyperCache plugin. (Disable browser caching or compression if you’ve already done that manually with nginx) Download HyperCache plugin for wordpress and enable/activate it. (you can do it from wordpress dashboard or by manually extracting the file on server)

Step 2. Enable Compression

Sending compressed data over the network means faster download time for pages, plus you’ll save bandwidth for server and user as well. All modern browser supports compression, so there is no reason why you shouldn’t be using it. SSH into to the server and type :

sudo nano /etc/nginx/nginx.conf

And add these lines to nginx config. (you may want to tweak few variables like compression level etc depending on your need, if you’re not sure, then just go with the default value)

Save the file (Ctrl x and y) and reload the nginx server to apply above configuration.

sudo service nginx reload

Step 3. Move JS to Footer

By default, most of the WordPress themes load javascript files in header and it causes render blocking issue. The browser will not start rendering the page until all the javascript files are downloaded. Moving those js files (jquery etc) to bottom of the page (before body tag) will have good impact on page loading time, especially if you use lots of js plugins.

To move the javascript to footer, simply download and install this plugin and clear the cache from wordpress dashboard -> Settings -> Hyper Cache page.

Step 4. Use CDN for jQuery

Using CDN for jquery has many advantages. It reduces load/bandwidth on your server, low latency for users (since the jquery will be downloaded from the CDN end point near to your user, that means faster download) and lots of other people use it, So, it may be already cached in user’s browser (best case). First you need to find out the jquery version you are using, so you can specify exact version from below.

  • For jquery : Google CDN
  • For jQuery migrate :  jQuery CDN

To use above CDN, just add these lines to your theme’s functions.php (at the end) and clear the cache (if you’re using any caching). Don’t forget to correct jquery version if required. (you can edit it using wordpress dashboard -> Appearances -> Editor but make sure you’ve already created a backup for theme files, in case anything goes wrong.)

Step 5. Image Optimization

Optimizing images is important because it’s usually the most heavy static resource on a web page. So, if you use lots of images in your blog pages/articles, then you should :

  • Optimize images before upload (use an online tool like this one : You can also use some plugins like this one. (BTW, I haven’t used them but it seems good)
  • Avoid scaling/resizing a big bulky image after page load. Scale images to the required size before you upload them or use this plugin – Imsanity
  • And you can also use imgur or Dropbox to host your images. (it will act as CDN)
speed up wordpress

How to setup wordpress on Ubuntu 12.04 Server (VPS)

It’s a step by step guide for setting up wordpress on a vanila server (e.g Digital Ocean, don’t know about it? then read Digital Ocean VPS Review) running Ubuntu 12.04 LTS (latest LTS release, recommended for server). With, most of the VPS providers, you can deploy GNU/Linux distribution from their control panel itself, after that, everything will done over the ssh connection.

setting up wordpress

Step 1. Setting up the server

ssh into the server and create a user (as it’s not a good idea to use root account).

ssh root@vps_ip_address
apt-get -y update
adduser user_name --ingroup sudo

Now, logout from the current session and login again with the user newly created above.

ssh user_name@vps_ip_address

Install the web server – Apache (you could also choose nginx)

sudo apt-get install apache2

Now, create a virtual host –
In this tutorial I’ll be using nano editor (a light-weight command line editor) So, if it’s not already installed – then install it using sudo apt-get install nano.

sudo nano /etc/apache2/sites-available/

and add this contents (change few things according to your need such as domain name, user_name)

If you selected nginx instead of Apache, here is a sample configuration for nginx/wordpress blog.

Then enable the virtual host,

sudo a2ensite
sudo service apache2 reload

Step 2. Installing Dependencies (PHP, MySQL)

During installation process, you will be asked to provide password for MySQL root account.

sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5 php5-mysql

For image manipulation, wordpress uses php-gd library, so you need to install that as well,

sudo apt-get install php5-gd

You may have to enable rewrite mod for apache2, to do that simply type :

sudo a2enmod rewrite
sudo service apache2 restart

Step 3. Creating Database

Login with MySQL root account and create the required users and databases (you need to remember these details for wp-config.php)

mysql -u root -p
create database DBNAME;
grant all on DBNAME.* to DB_USER@localhost identified by 'password';

Step 4. Installing WordPress

Download the latest version of wordpress and extract its content.

cd ~
tar -xzvf latest.tar.gz

For simplicity, you can rename the wordpress directory to something like – your domain name e.g

mv wordpress

Now, you can manually edit the wp-config.php file or go through the automated installation process (just visit the URL, I assume you have setup DNS correctly, or use IP address instead).

nano wp-config-sample.php

Then add the database details and random strings for session tokens etc and save the file (Ctrl+x, y). Now, rename the file.

mv wp-config-sample.php wp-config.php

That’s set, you’ve successfully installed wordpress, visit the URL/IP_ADDRESS and create the admin user.

Moving your Blog ?

If you’re moving your old wordpress blog to a new server, then you also need to copy wp-contents directory (from the old one to new server, it’s the directory – that holds your images, themes and plugins). Besides that you will also have to export/import database contents. Use your server control panel or a tool like PHPMyAdmin (which is usually installed on all shared hosting providers) to export your database contents in *.sql format.

I assume you already have an exported database file (*.sql), So you can easily import it, on new server using the single command –

mysql -h localhost -u DB_USER -p DB_NAME < db_backup.sql

Note : If you have any problem during installation, then leave a comment here, we’ll try to figure it out!

Ubuntu 12.10 - Desktop

10 things to do after installing Ubuntu 12.10

After a fresh install, you need to install/configure few programs in order to get things done on Ubuntu 12.10 (a.k.a Quantal Quetzal, it’s the code name for this release). Since Linux based distributions (such as Ubuntu) are based on Configuration Over Convention principle, so they can’t just do all the things by default.

There are some licensing problems too, with proprietary libraries and codecs. But no one is stopping you, from doing what you want – so go ahead and customize your Ubuntu (12.10) desktop as you want; before you move on to some advanced stuffs, here are few essential things you should complete first.

Ubuntu 12.10 - Desktop
Ubuntu 12.10 – Unity, The default desktop

These steps are not strictly required but might help you in getting a better experience with Ubuntu 12.10 and possibly save a lot of time later if you’re a beginner Ubuntu user.

#1. Update your system

software-updater in Ubuntu 12.10

Update your package repository cache so that next time when you install something, it will have the latest details about that application/package. You can just run the Software Updater (the new update manager) or just execute the commands –

sudo apt-get update
sudo apt-get upgrade

#2. Install some necessary programs/ media codecs

As explained earlier, the media codecs for playing your music files (mp3), flash player for playing flash content while browsing with Mozilla Firefox etc are missing and they are crucial for everyday things (even though web is moving from Flash to HTML5, the transition has not been completed yet). To install these common media codecs – simply install the ubuntu-restricted-extras package (which bundles all the commonly used proprietary codecs/libraries). Open a terminal and execute –

sudo apt-get install ubuntu-restricted-extras

Although, the above command will install some popular proprietary libraries/plugins but still you won’t  be able to play encrypted DVDs (most of the commercial DVDs are encrypted using CSS(Content Scramble System), some sort of DRM technique). libdvdcss is the free and open source solution for that. To install libdvdcss, execute the command –

sudo apt-get install libdvdread4
sudo /usr/share/doc/libdvdread4/

File Compression/Decompression utility

For compressing/decompressing popular file formats such as zip, rar, 7z, xz, tar, gzip, bz2, xar etc install 7zip, type the commands –

sudo apt-get install p7zip-full p7zip-rar

#3. Install Drivers for your devices

Although most of the things works out of box and you don’t need to install any drivers for the basic devices. But for other devices such as printer, graphics card, tablet, etc you will have to install the appropriate device drivers, in order to work.


Installing Webcam software
For controlling your webcam, you can try cheese or guvcviewer (looks better than cheese, certainly for video recording). To install cheese, simply execute –

sudo apt-get install cheese

or install guvcview webcam software using the PPA –

sudo add-apt-repository ppa:pj-assis/ppa
sudo apt-get update
sudo apt-get install guvcview

Installing Graphics Card drivers

Installing nvidia-drivers

The Additional Drivers section, which used be there in system settings (in older version of Ubuntu), has moved to a new tab in Software Sources section. So if you’re using a graphics card (e.g a Nvidia Graphics card or whatever) then you might want to enable proprietary drivers (select a driver which is tested by Ubuntu developers) from that, unless you’re not experiencing any graphics problem with the open source driver (nouveau driver, in the above screenshot), enabled by default. When you select and apply changes, it will download/install the drivers. You may also have to restart your computer.

Installing Printer Drivers

Installing Printer Driver

When you connect printer to the computer, the automatic driver installation setup should be started, you just need to select the correct model and it will automatically download and install the correct driver for printer/scanner (it’s far easier when you’re using HP or Canon printer). On the other hand if the automatic detection/setup process doesn’t begin you can manually start the process or in worst case you can download/install the driver manually from the official website of your printer/driver.

Read More about installing a printer/driver in Ubuntu

#4. Install VLC – “All in One” Media Player

Playing VLC in Ubuntu 12.10

VLC multimedia player is a must have application, it supports a variety of file formats. TO install vlc simply execute –

sudo apt-get install vlc


#5. Find and Install your favorite application

Ubuntu Software Center has thousands of free and open source apps, now even paid apps. So there is more likely that you will find a free and open source equivalent of your favorite window app, probably a better one (not kidding).


Don’t like Firefox ? or just want a secondary browser, Try Google Chrome or Chromium!

Download and Install Google Chrome Browser (open the *.deb file with Ubuntu Software Center)

Want an image editing App ? like Adobe Photoshop, Try GIMP!
sudo apt-get install gimp
A simple Music Player like winamp ? Try Audacious!
sudo apt-get install audacious


Open Ubuntu Software Center or Synaptic Package Manager (or terminal, if that’s what you prefer – use sudo apt-cache search <app_name>) and explore your favorite apps. In Software center, there are user ratings and comments, which will also help you in filtering great apps.

Few cool apps you might want to try –

  • SMPlayer – a great MPlayer front-end
  • Chromium – another great browser
  • Kazam – for creating screencast
  • Clementine Music Player – A powerful music player
  • Shutter – featured rich screenshot app
  • Pinta – image editing program for beginners
  • Hotot – a cool Twitter CLient
  • Pidgin – Chat client
  • Bleachbit – CCleaner for Ubuntu
  • Filezilla – FTP Client
  • NitroTasks – a TODO management application
  • K3b – Disk writing program

and don’t forget to try integrating some cool web apps, right into your desktop. Go to System Settings -> Online Accounts for managing various accounts.

#6. Disable Amazon search results in Unity Dash search

Privacy Settings - Online Search option

If you don’t like the amazon products in unity search results, then you can turn it off from the privacy settings. Go to Privacy Settings -> Search Results and adjust the settings.Or, you can just uninstall unity lens for shopping, using the command (you may have to reboot the computer) –

sudo apt-get remove unity-lens-shopping

You should also checkout some other privacy options and adjust it as you want.

#7. setup a backup program

Configure the Default backup client

You should always have a backup of all your important files and it’s pretty easy too (and free). Dejadup is the default backup program installed in Ubuntu  12.10, you just need to configure it (locate the important files/directories and select a remote backup location such as Dropbox, Ubuntu One, Amazon S3 etc)



If you have used (or want to give it a try (or if you have Ubuntu One account then you can start using that instead)) Dropbox before then first install the app.

sudo apt-get install nautilus-dropbox

Then start the application and login or Create a free account (if you don’t have already one) and you’re reay to upload/sync your critical stuffs.

Ubuntu One


Ubuntu One is another great client that offers 5GB of free storage, it’s the default backup client for Ubuntu, already installed. You just need to enter your login info and you’re done! (or sign up if you don’t have an account)

#8. Don’t like Unity ? Try alternative Desktop Environments!

Unity is the default desktop environment (more accurately – it’s a shell (just like GNOME shell), made on the top of GNOME 3). For any reason, if you’re not happy with unity, then you can checkout some alternatives such as Gnome Shell, Cinnamon, Mate, FLuxbox, LXDE, KDE, XFCE etc.

Cinnamon Desktop

Lightweight weight desktop environment : XFCE

To install xfce desktop environment, simply execute –

sudo apt-get install xfce4

Installing KDE Desktop environment

To KDE desktop, execute the command (it will standard the minimal set of apps, you could also choose standard or full edition, read this post for more options on kde packages)

sudo apt-get install kde-plasma-desktop

GNOME 2 style desktop : GNOME3 fallback session, Cinnamon, MATE

Install GNOME3 fallback session

If the graphics performance of your system is not good or may be you just want a old classic GNOME2 style desktop, then you can try GNOME 3  fallback session. To install simply type –

sudo apt-get install gnome-session-fallback
sudo apt-get install indicator-applet-appmenu
Install MATE Desktop
sudo add-apt-repository "deb quantal main"
sudo add-apt-repository "deb quantal main"
sudo apt-get install mate-archive-keyring
sudo apt-get update
sudo apt-get install mate-core
sudo apt-get install mate-desktop-environment
Installing Cinnamon Desktop
sudo apt-get update
sudo apt-get install cinnamon

#9. Customize and Tweak Desktop settings

Unsettings App : For customizing Unity

Customizing Ubuntu is pretty easy, there are lot of tools available to customize various things like themes, icons, fonts, login-settings, unity launcher, unity lens behavior, graphics effects, app menu (e.g global menu options), applets, startup applications etc.

You can customize a lot things using System Settings but for more advanced options/tweaks there are many apps available such as Unsettings, MyUnity, Ubuntu Tweak, Gnome Tweak Tool etc.

Unsettings : for customizing Unity

Unsettings is useful for various unity settings like panel, dash, lenses etc. To install Unsettings simply execute the commands –

sudo apt-add-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install unsettings
Gnome Tweak Tool : for customizing Gnome 3 shell
sudo apt-get install gnome-tweak-tool
Install Ubuntu Tweak


sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

#10. Install Synaptic Package Manager


Synaptic package Manager is an advance app management software, it’s a fast and easy to use app. If you don’t like the bloated software center then it may be a good alternative for you. To install synaptic package manager, simply execute the command –

sudo apt-get install synaptic

Finally, relax, explore and enjoy :)

Update 1 : fixed some errors and added few links for more relevant stuffs.