Thursday, June 10, 2010

Nokia N900 guide - rsync Tomboy / Conboy notes

To sync Tomboy notes on your Windows PC with Conboy notes on N900, follow the setup below:

N900

As root, edit /etc/rsyncd.conf:

[notes]
path = /home/user/.conboy
uid = user
gid = 29999
read only = false


Then /etc/init.d/rsync restart

PC

Create sync_notes.bat in C:\N900 or your favorite N900 script directory with the following content:

set RSYNC_DIR="C:\Program Files\cwRsync\bin"
set N900_IP=192.168.1.100
set PC_NOTES_DIR="/cygdrive/C/Documents and Settings/User Dir/Application Data/Tomboy/notes/"

pushd .

cd %RSYNC_DIR%

rsync -rulD %1 --progress %PC_NOTES_DIR% --include=*.notes --exclude=Backup %N900_IP%::notes
rsync -rulD --progress %N900_IP%::notes --include=*.notes --exclude=Backup %PC_NOTES_DIR%

popd
pause


Now you are ready to initiate the sync from your PC by running sync_notes.bat. Note that Tomboy cannot be running during the sync.

Tuesday, April 13, 2010

Nokia N900 guide: Transferring files to and from the N900

On the N900...
  1. Install SSH server
  2. Configure password for user account
    1. Go to X Terminal and become root
    2. Enter the command: passwd user
    3. Enter new password when prompted
On Windows...
  1. Download and install Filezilla client
  2. Run the Filezilla client
  3. Go to File -> Site Manager
  4. Create a new called "N900" with the following settings:
    • Host: Your N900's IP address
    • Server Type: SFTP - SSH File Transfer Protocol
    • Login Type: Normal
    • User: user
    • Password: Your user account's password


Optionally, under the N900 site configuration, you can create a "Camera" bookmark which allows to sychronously view the DCIM directory on the N900 and the desired directory on your PC.


Now select the N900 site and hit Connect. You will see something similar to the following:


You can now transfer files between the N900 and your PC simply by dragging and dropping.

To go straight to the DCIM folder on the N900, you can select the bookmark that you have previously created.





As you can see, the local site (left) automatically changed the directory to the one that you configured before. And the remote site (right) jumped to the DCIM folder.

Nokia N900 guide: Setting a password for x11vnc

  1. Open X Terminal (or SSH into the N900 and login as user) and type x11vnc -storepasswd
  2. Enter password when prompted
  3. Gain root
  4. As root user, edit /usr/share/applications/hildon/x11vnc.desktop
  5. Replace the line that says "Exec=/usr/bin/x11vnc" with "Exec=/usr/bin/x11vnc -usepw"

Other customizations for x11vnc on the N900 can be found here.

Monday, April 12, 2010

Nokia N900 guide: startup scripts

I haven't quite figured out how to execute certain scripts on startup until today. There is a rsync script under my /etc/init.d directory but I could not get it to start automatically. I tried update-rc.d but it doesn't do anything other than creating an S20rsync file under /etc/rc2.d.

It turns out N900 uses upstart instead. So all I have to do is to create a file called rsyncd under /etc/event.d with the following content:



start on stopped rcS

console output

respawn

script
exec /etc/init.d/rsync start
end script

Saturday, April 10, 2010

Nokia N900 guide: nano text editor

Everytime I install a new Linux distro, the first thing that I look for is my beloved "nano" text editor. I know "vi" just enough to be able to insert, delete, save and exit but I just can't be productive without nano!

N900 of course comes with vi but it took me a while to get nano installed on it. At first I went to official nano site but couldn't find any binaries for ARM. I found one for Ubuntu but apparently that was incompatible with the Maemo5. Then I found this Maemo wiki page and immediately followed the instructions to add the fremantle/tools repository. To my disappointment, there was still no sign of nano in the App Manager even after numerous refreshes.

So I slided out the N900 keyboard, went to the terminal and fired away the following commands:
root
apt-get update
apt-get install nano

It asked me to install libncurses as well. Fine! Just gimme nano!

And now I can be productive again. Beautiful.

Tuesday, March 30, 2010

Nokia N900 guide - Chinese handwriting recognition (諾基亞 N900 中文手寫輸入示範)

I've had the Nokia N900 for a little over a week now and I have not been able to put this thing down. The web browsing experience is just unmatched by any other "smart" phones out there and simply awesome.

One of the major complaints though is the lack of Chinese language input method. Although there is an unofficial Nokia N900 traditional Chinese package - Nokia N900 繁體中文包, it still does not support Chinese handwriting recognition.

The N900 is armed with a resistive touchscreen which is actually ideal for precise operations like Chinese character handwriting. It's a shame that Nokia doesn't fully take advantage of competitive edge (yet).

Recently I found this website (Qpen巧筆) which supports Chinese handwriting. I've used it a few times on my PC using a mouse. It works ok but it just doesn't feel comfortable to draw strokes with a mouse.

I logged on to this website from my N900 and gave it a try. In the beginning I couldn't figure out how to use it because every time I tried to draw a stroke, it would drag the screen.

As I get more comfortable with my N900, I learn about "mouse mode". "Mouse mode" on the N900 is the missing piece to unleashing the power of Chinese handwriting recognition. After activating mouse mode, I am now able to hand-write characters on the website!

諾基亞 N900 中文手寫輸入


Click on this video and see for yourself!

諾基亞 N900 中文手寫輸入示範


Here are the steps:
  1. Log on to the Qpen巧筆 website
  2. Zoom in to maximize the writing area and the textbox above it
  3. Activate mouse mode (Follow instructions here)
  4. Start writing!

Tuesday, March 23, 2010

Nokia N900 guide: Sync folders between N900 and PC over wifi (by authorized users only)

In the previous post, I talked about how to use rsync to sync the DCIM folder on the N900. This post will build on that same design and extend it to sync an additional folder by an authorized user only.

First, let's expand /etc/rsyncd.conf. We are going to add another module called "top_secret" and only "santa" can have access to it.

/etc/rsyncd.conf

max connections = 3

[camera]
path = /home/user/MyDocs/DCIM
uid = nobody
gid = 65534

[top_secret]
path = /home/user/MyDocs/.videos
auth users = santa
secrets file = /etc/rsyncd.secrets
Next, create /etc/rsyncd.secrets on the N900 with the following content.
santa:claus
  • (Authorized user is "santa" with password "claus".)

Now go back to Windows and update sync_n900.bat:
set RSYNC="C:\Program Files\cwRsync\bin\rsync"

%RSYNC% -aP santa@192.168.0.105::top_secret "/cygdrive/C/Documents and Settings/N900 User/My Documents/My Pictures/Another N900 Folder"

%RSYNC% -az --progress 192.168.0.105::camera "/cygdrive/C/Documents and Settings/N900 User/My Documents/My Pictures/From N900 Camera"
  • In case you haven't noticed, the arguments for the two rsync commands are slightly different. The "P" switch allows partially transferred file to be saved even if the rsync connection is terminated abruptly. rsync will automatically pick it up where it left off the next time you sync again. This is especially useful for transferring very large files.
  • Upon running sync_n900.bat, you will be prompted to enter password for user "santa".
  • And that's it! Now you can rsync multiple folders!