Connecting USB Devices to Virtualbox in Ubuntu 18

I was trying to connect a USB Scanner to a Windows Guest OS running in Ubuntu, but there were no USB devices visible when I clicked on the USB icon in the tray. Turns out the host user needs to be added to vboxusers group using the following command:

sudo adduser $USER vboxusers

More on that here:

Installing Linux Mint / Ubuntu onto a second hard drive with dual boot, Grub installed to second drive

I took out the CD drive in my laptop and installed an SSD in its place, using a HDD caddy. Then I proceed to install Ubuntu on the second disk using default but it ended up installing Grub on first drive containing Windows. This is a deal breaker for me since don’t like to boot into Windows via Grub. I used Boot-repair to get did of Grub, by disconnecting the Linux SSD. . Then reinstalled Ubuntu after connecting the second SSD, but this time I chose “Something Else” and selecting the Grub installation location as the second SSD ( /dev/sdb ) as shown here.
. I created only two partitions, one is 32GB swap since I have 32GB RAM, and the rest as ext4 root (/) . Now I have Grub menu only if I boot from second disk, and I can choose Windows if I want. If I boot from first disk, I boot directly into windows.

JDK classes not detected in IntelliJ in Ubuntu with Open JDK 1.8

I ran into this issue while trying to open a Gradle project in IntelliJ 2018. The solution is to set the JVM again from the settings for Gradle as shown below. If that doesn’t work, close the IDE, blow up the settings directory of IntelliJ with
rm -fr ~/.IntelliJIdea2018.3/
Then reopen the project.

screenshot from 2019-01-05 09-45-20

Flashing Cisco Linksys e3000 with DD-WRT.

It used to be much easier back in 2012. You could just flash the e3000 latest version of DD-WRT. But now you need a trailed build as the latest version of e3000 are not compatible with old Linksys or DD-WRT firmware for e3000. The Wiki at is slightly confusing. Here is the simplified version:

  1. Installed the trailed build mentioned in the Wiki (Initial Flash section), which currently is .
  2. The latest builds are nv60k . They can only be flashed on 16673 or later version. So you need a mini-e3000.bin file like .  (based on comment at )
  3. Then you can flash the mega-nv60k.bin file from


Print envelope in LibreOffice writer

Open LibreOffice Writer. From Insert menu, select Envelope and follow the screenshots. When done, insert envelope with print portion on the top as shown in second screenshot, with stamp area sticking out of the printer.

Fix Video tearing in Ubuntu 16.04 on Intel Graphics driver

Set the following option in xorg.conf.d
Option “TearFree” “true”

Detailed instructions:

sudo apt-get install driconf

sudo mkdir /etc/X11/xorg.conf.d/

echo -e 'Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
Option "DRI" "3"
Option "AccelMethod" "glamor"
EndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf

sudo reboot

Remove that file if you want to revert.

Credit goes to

If you have video issues with Nvidia graphics, make sure you installed the Nvidia binary driver (proprietary driver). Linux Mint doesn’t install it by default and you will find the video and scrolling tearing the screen.

Posting code in WordPress

You can use the HTML pre tags around the code in the Text mode (aka the source mode).

public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");


You can use the WordPress code tag. You can read about that at

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello, World");


Installing Chrome on Lubuntu

Since Chrome provides a Debian package, you can do:

