Sunday, December 25, 2011

Merry Christmas and a Happy New Year

I would like to wish you all a Merry Christmas and a Prosperous New Year. May the season bring you and your family joy and peace.

Friday, December 16, 2011

An error occurred while dispatching a duplicated socket: this handle is now leaked in the process

The error kept coming up in the System event logs on Microsoft Windows Small Business Server (SBS) 2011.

To fix this, change maxPendingAccepts from 2 to 10 in SMSvcHost.exe.config

<net.tcp maxPendingAccepts="10" ... >


Monday, December 12, 2011

VirtualBox: Failed to access the USB subsystem

To fix this error, just add the user name to the "vboxusers" group but the User Accounts manager in Ubuntu 11.10 is quite terrible, too simple to be useful so use a command line to do this instead:-
sudo usermod -a -G vboxusers <user-name>
The other option is to install and run the old Accounts manager.
sudo apt-get install gnome-system-tools

Friday, December 9, 2011

Unable to locate theme engine in module_path: "pixmap"

I got the following warning when running the update-java tool.
(gksudo:5045): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
To fix it, run
sudo apt-get install gtk2-engines-pixbuf

Wednesday, November 30, 2011

No sound after upgrading to 64-bit Ubuntu 11.10

After upgrading from 32-bit Ubuntu 11.10 to the 64-bit version, the sound system stopped working.

To fix this issue, I ran
rm -rvf ~/.pulse/ 
Interestingly, it worked straight away without re-login.


Thursday, November 10, 2011

Evoluation failed to append to mbox

After upgrading Evolution to version 3.2.0, I kept getting this message after sending an email from any of my mail accounts:-
The reported error was "Failed to append to mbox:///home/tom/.local/share/evolution/mail/local#Sent: Invalid folder URI 'mbox:///home/tom/.local/share/evolution/mail/local#Sent' Appending to local 'Sent' folder instead."
I fixed it by going to
Edit menu -> Preferences -> Mail Accounts 
-> Select a mail account -> Edit -> Defaults -> Revert

Monday, October 24, 2011

nautilus-gksu: "Open as administrator" not showing in Ubuntu 11.10

To get nautilus-gksu to work again, run

sudo cp /usr/lib/nautilus/extensions-2.0/ /usr/lib/nautilus/extensions-3.0/


Friday, October 21, 2011

Disable overlay scrollbars in Ubuntu Unity

Finally I gave up on using the overlay scrollbars in Unity. It gave a bit of more screen real-estate but it was less practical (almost a pain) to use on my desktop computer compared with the classic scrollbars. The overlay scrollbars may still be good for devices with smaller screen sizes.

To disable this feature, run
sudo su
echo "export LIBOVERLAY_SCROLLBAR=0" > /etc/X11/Xsession.d/80overlayscrollbars
Then restart the machine. Don't know whether just re-login will also work or not.

Update: Just re-login is enough. I tried that on Ubuntu 11.10.


Saturday, October 15, 2011

Get TimeCult running on Linux

TimeCult is a simple but powerful task management and time tracking application. A hierarchy of projects, activities and tasks can be created and displayed in a tree view.

To get it running on Linux,

java -jar timecult.jar

Monday, October 10, 2011

Add taskbar in Ubuntu (Unity)

Panel tint2 is an awesome customisable taskbar that has excellent dual monitor support. It also has system tray (notification area).

To install,run
sudo apt-get install tint2 

To customise tint2, run


Saturday, October 8, 2011

Unity Launcher and QuickList Editor

Install Bazaar Version Control System.
sudo apt-get install bzr
Download the Unity Launcher Editor code from Launchpad.
bzr branch lp:unity-launcher-editor
Run the editor.


Thursday, October 6, 2011

Rest In Peace, Steve Jobs (1955-2011)

Three life stories from Steve Jobs during the Stanford commencement address in 2005.
  • Connecting the dots
"You can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. Believing that the dots will connect down the road will give you the confidence to follow your heart. Even when it leads you off the well worn path, and that will make all the difference."
  • Do what you love 
"You've got to find what you love. Do what you believe is great work and the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle."
  • Mindfulness of death 
"Remembering that I'll be dead soon is the most important tool I've ever encountered to help me make the big choices in life. Because almost everything all external expectations, all pride, all fear of embarrassment or failure, these things just fall away in the face of death, leaving only what is truly important."


Monday, October 3, 2011

Meditation Techniques

