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

BarTab

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.

FireGestures

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

QuickDrag

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
    or
service nscd restart
    or
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.

Refs:
http://www.ubuntugeek.com/howto-clearflush-dns-cache-in-ubuntu.html
http://txt.binnyva.com/2009/04/find-current-dns-server/
http://omg.n1.pld.plz.thx.gg/cgi-bin/man/man2html?pppconfig+8
http://www.cyberciti.biz/faq/rhel-debian-ubuntu-flush-clear-dns-cache/

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
./configure
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

Sysinfo

Installation
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.


Hardinfo

Installation
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


Hwinfo

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

Discover

Installation
sudo apt-get install discover
After installed, run the program from the command line:-
discover
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
Ref:
http://ubuntuforums.org/showthread.php?t=1569005

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

Settings
Gmail

  • Receiving Email
    • Type: POP
    • Server: pop.gmail.com:995
    • Secure Connection: SSL
    • Authentication Type: Password
  • Sending Email
    • Type: SMTP
    • Server: smtp.live.com:587
    • Secure Connection: TLS
    • Authentication Type: Login

Hotmail

  • Receiving Email
    • Type: POP
    • Server: pop3.live.com:995
    • Secure Connection: SSL
    • Authentication Type: Password
  • Sending Email
    • Type: SMTP
    • Server: smtp.live.com:587
    • Secure Connection: TLS
    • Authentication Type: Login

Yahoo

  • Receiving Email
    • Type: POP
    • Server: pop.mail.yahoo.com
    • Secure Connection: SSL
    • Authentication Type: Password
  • Sending Email
    • Type: SMTP
    • Server: smtp.mail.yahoo.com:465
    • Secure Connection: SSL
    • Authentication Type: Login
Refs:
http://pricklytech.wordpress.com/2010/05/01/ubuntu-10-4-lucid-configuring-evolution-to-connect-to-hotmail-windows-live-mail/
http://ubuntuforums.org/showthread.php?t=305886
https://help.ubuntu.com/community/UsingGmailWithEvolution

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
http://ubuntuforums.org/showthread.php?t=518293

Ref: http://vsftpd.beasts.org

Merge PDF files

Use the PDF toolkit "pdftk" from PDF Labs.

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

Ref: http://www.pdflabs.com/docs/pdftk-cli-examples/

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)
    user=username
    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
Worldwidepool.ntp.org
Asiaasia.pool.ntp.org
Australiaau.pool.ntp.org
Europeeurope.pool.ntp.org
North Americanorth-america.pool.ntp.org
Oceaniaoceania.pool.ntp.org
South Americasouth-america.pool.ntp.org

Ref: http://support.ntp.org/bin/view/Servers/NTPPoolServers

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
or
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:
http://libiphone.lighthouseapp.com/projects/27916/tickets/183-cannon-mount-iphone-with-ios-421-in-ubuntu-1010

https://help.ubuntu.com/community/PortableDevices/iPhone#Device does not mount after iOS4.2.x upgrade