Insync – Bringing Google Drive to Linux

Google Drive

I am quite a happy Google users for most of the time. I enjoy most of the Google products, e.g. Gmail, Nexus, etc. but not really for Google Drive.


Google Drive is the Google’s cloud storage service, where users can store their files, music, whatever digital file to the cloud for free. The service has been released since 2012 and it is available for Windows and Mac users but not for Linux users.

Perhaps it is because only 2% Linux users in the population? It sounds irony when we found that Google has been working on Linux (Android and ChromeOS are Linux for quite sometimes.

Perhaps there are too many Linux operating systems in the market that cause the issues of incompatibility and hassle? I don’t think so as Dropbox (another free cloud storage service provider) has released its Linux client since years ago. They can do it, why can’t Google?

Perhaps Google is just reluctant to do so?

Continue reading “Insync – Bringing Google Drive to Linux”


Linux Mint Maya KDE – Hibernation Issue in Dell Vostro 3450

Hibernation is a must-have feature in a laptop. I can work on my programming, then hibernate the machine in 30 seconds, take a nap and resume the machine to the state before it hibernates in 30 seconds and continue my work — I can just continue my work from I stop seamlessly. However, the hibernation function seems to be missing in Linux Mint Maya (KDE) in my Dell Vostro 3450. The followings are the patches to overcome this issue.

The patches include:
1. Prepare the scripts to hibernate.
2. Make an hibernation icon in the start menu.
3. Solve the noisy fan issue (due to the hybrid card) after resume from hibernation.

Continue reading “Linux Mint Maya KDE – Hibernation Issue in Dell Vostro 3450”

Hacking the Code – Buffer Overflow

Writing source code is not an easy task, especially in C.

The C source code below shows an example of taking user’s input into an array.

It will show “You Win” if i=1 or “You Lose” for i=0.

Source code. 

Since i is initialized to zero, intuitively we know we will always get “You Lose” for this source code.

Well. Not really.

Continue reading “Hacking the Code – Buffer Overflow”

Script: Gotosleep

Sometimes we need to suspend the machine when certain job is completed. Following is my gotosleep script to suspend my Ubuntu.

# ---- filename: gotosleep ----
# This script will suspend this machine to sleep mode.
gnome-screensaver-command --lock
sleep 1 
dbus-send --system --print-reply --dest="org.freedesktop.Hal" /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0
# ------------------------------


Ubuntu 11.04 requires HAL to provide abstract view on hardware. Thus,

sudo apt-get install hal

PDF Annotator (w32) for Linux

The best PDF annotator for Ubuntu — PDF-Exchange Viewer.

It runs on Win32 machine. But  with wine, it is flies in Linux platform as well.


To integrate it seamlessly  with Ubuntu, I downloaded the Portable Zip version of PDF-Exchange viewer and extract it to a folder.

Then, I created a bash file as follow:

#------ filename: ----------
filename=z:$( echo $1 | sed  "s/\//\\\/g")
wine "$w32bin" "$filename"
# ----------------------------------------

and put it to the same folder as PDF-Exchange viewer.

Right click the PDFXCview.exe –> Permission –> Check “Allow Executing file as program”.

Then, pick a pdf file and right click again  and choose “Open With Other Application”. Then, select “Use a custom command” and point it to the bash file that we create just now (

Try to open the pdf file again and you will see it will open it with PDF Viewer.


Ubuntu Tips

Add User in An Encrypted Home Folder at Different Harddisk

sudo apt-get install ecryptfs-utils  #You may need this packet
mkdir  /home2
chmod 777 /home2 
sudo adduser --encrypt-home username --home /home2/username

Display Skype (and others) Icon in the Unity Dashbar

gsettings set com.canonical.Unity.Panel systray-whitelist “[‘JavaEmbeddedFrame’, ‘Wine’, ‘Skype’, ‘Dropbox’, ‘Cryptkeeper’]”

setsid unity

Quoted from

LyX: Support IEEE format.

Install texlive-publishers. Then Lyx->Tools->Reconfigure.