Here is a very short summary of the meditation techniques that I've been learning. Anyone with any belief or even with no belief at all can benefit from these techniques to cope with our stressful life. It's quite simple and you can do it almost anytime and for any length of time that suits you.

In Buddhism, meditation is classified into 2 forms:-

  • Samatha (Concentration Meditation)
    • Objective:To bring your mind to a state of peace and happiness.
    • How: Gently concentrate on anything that you like and makes you feel calm, for example, praying, breathing, walking, jogging, weight lifting, earth, water, air, fire, colour, coffee, chocolate, pencil, whiteboard, kindness, forgiveness, etc.
  • Vipassana (Insight Meditation)
    • Objective: To let go of it all by training your mind to see things as they really are without trying to change anything. This is a core practice in Buddhism. However, Samatha should also be practiced as they support each other.
    • How:
      • Be mindful of the current state of your body and mind (just observe it without judging anything as if you are someone else). For example,
        • As you breathe in, be mindful that you're breathing in.
        • As you breathe out, be mindful that you're breathing out.
        • As you sit, be mindful that you're sitting.
        • As you stand, be mindful that you're standing.
        • As you walk, be mindful that you're walking.
        • As you're happy, be mindful that you're happy.
        • As you're sad, be mindful that you're sad.
        • As you're angry, be mindful that you're angry.
      • Realise their impermanence.
  • Always start by relaxing your body first before doing any routine meditation session (a few mental body scans are helpful).
  • Don't try to do meditation while you're thinking for your work. If your mindfulness is strong enough, notice a gap between your thoughts instead. You can also do meditation while you're drinking water or coffee, stretching, or walking, etc.
  • Don't force yourself too much. Find your own middle way.
  • Do it with low or no expectation.
  • It's normal that one day you find your meditation is good, the other day bad. Just keep doing it.
  • I've found alcohol has a negative effect on my meditation but it doesn't mean that people who drink cannot do meditation.

Saturday, September 24, 2011

Synchronising Folder Problem in Evolution Mail

My Evolution Mail kept synchronising one of the existing folders whenever I clicked on it or read any of the emails inside the folder.

Forcing Evolution to re-index its mailbox file by deleting the associated files with the extensions ".index", and "cmeta" in "~/.local/share/evolution/mail/local/Inbox.sbd" didn't help. The size of the mailfox file for that folder was surprisingly 4GB. Not sure this is the cause of the problem though.

To fix this, I

  • Created a new folder in Evolution.

  • Moved all emails from the folder that had the problem to the new folder. Be patient as this took ages. Evolution was synchronising the folder repeatedly for hours while moving the emails. After it finished, the mailbox file size of the new folder was just a bit over 200 MB.

  • Closed Evolution and deleted the bad folder by removing all of its associated files (mailbox, cmeta, index, and data files) in "~/.local/share/evolution/mail/local/Inbox.sbd" because trying to delete it in Evolution gave this error:-


Sunday, September 4, 2011

Search for File Contents in Nautilus

Create a script file (text file) called "Find" in "~/.gnome2/nautilus-scripts" and allow it to be executable. Add the commands below in the script file:- 

gnome-search-tool --hidden --path="$*" --contains= 

From its command help:-
--hidden               Select the "Show hidden and backup files" search option
--path=PATH            Set the text of "Look in folder" search option
--contains=STRING      Select and set the "Contains the text" search option

To search for files using this script in Nautilus,
Right click a folder -> Scripts -> Find


Friday, August 5, 2011

Allow apps to display tray icons in Unity

Only whitelisted apps are allowed to show tray icons in Unity. By default, the apps in the whitelist on my PC are JavaEmbeddedFrame, Mumble, Wine, Skype, hp-systray, and scp-dbus-service.

To show the current whitelisted programs, run
gsettings get com.canonical.Unity.Panel systray-whitelist
To add a new program; for example, Tasque, to the current whitelist, run
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service', 'Tasque']"
Alternatively, we can do this through a GUI using a tool called "dconf-editor". It's part of the "dconf-tools" package. In dconf-editor, go to
desktop -> unity -> panel
and select "systray-whitelist" on the right panel.

After change, strangely doing a relogin didn't seem to take this into effect for me. I had to reboot the PC. I didn't try just killing X Window though.


Thursday, August 4, 2011

vReplicator fails with the message: - " 'Consolidate Helper' snapshot found"