s@s-Lubuntu:~/Downloads$ sudo dpkg -i google-chrome-stable_current_amd64.deb 
[sudo] password for s: 
Selecting previously unselected package google-chrome-stable.
(Reading database ... 118145 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (61.0.3163.91-1) ...
dpkg: dependency problems prevent configuration of google-chrome-stable:
 google-chrome-stable depends on gconf-service; however:
  Package gconf-service is not installed.
 google-chrome-stable depends on libgconf-2-4 (>= 3.2.5); however:
  Package libgconf-2-4 is not installed.
 google-chrome-stable depends on fonts-liberation; however:
  Package fonts-liberation is not installed.

dpkg: error processing package google-chrome-stable (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ( ...
Processing triggers for desktop-file-utils (0.23-1ubuntu2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Errors were encountered while processing:

That didn’t work since dpkg can’t install dependencies. So I tried using apt.

s@s-Lubuntu:~/Downloads$ sudo apt install ./google-chrome-stable_current_amd64.deb 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 google-chrome-stable : Depends: gconf-service
                        Depends: libgconf-2-4 (>= 3.2.5) but it is not installed
                        Depends: fonts-liberation but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Now using the –fix-broken option

s@s-Lubuntu:~/Downloads$ sudo apt --fix-broken install ./google-chrome-stable_current_amd64.deb 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
Note, selecting 'google-chrome-stable' instead of './google-chrome-stable_current_amd64.deb'
google-chrome-stable is already the newest version (61.0.3163.91-1).
The following additional packages will be installed:
  fonts-liberation gconf-service gconf-service-backend gconf2-common libgconf-2-4
The following NEW packages will be installed:
  fonts-liberation gconf-service gconf-service-backend gconf2-common libgconf-2-4
0 upgraded, 5 newly installed, 0 to remove and 178 not upgraded.
1 not fully installed or removed.
Need to get 987 kB of archives.
After this operation, 4,185 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 zesty/universe amd64 gconf2-common all 3.2.6-3ubuntu7 [20.8 kB]
Get:2 zesty/universe amd64 libgconf-2-4 amd64 3.2.6-3ubuntu7 [84.6 kB]
Get:3 zesty/universe amd64 gconf-service-backend amd64 3.2.6-3ubuntu7 [57.8 kB]
Get:4 zesty/universe amd64 gconf-service amd64 3.2.6-3ubuntu7 [2,038 B]
Get:5 zesty/main amd64 fonts-liberation all 1:1.07.4-2 [822 kB]
Fetched 987 kB in 1s (829 kB/s)           
Selecting previously unselected package gconf2-common.
(Reading database ... 118248 files and directories currently installed.)
Preparing to unpack .../gconf2-common_3.2.6-3ubuntu7_all.deb ...
Unpacking gconf2-common (3.2.6-3ubuntu7) ...
Selecting previously unselected package libgconf-2-4:amd64.
Preparing to unpack .../libgconf-2-4_3.2.6-3ubuntu7_amd64.deb ...
Unpacking libgconf-2-4:amd64 (3.2.6-3ubuntu7) ...
Selecting previously unselected package gconf-service-backend.
Preparing to unpack .../gconf-service-backend_3.2.6-3ubuntu7_amd64.deb ...
Unpacking gconf-service-backend (3.2.6-3ubuntu7) ...
Selecting previously unselected package gconf-service.
Preparing to unpack .../gconf-service_3.2.6-3ubuntu7_amd64.deb ...
Unpacking gconf-service (3.2.6-3ubuntu7) ...
Selecting previously unselected package fonts-liberation.
Preparing to unpack .../fonts-liberation_1%3a1.07.4-2_all.deb ...
Unpacking fonts-liberation (1:1.07.4-2) ...
Setting up gconf2-common (3.2.6-3ubuntu7) ...

Creating config file /etc/gconf/2/path with new version
Processing triggers for sgml-base (1.29) ...
Setting up fonts-liberation (1:1.07.4-2) ...
Processing triggers for libc-bin (2.24-9ubuntu2) ...
Processing triggers for fontconfig (2.11.94-0ubuntu2) ...
Setting up libgconf-2-4:amd64 (3.2.6-3ubuntu7) ...
Setting up gconf-service-backend (3.2.6-3ubuntu7) ...
Setting up gconf-service (3.2.6-3ubuntu7) ...
Setting up google-chrome-stable (61.0.3163.91-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for libc-bin (2.24-9ubuntu2) ...

Now you should see Chrome icon in the Internet menu. Enjoy.

Virtualbox and Windows 7 Sleep issues

I got Virtualbox Version 5.1.28 r117968 (Qt5.6.2), running in Windows 7 Ultimate. I installed Ubuntu 16.04 LTS as a guest in Vb. Works great but doesn’t let Windows go to sleep after the sleep timeout. I can put Windows to sleep manually but Windows cannot go to sleep on its own when Ubuntu is running in Vb. Any clues on how to fix this? I like to save power and want Windows to go to sleep on its own if a user forgets to put it to sleep manually.

So I switched to Vmware Player and the sleep works fine. Even the volume keys work in the guest OS (Lubuntu).

Vmware tools installation from Vmware Player CD load didn’t work. You can check by doing this:
s@s-Lubuntu:~$ /etc/init.d/vmware-tools status
vmware-guestd is not running

So install open-vm-tools instead. Here is the command for that:
sudo apt-get update
sudo apt-get install open-vm-tools open-vm-tools-desktop

More on that command here:

s@s-Lubuntu:~$ /etc/init.d/open-vm-tools status
● open-vm-tools.service – Service for virtual machines hosted on VMware
Loaded: loaded (/lib/systemd/system/open-vm-tools.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-09-19 20:19:20 CDT; 9h ago
Main PID: 615 (vmtoolsd)
Tasks: 2 (limit: 19660)
CGroup: /system.slice/open-vm-tools.service
└─615 /usr/bin/vmtoolsd


Riak backup and restore using defaults

To back up:
riak-admin backup riak@ riak /tmp/rbak.dat

To restore:
riak-admin restore riak@ riak /tmp/rbak.dat

If yo run into the following error, make sure riak user has the right permissions. Or just use a tmp directory.

{“init terminating in do_boot”,{{badmatch,{error,{file_error,”/root/rb/rbak.dat”,eacces}}}