Tuesday, May 24, 2011

Useful App Indicators

System Load Indicator
Display graphs for CPU, RAM, network traffic, harddisk and swp space use.
sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install indicator-multiload

Weather Indicator
sudo add-apt-repository ppa:weather-indicator-team/ppa
sudo apt-get update
sudo apt-get install indicator-weather

Keep Ubuntu awake by disabling screensaver.
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine

Capture an area or the entire screen.
sudo add-apt-repository ppa:lookit/ppa
sudo apt-get update
sudo apt-get install lookit

Inspired by the Pomodoro technique. You commit to working without interruption for at least 10 minutes which is usually the hardest part. After that, it becomes easier to continue working.

Tuesday, May 17, 2011

Free Antivirus Software for Linux

Clam AntiVirus
  • Install command-line interface
sudo apt-get install clamav
  • Install virus database update utility
sudo apt-get install clamav-freshclam
  • Install Nautilus extension for easy scan (it adds "Scan for Viruses" to the right-click menu)
sudo apt-get install nautilus-clamscan
  • Download the installation file (.deb) from http://free.avg.com/au-en/download.prd-alf
  • When running it, this message "The package is of bad quality" will appear. Just select "Ignore and install".
  • The AVG service should start automatically at boot time. To start the service manually now, run
sudo service avgd start
  • To integrate the AVGScan with Nautilus, create a script file (text file) in "~/.gnome2/nautilus-scripts" and allow it to be executable. Add the commands below in the script file:-
xterm -hold -T "AVG Virus Scanning $*" -e "avgscan --heur --arc $*"

Sunday, May 15, 2011

Update Dropbox for Ubuntu 11.04

  • Download Dropbox v1.1.31 (Linux x86, Linux x86_64)
  • Delete ".dropbox-dist" from the home directory
  • Extract the downloaded Dropbox to the home directory (the extracted folder will be ".dropbox-dist")
  • Stop the currently running Dropbox if the old version Dropbox exists by running
killall dropbox
dropbox stop
  • Start Dropbox by running
dropbox start

Running Oracle SQL Developer 3.0 on Ubuntu

This free graphical tool from Oracle looks very powerful for database development and seems to be equivalent to Microsoft SQL Server Management Studio. Its feature list is quite impressive. This version (v3.0.04.34, March 2011) incorporates Data Modeler and Query Builder support. It can also make a read-only connection to non-Oracle databases (MySQL, SQL Server, MS Access, Sybase, DB2 UDB and Teradata).

  • Download "SQL Developer for other platforms" from Oracle and unzip it.
  • Create a new directory called ".sqldeveloper" in the home directory.
  • Create a new text file called "jdk" in ".sqldeveloper" and add a JDK (Java Development Kit) installation path to the file; for example,
  • Allow the uncompressed "sqldeveloper.sh" to be executed as program.
  • Run "sqldeveloper.sh".

Sunday, May 8, 2011

Lost Evolution emails after upgrading to Ubuntu 11.04 (Natty Narwhal)

The new version of Evolution Email (v2.32) that comes with Ubuntu 11.04 now uses "~/.local/share/evolution" as the new storage location. The Ubuntu upgrade process doesn't transfer the existing data to the new location automatically. To manually fix this,

  • Rename the newly created "evolution" folder in "~/.local/share" to something else first, just in case.
  • Move the ".evolution" folder from the home directory to "~/.local/share" and rename it to "evolution".

For Evolution data stored in a non-default location (e.g. /mydata/EvolutionMail), just create a new symbolic link like this (after renaming the newly created "evolution" to something else first):-

ln -s /mydata/EvolutionMail ~/.local/share/evolution

Saturday, May 7, 2011

Manage services in Ubuntu

Start a service
(myServ is a service name)
sudo /etc/init.d/myServ start
sudo service myServ start
Stop a service
sudo /etc/init.d/myServ stop
sudo service myServ stop
Disable a service
Check if the service is handled by Upstart first by using
status myServ
If it returns the following message,
status: Unknown job: myServ
it's not handled by Upstart, disable it using
sudo update-rc.d myServ disable
For the service that is handled by Upstart, the output of the status command will be like:-
myServ start/running, process 989
If that's the case, then the service can be disabled by doing one of the following

  • Open the Upstart job definition file (e.g. /etc/init/myServ.conf) and then comment out the "start on" line by putting a "#" in front of it.
  • Add a special keyword "manual" to the job definition file by just using the command "echo"
echo manual | sudo tee -a /etc/init/myServ.conf

Enable a service
For non-Upstart managed services, use
sudo update-rc.d myServ enable
For Upstart managed services, undo what's been done above.


Tuesday, May 3, 2011

Uninstall NetBeans

NetBeans IDE 7.0 has arrived! It's time to uninstall the old one (v6.9.1).

If NetBeans was installed with the root privilege, uninstall it using
cd /usr/local/netbeans-6.9.1
sudo ./uninstall.sh
With normal user privilege, use:-
cd ~/netbeans-6.9.1