VMWare ESX/ESXi creates a temporary snapshot called "Consolidated Helper" during the snapshot deletion/consolidation. It should be deleted automatically but if it's left behind (possibly due to performance issue or insufficient disk space), vReplicator will fail. To fix this, make sure there's enough free space and then just remove this snapshot manually through Snapshot Manager. After it reaches 95%, be patient as it may take a very long time depending on the virtual disk size to commit the snapshot. If it still fails, try creating a new snapshot and then select "Delete All".


Sunday, July 31, 2011

New Brower Session on IE8/IE9 and Google Chrome

IE8 or IE9 (Microsoft Internet Explorer)
Use -nomerge switch when running IE.

Google Chrome (V12.0.742.124)

  • Use Ctrl + Shift + N to bring up a new Chrome window in the Incognito mode (private browsing). However, any subsequent window opened up this way will share the same session.
  • Use --user-data-dir switch with different profile locations when running Chrome. A bit awkward but can be mitigated by using shortcuts. However, each session will its own config and cache. For example,

google-chrome --user-data-dir=/home/tom/chrome-profiles/1
google-chrome --user-data-dir=/home/tom/chrome-profiles/2
google-chrome --user-data-dir=/home/tom/chrome-profiles/3


Saturday, July 16, 2011

Monday, June 13, 2011

Access shared host folders in a VirtualBox Ubuntu guest

  • Install VirtualBox Guest Additions.
  • Set up a shared host folder using VirtualBox.

Make sure Auto-Mount is off otherwise when mounting the shared folder after restarting the guest next time, we'll get this error:-
mount.vboxsf: mounting failed with the error: Invalid argument.
It seems it's caused by the shared folder has already been mounted to "/media/sf_mydata" which only allows "admin" to access.
  • In the Ubuntu guest, use Terminal to run the following commands:-
sudo mkdir /mnt/mydata
sudo mount -t vboxsf mydata /mnt/mydata
ln -s /mnt/mydata $HOME/Desktop/mydata
  • To auto-mount the shared folder,
gksudo gedit /etc/fstab
Then add the following line:-
mydata /mnt/mydata vboxsf defaults 0 0

Saturday, June 11, 2011

Missing Main Menu Bar in Eclipse based Applications

Some Ecipse based applications like XMind (Mind Mapping and Brainstorming program) show the menu neither in the main program window nor in the new global main menu panel introduced in Ubuntu 11.04. The workaround for now is to set the APPMENU_DISPLAY_BOTH to 1 like this:-
APPMENU_DISPLAY_BOTH=1 /usr/local/xmind/xmind
This allows the menu to display within the application like it did in the earlier version of Ubuntu.


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
  • 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 "" to be executed as program.
  • Run "".

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 ./
With normal user privilege, use:-
cd ~/netbeans-6.9.1

Thursday, April 28, 2011

Google Chrome Extensions Similar to ScrapBook in FireFox

Clip to Evernote (v4.2.14.1888 - April 23, 2011)
  • Can clip both text and image to Evernote.
  • No "Delete Note" function in the editor (have to go to the main EverNote web app to delete a note).
  • Monthly upload allowance for a free account is 60MB (1GB for Premium for $5 per month).
NoteBook Professional (v1.4 - February 24, 2011)
  • Clip selected text or image to NoteBook (cannot clip selected text and image at the same time).
  • Offline HTML editor but the editing area cannot be resized.
  • No Google Doc upload, just pop up Google Notebook or open Google Docs page.
Scrapbook (v1.1.12 - November 14, 2010)
  • Similar to FireFox's ScrapBook Plus but it can only grab the whole page, not just part of the page.
  • The captured content is stored locally and can be classified, highlighted, and modified.
Snippy (v 0.3.0 - March 01, 2010)
  • Grap snippets of web pages that can be uploaded to Google Docs or SnipBin.
  • It fails to upload the whole page content to Google Docs with the error 
"Upload failed (400 - Bad Request). Please retry in a few seconds."
but it works OK when uploading the whole page to SnipBin.
  • It can only grap and upload the content, nothing else.

Sunday, April 24, 2011

My Most Often Used FireFox Extensions


Free memory by loading the content only when the tab is visited. Tabs can also be unloaded or loaded manually as well. FireFox starts much faster with this addon when having many tabs left open from the previous session.


Allow to use mouse gestures to control the browser (navigation, windows, tabs, etc.).


Drag and drop a link to open it in a new tab, an image to save it and also do a web search on selected text.

