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.
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):
- Open the terminal
- Run ssh-keygen
- Do not enter a password, just press return
- Keep the default key file location, press return
- Copy the contents of /home/user/.ssh/id_rsa.pub into your remote server's .ssh/authorized_keys file
- ssh onto the remote server to confirm the server key and to check if the passwordless connection works.
Configuration happens on the normal settings application:
- Settings / Einstellungen
- Connection settings / Verbindungseinstellungen
- Sharing accounts / Freigabekonten
- New / Neu
- Command line sharing
- 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.
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.