Nokia N900: Share photos via scp

My phone, a Nokia N900 with Maemo operating system, has a nice image browsing tool that has the ability to send images to online services. It's dubbed share via service and the phone brings plugins for Flickr and Nokia's Ovi preinstalled.

I'm a big fan of self-hosting, so uploading images to services that are not controlled by me is something that I will not do.

But what are my options for easy image sharing? I can connect the phone via USB and copy the images off it, or - as I did until yesterday - open the phone's shell, enter the scp command to copy the images to the remote server and press return. Very cumbersome and error-prone.

Command line sharing

Today I finally found a "share via service" plugin that allows me to pass any command to it, and it will execute it: Command line sharing by Tuomas Kulve.

You can install it as usual via the package manager.

SSH setup

Before I could setup the sharing service (which did not work at first because the connection gets verified), I had to setup a password-less SSH connection to the server (similar to what I did for my Shutter scp plugin):

  1. Open the terminal
  2. Run ssh-keygen
  3. Do not enter a password, just press return
  4. Keep the default key file location, press return
  5. Copy the contents of /home/user/.ssh/ into your remote server's .ssh/authorized_keys file
  6. ssh onto the remote server to confirm the server key and to check if the passwordless connection works.

Sharing setup

Configuration happens on the normal settings application:

  1. Settings / Einstellungen
  2. Connection settings / Verbindungseinstellungen
  3. Sharing accounts / Freigabekonten
  4. New / Neu
  5. Command line sharing
  6. Command: scp "%s" "server:path/to/imagedir/%s"

I had a hard time finding out how to get the % sign, since it is not on the keyboard. Not even entering it via the VNC session (established using x11vnc on the phone) did work. You have to press (above Shift) and Sym (above ➚) afterwards to open the special symbols table. The percent sign is on it.

Select service Edit account - CLI

Image sharing

Photo sharing is a snap now: View an image in the photo tool, click the three-connected-dots icon, click "via service", "cli sharing" and "ok". That's it.

A small green icon will appear next to the clock in the status bar, indicating that the upload is in progress. It vanishes when it's complete.

Image view Share Share via CLI

Written by Christian Weiske.

Comments? Please send an e-mail.