ScrapBook Plus

Very good addon for helping do research on the web. It can save the whole or part of web pages and organize them. ScrapBook Plus is a modified version of Gomita's ScrapBook. The saved content can be modified or highligted. Annotations can also be added.

TabGroups Manager

Cool stuff. It helps classifiy tabs into groups. A group can also be hibernated and then reloaded later.

Friday, April 22, 2011

Show DNS servers / DNS cache

Show current DNS Servers
cat /etc/resolv.conf
DNS Cache
By default, Ubuntu doesn't perform DNS caching, however, the browser like FireFox may maintain its own DNS cache. To cache the DNS,
  • Use nscd (Name Service Cache Daemon)

    According to its description, this daemon should be installed only if the slow services like LDAP, NIS or NIS+ are used.
sudo apt-get install nscd
    To reset the nscd cache (equivalent to "ipconfig /flushdns" in Windows), use
sudo /etc/init.d/nscd restart
service nscd restart
service nscd reload
    Some said the following command should also clear the cache:-
sudo /etc/init.d/dns-clean start
    But it doesn't look like the dns-clean is designed to do that. According to the description in the dns-clean script, this script should be run at bootup to clean up any mess left by 0dns-up which is the other script that arranges for the correct resolv.conf file to be copied into place when a PPP connection comes up. PPP (Point-to-Point Protocol) is used for dial-up access to the Internet.

  • Use dsnmasq (Small Caching DNS proxy and DHCP/TFTP Server)

    To install dsnmasq, use
sudo apt-get install dsnmasq
    To reset the cache, use
sudo /etc/init.d/dnsmasq restart

  • Use BIND (Berkeley Internet Name Domain)

    It is Internet domain name server software. To install BIND, use
sudo apt-get install bind9
    To reset the cache, use
sudo rndc flush

If the DNS-resolved IP address is still incorrect, flush the DNS cache on all the upstream DNS servers.


Monday, April 18, 2011

Mouse movement is very jerky when using rdesktop

Mouse pointer movement is not smooth especially when using RDP to a remote Windows Vista or Windows 7. Disabling motion events notification using the -m switch helps but any mouse-over event won't also be triggered. It's a bit inconvenient but worth sacrificing for smooth mouse movement. However, with the -m switch, the mouse pointer will disappear. Apply the patch below to make the local cursor always appear and exclude the suppression of motion events when a mouse button is pressed (needed for drag & drop action).

patch -i rdp-path
  • To compile,
sudo apt-get install libssl-dev
sudo make install
  • To run this patched rdesktop,
/usr/local/bin/rdesktop -m -d<domain> -u<user-name> server

Sunday, April 17, 2011

Find Hardware (motherboard) and OS Information


sudo apt-get install sysinfo
After installed, run the program from
Applications -> System Tools -> Sysinfo
On my computer, After selecting System, Sysinfo just crashes and closes itself.


sudo apt-get install hardinfo
After installed, run the program from
Applications -> System Tools -> System Profiler and Benchmark
It seems better than Sysinfo and looks similar to Windows Device Manager


sudo apt-get install hwinfo
After installed, run the program from the command line:-
It's a console application without GUI.


sudo apt-get install discover
After installed, run the program from the command line:-
It's also a console application without GUI. Hwinfo provides more info than Discover.

ERROR: isw: wrong number of devices in RAID set

When running
sudo update-grub
this error message came up
ERROR: isw: wrong number of devices in RAID set "isw_djcbaiedeg_RAID_Volume1" [1/2] on /dev/sdb
There is no RAID setup on my computer so this is probably caused by the disk (/dev/sdb) that might have been used in a RAID setup before. The RAID medata still remains on the disk.

Fix this problem by using the dmraid command to remove this metadata:-
sudo dmraid -rE

Thursday, April 14, 2011

Evolution Mail

Store mail data in a different location
Create a symbolic link with the name ".evolution" in the home folder and the link points to "/mydata/mymail".
ln -s /mydata/mymail ~/.evolution
Command equivalent to Outlook's "Run Rules Now"
Select messages or Ctrl+'A' to select all, then go to Message Menu -> Apply Filters or Ctrl + 'Y'.

