Search blog

Wednesday, December 31, 2014

Installing LastPass in Chromium in Ubuntu/Linux

To install LastPass in Chromium & Linux enter the commands below:

First download LastPass from here:

Then open terminal using CTRL+ALT+T and go to the directory you've downloaded the LastPass tar and untar it and enter the command below:
 sudo tar -xvzf lplinux.tar.bz2  

 sudo ./  

Sunday, December 28, 2014

Unable To Import Or Upload SQL Dump, Database in phpMyAdmin

If you are unable to import or upload your database dump into your phpMyAdmin and have been getting the following error:
No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration.
You can try the following code to resolve the issue:

 chmod -R 777 /var/lib/phpmyadmin/tmp  

Restart Apache:

 sudo service apache2 restart  

Thursday, December 18, 2014

How To Resize Virtual Hard Disk Size In Ubuntu

If you are running out of Virtual Hard Disk space in your VirtualBox environment and looking to increase space - follow the instructions below:

 sudo VBoxManage modifyhd "vdi location" --resize "new size in MB"  
 sudo VBoxManage modifyhd '/home/evagabond/VirtualBox VMs/Windows/Windows 7 (x64)/Windows 7 (x64).vdi' --resize "61440"  
Please note that if your location address contains spaces it's better you insert it within single quotes as I've done in the above example to avoid error in the terminal.

Finally if successful you should get result as below:

Click on image to enlarge

Now you will need to resize/expand your VHD partition using a Partition Software or Windows Default Partition Manager. I have used a free software called MiniTool Partition Wizard which you can download here:

Follow the instructions in the image below to finally expand your partition:

Step 1:

 Click image to enlarge
Step 2:

Click image to enlarge 
Step 3:

Click image to enlarge

Wednesday, December 17, 2014

Download all the Ubuntu Community Wallpapers from Karmic Koala (9.10) to Trusty Tahr (14.04)

Open your terminal (CTRL+ALT+T) and COPY/PASTE the commands below:

 sudo apt-get install ubuntu-wallpapers-karmic ubuntu-wallpapers-lucid ubuntu-wallpapers-maverick ubuntu-wallpapers-natty ubuntu-wallpapers-oneiric ubuntu-wallpapers-precise ubuntu-wallpapers-quantal ubuntu-wallpapers-raring ubuntu-wallpapers-saucy ubuntu-wallpapers-trusty  

If you get ERRORS as below just remove those download commands of the wallpapers giving the error from the above command. In my case it was quantal, raring and trust and try again. 

 E: Unable to locate package ubuntu-wallpapers-quantal  
 E: Unable to locate package ubuntu-wallpapers-raring  
 E: Unable to locate package ubuntu-wallpapers-trusty  

Here's how you can download the wallpapers from Ubuntu 14.04 Trusty Tahr.

1. Open a terminal window.

2. Type in the following commands then hit Enter after each:


You might get an error as below related to 'Secure Certificate.'

 ERROR: cannot verify's certificate, issued by `/C=US/ST=Arizona/L=Scottsdale/, Inc./OU= Daddy Secure Certificate Authority - G2':  
  Unable to locally verify the issuer's authority.  
 To connect to insecurely, use `--no-check-certificate'.  

If so COPY/PASTE the command below and hit Enter:

 wget --no-check-certificate  

Again COPY/PASTE the command below and hit Enter:

 sudo dpkg -i trusty-tahr-wallpaper-contest_0.0.1-0extras14.04.0_all.deb  

All the wallpapers are under /usr/share/backgrounds/ and they should show up automatically under System Settings & Appearance)

Monday, December 15, 2014

[SOLVED] - The disk drive for /tmp is not ready yet or is not present - Ubutntu 12.04

Just press Ctrl + Alt + T on your keyboard to open Terminal. When it opens, run the command(s) below:

 sudo mv /tmp /tmp_old  
 sudo mkdir /tmp  
 sudo chmod 1777 /tmp  

Reboot, and it should be resolved.

Sunday, December 14, 2014

Connect USB Wireless Adapter to Kali Linux in Virtualbox

[SOLVED] - HOW TO FIX: W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw

While trying to update initramfs I encountered an error which took me quite sometime to fix. After trying various solutions this is what worked for me.

 W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-2.fw for module r8169  
 W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168d-1.fw for module r8169  

You can do a (Open your terminal & check):
 sudo update-initramfs -u  

To see if you have this problem.

Next Check which Realtek chipset you have using: 

If you have an r8168 chipset go here:

Find the "r8168-8.039.00" drivers for Ubuntu/Linux in the 'Unix (Linux)' section of the page.

Download the r8168-8.039.00.tar.bz2 file to your linux box.

In the terminal go to the directory where you've downloaded the above file & Unpack the tarball :
 tar vjxf  

Change to the extracted/unzipped directory:
 cd r8168-8.039.00  

If you are running the target kernel, then you should be able to do :
 sudo ./  

finally do another 
 sudo update-initramfs -u  

to make sure the error goes away


Friday, December 12, 2014

Update 12.04 (precise) to Java 7 (OpenJDK)

Q: By default, Ubuntu 12.04 comes with OpenJDK 6, which is by now quite old and some applications require at least Java 7. How can I update an Ubuntu 12.04 installation to Java 7?

The Ubuntu 12.04 repositories contain both version 6 and 7 of the JDK, but by default only version 6 is installed.

To update, it is best to use the Synaptic package manager – if you don’t have it, install it with sudo apt-get install synaptic.
  • Note: Ensure that Java 7 packages are selected before deselecting any Java 6 packages – else Synaptic will deselect anything that depends on Java (including any Java applications)!
  • Search for icedtea and select icedtea-7-plugin for installation. This may select some Java 7 dependencies.
  • Now search for openjdk and deselect openjdk-6 as well as openjdk-6-jre. This may deselect some further packages.
  • If you had openjdk-6-jdk installed, make sure it is now selected for removal and openjdk-7-jdk is selected for installation. (You can skip this step if openjdk-6-jdk is not selected, meaning it was never installed.)
  • Click Apply and review your package selections:
    • default-jre packages are metapackages which are safe to remove in this process.
    • icedtea-7-jre-cacao is a dummy package, therefore it it OK to remove icaedtea-6-cacao without installing a replacement.
    • For any other Java/IcedTea 6 package that is removed, you should be installing the Java 7 equivalent.
    • Packets to be selected for removal should include the following:
      • default-jre
      • default-jre-headless
      • icedtea-6-jre-cacao
      • icedtea-6-jre-jamvm
      • openjdk-6-jre openjdk-6-jre-headless
      • openjdk-6-jre-lib
    • Instead, the following should be installed:
      • icedtea-7-jre-jamvm
      • icedtea-7-plugin
      • openjdk-7-jre
      • openjdk-7-headless
      • openjdk-7-lib
    • If any packages are missing, go back and select them manually. When everything is OK, install.
From a console, run java -version. If you have JDK installed, also run javac -version. Both should now report version 1.7.0.

How To Create Swap Partition/Space Using Gparted Partition Editor in Ubuntu

 First make sure you have some unallocated space on the left or right of the main partition where your Ubuntu is installed as the figure above.

Now lets evaluate the formula for creating the appropriate swap file. Below is a good explanation:

"I would say a good rule of thumb is indeed just as was mentioned above. 2 times the physical memory. Something to consider here, while it is possible to use a smaller swap partition, and it will suffice under most normal circumstances, if you want this system to be rock solid stable, I would indeed follow the 8 GB recommendation. In fact I recommend 2 * RAM + 1 MB so that there is absolutely room to swap out 2 entire copies of memory. This avoids the "shell game" scenario which can have negative performance repercussions. What this will do for you is guarantee a level of resiliency should you encounter an extraordinary event with your system.

I've seen scenarios where applications behave badly in unattended environments and before you know it, your system starts slowing down to a crawl.

Depending on what you are doing, you might even be able to dispense with the swap file entirely. The extra space for the OS is handy when running many applications at once. However if you only intend to run a few processes, do not intend to interact with the GUI disabling the swap file might be appropriate.

But if you are going to have a swap file I always use the sizing formula below.

 [(2 x RAM) + 1 MB] = Swap File Size  

I also recommend putting your swap file on a seperate disk whenver possible as this will increase performance as the OS can swap in and out at the same time as read/writes from the data disk.

I hope this is helpful." - Source:

Once you have decided on the swap space it's time to create it.

Right click on the unallocated space on your hard drive and click on New. A dialog box as the image below will appear. Make selection as in the image.

Then click on the 'green check icon' - which says 'Apply all operations' and wait.

Once the linux-swap partition is created - once again - Right Click on the 'linux-swap' partition and select Swapon.

But the problem here is this 'swap' turns off after restarting.

So to permanently activate the 'swap partition' follow the steps below:

Activating the swap partition

(If your swap is on your primary hard drive, you don't need to do anything here.) Now you need to find what partition your swap is on and what its UUID is. UUID?! you say? Well that's the Universally Unique IDentifier for the partition so you can reference it even if it's on a different mount point from boot-to-boot due to adding disks, etc.

  1. Pull up a terminal and run
     gksu gparted  
    & and enter your root password. The & lets this process run while still giving you access to the command line.
  2. br />
  3. Right-click on your swap partition and choose *Information*. You should see the **Path** and **UUID** listed there. Keep this open for further reference.
  4. Run
     gksu gedit /etc/fstab  
    & and look for the line that has *swap* in it. It should be the third column, separated by spaces or tabs. You can either use the path or the UUID to tell Linux where to find your swap partition. I recommend UUID because it'll stay constant even if you move the partition around or the disk somehow becomes sdb instead of sda or something like that. Make the appropriate edits and save the file. Your line should look something like this if you used UUID (with your UUID instead, of course):
    1. UUID=41e86209-3802-424b-9a9d-d7683142dab7 none swap sw 0 0
    2. or this if you used path: /dev/sda2 none swap sw 0 0
  5. Save the file.
  6. Enable the new swap partition with this command.
     sudo swapon --all OR $ sudo swapon --all --verbose  
      swapon on /dev/sda2 
     swapon: /dev/sda2: found swap signature: version 1, page-size 4, same byte order  
      swapon: /dev/sda2: pagesize=4096, swapsize=2147483648, devsize=2147483648  
  7. Confirm that the swap partition exists.
     $ cat /proc/swaps   
     Filename                Type      Size  Used  Priority  
     /dev/sda2                partition    2097148 0    -1  
  8. Reboot to make sure the new swap gets activated properly at startup.

Wednesday, December 10, 2014

Changing Folder Permission in Ubuntu 12.04

Use chown to change ownership and chmod to change rights.

Use the -R option to apply the rights for all files inside of a directory too.

Note that both these commands just work for directories too. The -R option makes them also change the permissions for all files and directories inside of the directory.

For example

 sudo chown -R username:group directory  

will change ownership (both user and group) of all files and directories inside of directory and directory itself.

 sudo chown username:group directory  

will only change the permission of the folder directory but will leave the files and folders inside the directory alone.

You need to use sudo to change the ownership from root to yourself.


Note that if you use
 chown user: file  
(Note the left-out group), it will use the default group for that user.

If you prefer, this can be done with a GUI as well. You will need to open Nautilus as root to do so. Press Alt+F2 to access the "Run Applications" dialog and enter
 gksu nautilus  

Next, browse to and right click on the folder you would like to modify. Then, select "Properties" from the context menu. You can now select the user or group that you would like to be the "Owner" of the folder as well as the permissions you would like to grant them. Finally, press "Apply Permissions to Enclosed Files" to apply the changes recursively.

Though it seems this does not always work for some operations in a deep folder tree. If it does not work use the appropriate terminal command.  

Tuesday, December 9, 2014

Using Gparted Partition Editor in Ubuntu to Resize/Expand Partition

I had a hard time trying to figure out as to how to resize my partitions using Gpart. I am currently using Ubuntu 12.04 LTS aka Precise Pangolin.

First it's better you use Gpart from a Live CD/USB. You can do this by using your Ubuntu Installation CD/USB.

So the main thing you will have to note while resizing your partition is there should be unallocated space either at the immediate left or right of your partition. Only then will you be able to expand your partition.

If you don't have Gparted Partition Editor you can install one from the terminal using the following command:
 sudo apt-get install gparted  

- To Extend just select an inactive partition (active partitions are locked).
- Then right click and select Resize/Move.
- Then you can move the arrows on the left and the right to resize/expand.
- Free Space preceding is the free space/unallocated space to the left of your selected partition.
- Free Space following is the free space/unallocated space to the right of your selected partition.
- Then click on Resize/Move.
- Then finally click Apply (The Green Check Icon).

Depending on the size of your partition the operation might execute shortly or take some time.

Top 5 Posts (Weekly)