Conler Cookbook

Important

All published here is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Feel free to share your experience and send you interesting Conler tricks and recipes to conler-maemo {at} thekondor.net.

Backup

Note

SSH is used as a main transport here but it is not only way. Backup can be performed also in various ways: rsync, ftp, own protocol etc. You are free to generate you own ideas how to backup your data.

Backup MaemoPad+ notes

MaemoPad+ stores its database in files with suffix .db. Task is: make a copy of these files and send them to the remote host using SSH connection.

Here:

/home/user/MyDocs – a dir with .db files

backup@192.168.1.2 – a remote host to store backups, where backup is a valid username there

/home/backup/n810/maemopad+ – a dir on the remote host where backups will be stored

/home/user/MyDocs/bin/backup-maemopad-db.shthis script

Solution:
  1. Download backup-maemopad-db.sh script to /home/user/MyDocs/bin

  2. Make downloaded script executable

  3. Add the following command to the Command List:

    /home/user/MyDocs/bin/backup-maemopad-db.sh /home/user/MyDocs backup@192.168.1.2 /home/backup/n810/maemopad+

Important

Internet Tablet’s SSH Public key must be already added to 192.168.1.2’s authorized SSH keys.

Note

Commands must be launched in USER environment.

System

Time synchronization

Make system’s and hardware’s clocks synchronization.

Here:

pool.ntp.org – NTP server to sync with

ntpdate – NTP client, doesn’t come with default Maemo installation – must be installed manually.

Solution:

/usr/sbin/ntpdate pool.ntp.org
/mnt/initfs/usr/bin/retutime --rtc-from-system

Note

Commands must be launched in SUPERUSER environment.

DynDNS update

Run DynDNS.com service script to update dynamic DNS.

Here:

/home/user/MyDocs/bin/update-dyndns.shthis script

user – DynDNS name to login

password – DynDNS password to login

myhost.homeip.net – DynDNS host name to update

Solution:
  1. Download update-dyndns.sh script to /home/user/MyDocs/bin

  2. Make downloaded script executable

  3. Add the following command to the Command List:

    /home/user/MyDocs/bin/update-dyndns.sh user password myhost.homeip.net

Note

Installed lynx package is required by the script.

Note

Commands must be launched in USER environment.

Set up an alternative gateway

There is an alternative gateway in the network which provides with unlimited traffic to Internet. Task is: replace default gateway with an alternative one.

Here:

192.168.1.1 – a default gateway given us by DHCP server

192.168.1.2 – an alternative gateway

Solution:

/sbin/route del default
/sbin/route add default gw 192.168.1.2

Note

Commands must be launched in SUPERUSER environment.

Add an alternative DNS

DHCP server doesn’t provide with DNS to Internet (local hosts only). Task is: add alternative DNS.

Here:
208.67.220.220 – an alternative global DNS (OpenDNS)

Solution:

/bin/echo nameserver 208.67.220.220 | /usr/bin/tee -a /etc/resolv.conf

Note

Commands must be launched in SUPERUSER environment.

Login to a corporate network

Corporate network after establishing network connection requires to make a special request to the login http server. Task is: login to a corporate network.

Here:

http://10.49.0.8 – login http server

nokia-user – username to login

secret-password – password to login

Solution:

/usr/bin/wget http://nokia-user:secret-password@10.49.0.8/login

Note

Commands must be launched in USER environment.

Note

GNU wget package must be installed.

Misc

Download 10 Best Photos from Flickr

There is a cool service: http://www.flourish.org/news/flickr-daily-interesting-one.xml which provides daily with a RSS feed to 10 interesting photos from Flickr.

Task is:
  1. Get daily 10 best photos from Flickr, only once a day
  2. Backup yesterday photos if there are
Here:

/home/user/MyDocs/.images/Flickr-Best – a dir to store downloaded Flickr photos

/home/user/MyDocs/bin/get-flickr-day-interesting-photos.shthis script

Solution:
  1. Download get-flickr-day-interesting-photos.sh script to /home/user/MyDocs/bin

  2. Make downloaded script executable

  3. Add the following command to the Command List:

    /home/user/MyDocs/bin/get-flickr-day-interesting-photos.sh /home/user/MyDocs/.images/Flickr-Best

Note

Commands must be launched in USER environment.

Update FeedCircuit feeds

FeedCircuit is a tool to grab rss and atom feeds

and to convert them to html for offline reading in tablet’s browser.

Task is: refresh all feeds downloaded by FeedCircuit.

Here:
/home/user/MyDocs/bin/update-feedcircuit-feeds.shthis script
Solution:
  1. Download update-feedcircuit-feeds.sh script to /home/user/MyDocs/bin

  2. Make downloaded script executable

  3. Add the following command to the Command List:

    /home/user/MyDocs/bin/update-feedcircuit-feeds.sh

Note

Commands must be launched in USER environment.

Important

Script uses the CLI version of FeedCircuit. Since CLI version 0.7.3-1 does not work as expected, it should be modified before using.

Run Instant Messenger

Task is: be able to enter immediately to ICQ using Pidgin (run Pidgin automatically after connection).

Here:
Pidgin – is an alternative well-known in Linux world multiprotocol
handy Instant Messenger. It doesn’t come with default Maemo installation – it must be installed manually.

Solution:

/usr/bin/dbus-send --dest=com.nokia.pidgin /com/nokia/pidgin com.pidgin.run

Note

Commands must be launched in USER environment.

Play Sound

Task is: play a custom notification sound.

Here:
/media/mmc1/sounds/coffee-shop-ap.wav – path to notification sound. Can be mp3 also.

Solution:

/usr/bin/dbus-send --dest=com.nokia.osso_media_server --print-reply /com/nokia/osso_media_server com.nokia.osso_media_server.music.play_media string:file:///media/mmc1/sounds/coffee-shop-ap.wav

Note

Commands must be launched in USER environment.