Add a new account
Edit Menu -> Preferences -> Mail Accounts


  • Receiving Email
    • Type: POP
    • Server:
    • Secure Connection: SSL
    • Authentication Type: Password
  • Sending Email
    • Type: SMTP
    • Server:
    • Secure Connection: TLS
    • Authentication Type: Login


  • Receiving Email
    • Type: POP
    • Server:
    • Secure Connection: SSL
    • Authentication Type: Password
  • Sending Email
    • Type: SMTP
    • Server:
    • Secure Connection: TLS
    • Authentication Type: Login


  • Receiving Email
    • Type: POP
    • Server:
    • Secure Connection: SSL
    • Authentication Type: Password
  • Sending Email
    • Type: SMTP
    • Server:
    • Secure Connection: SSL
    • Authentication Type: Login

Tuesday, April 12, 2011

Lightweight, and Efficient FTP server

vsftpd is probably the most secure and fastest FTP server for UNIX-like systems (from what its website says).

Howto: Easy FTP with vsftpd


Merge PDF files

Use the PDF toolkit "pdftk" from PDF Labs.

sudo apt-get install pdftk
pdftk *.pdf cat output combined.pdf


Monday, April 11, 2011

Problem burning files from a network share using Brasero 2.32.0

There is no problem dragging and droping files directly from a Windows share in Nautilus to Brasero but when burning a disc, Brasero reports "Image successfully created" very quickly with only 64K written. Mounting the Windows share fixes this problem but Brasero reports a different error "No parent could be found in the tree for the path".

k3b works fine with mounted Windows shares, however it too has a problem when dragging and dropping files directly from a Windows share in Nautilus and responds with the error message "No non-local files supported".

Friday, April 8, 2011

rsync to NAS (Windows SMB)

Mount the shared folder:-
sudo mount -t cifs -o rw -o user=tom -o iocharset=utf8 //myNasServer/bak /mnt/mynas

Sync the home directory:-
sudo rsync -rvth --delete --exclude '.local/share/Trash' --exclude '.cache' ~/ /mnt/mynas/bak

or show more info while syncing:-
sudo rsync -rvth --delete --exclude '.local/share/Trash' --exclude '.cache' --stats --progress ~/ /mnt/mynas/bak

From mount command help:-
-o, --options
    rw (mount read-write)
    iocharset=charset used to convert local path names to and from Unicode

-t, --types vfstype
    mount using the Common Internet File System (CIFS). The older type "smbfs" can also be used.

From rsync command help:-
    --delete           delete extraneous files from destination dirs
    --exclude=PATTERN  exclude files matching PATTERN
-h, --human-readable   output numbers in a human-readable format
    --progress         show progress during transfer
-r, --recursive        recurse into directories
    --stats            give some file-transfer stats
-t, --times            preserve modification times
-v, --verbose          increase verbosity

Thursday, April 7, 2011

NTP Pool Time Servers

Area Host Name


Tuesday, April 5, 2011

Linux equivalent to robocopy

robocopy /s src dest
rsync -av src/ dest

robocopy /mir src dest
rsync -av --delete src/ dest

robocopy /mir /z src dest     (restartable mode)
rsync -avhP --delete --append src/ dest

robocopy /mir src/sub1 dest/sub1

rsync -av --delete src/sub1/ dest/sub1
rsync -av --delete src/sub1 dest

From rsync command help:-

A trailing slash on the source can be used to avoid creating an additional directory level at the destination.

-a, --archive      archive mode; equals -rlptgoD

    --append       append data onto shorter files
-h                 output numbers in a human-readable format
-P                 same as --partial --progress
    --partial      keep partially transferred files
    --progress     show progress during transfer
-v, --verbose      increase verbosity
    --delete       delete extraneous files from destination dirs

-r, --recursive    recurse into directories
-l, --links        copy symlinks as symlinks
-p, --perms        preserve permissions
-t, --times        preserve modification times
-g, --group        preserve group
-o, --owner        preserve owner (super-user only)
-D                 same as --devices --specials
    --devices      preserve device files (super-user only)
    --specials     preserve special files

See also
rsync to NAS (Windows SMB)

Sunday, April 3, 2011

iPhone does not mount after iOS4.2.1 or later upgrade

This error message will be shown

"Unable to Mount XXXX. DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)"

Steps to fix the problem:

1. Install libimobiledevice1 from the ppa:pmcenery/ppa repository

sudo add-apt-repository ppa:pmcenery/ppa
sudo apt-get update
sudo apt-get dist-upgrade
gksudo synaptic

2. Unpair the device using idevicepair from the libimobiledevice-utils package

idevicepair unpair

Refs: does not mount after iOS4.2.x upgrade