Author Topic: Script to automate kopi rsync with desktop linux?  (Read 3728 times)

diesel1

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.diesel1.demon.co.uk
Script to automate kopi rsync with desktop linux?
« on: August 03, 2004, 07:33:57 pm »
Hello all,
Does anyone have a script for automating rsync with a destop linux box, in particular for use with KoPi?
I run Linux everywhere™ [don't know who, maybe me!  ] but am not experienced with scripting/programming.
I am using C860 <-> Mandrake10.
I have networking set up with my Lan, can ssh/vnc etc. between all machines.

Thanks in advance,
Simon.

C860-pdaXrom1.05-PocketWorkstation.DoH! (D ebian  o n  H andhelds!)
DLinkAir660WCF-256Mb/64MbIntegralSD-256Mb/64MbIntegralCF

SL550-OZ3.6.6pre1/OPIE1.1.4
« Last Edit: August 03, 2004, 07:38:27 pm by diesel1 »
C860-Zubuntu
DLinkAir660WCF-1Gb/256Mb/64MbIntegralSD-256Mb/64MbIntegralCF

SL5500-OZ3.5.2/OPIE1.1.7

slocaus

  • Full Member
  • ***
  • Posts: 243
    • View Profile
    • http://
Script to automate kopi rsync with desktop linux?
« Reply #1 on: August 04, 2004, 03:31:51 am »
Why rsync?  Just use the built in sync betwen KO/Pi and KOrganizer!

My settings (Menu, Synchronize, Configure)
I created a new profile named KOrg Mdk.
Sync preferences  * Force: Take local entry always
* Show summary after sync
* Write back file

Profile kind
* Remote file (w/ download/upload command)

Presync command
scp user@my.pc.domain.net:/home/<user>/.kde/share/apps/korganizer/mycalendar.ics /home/tmp/mycalendar.ics

Local temp file
/home/temp/mycalendar.ics

Postsync command
scp /home/tmp/mycalendar.ics user@my.pc.domain.net:/home/<user>>/.kde/share/apps/korganizer/mycalendar.ics /home/tmp/mycalendar.ics

I have KOrganizer on my desktop (Mandrake 10.1 Cooker) defined to use "mycalendar.ics" as its resource.

You have to have generated ssh keys on the Zaurus and the desktop so they can connect without needing password via scp.
Handheld:. Sl-5500 tkcROM 1.0 (defunct) * apps on ext2 Lexar 256 SD
Desktop:. Mandrakelinux 10.2 Cooker * kernel 2.6.11
Both computers run linux, proud to be MS Free

diesel1

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.diesel1.demon.co.uk
Script to automate kopi rsync with desktop linux?
« Reply #2 on: August 04, 2004, 07:34:17 am »
Ok, that sounds good.
Any tips on generating keys?

Simon.
C860-Zubuntu
DLinkAir660WCF-1Gb/256Mb/64MbIntegralSD-256Mb/64MbIntegralCF

SL5500-OZ3.5.2/OPIE1.1.7

zautrix

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
    • http://www.pi-sync.net
Script to automate kopi rsync with desktop linux?
« Reply #3 on: August 04, 2004, 07:38:16 am »
Quote
Ok, that sounds good.
Any tips on generating keys?

Simon.
There is a detailed ssh howto available at
http://oek.fbl.fh-wiesbaden.de/zaurus/

slocaus

  • Full Member
  • ***
  • Posts: 243
    • View Profile
    • http://
Script to automate kopi rsync with desktop linux?
« Reply #4 on: August 04, 2004, 08:02:31 am »
Quote
There is a detailed ssh howto available at
http://oek.fbl.fh-wiesbaden.de/zaurus/
Thanks zautrix!

I was going to suggest "man ssh".  

....and I can only hold one hand at a time....  
Handheld:. Sl-5500 tkcROM 1.0 (defunct) * apps on ext2 Lexar 256 SD
Desktop:. Mandrakelinux 10.2 Cooker * kernel 2.6.11
Both computers run linux, proud to be MS Free

diesel1

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.diesel1.demon.co.uk
Script to automate kopi rsync with desktop linux?
« Reply #5 on: August 04, 2004, 08:04:52 am »
Thankyou, I'm right on it.

Of course I should RTFM and RTFManPage!!

Simon.
C860-Zubuntu
DLinkAir660WCF-1Gb/256Mb/64MbIntegralSD-256Mb/64MbIntegralCF

SL5500-OZ3.5.2/OPIE1.1.7

diesel1

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.diesel1.demon.co.uk
Script to automate kopi rsync with desktop linux?
« Reply #6 on: August 04, 2004, 08:49:37 pm »
Hello again,

I can sync kopi by using a terminal to start kopi on the zaurus and then typing my password in the terminal when nescessary.
When I use the automatic password option in kopi I get a refusal from the desktop box.

I am a little confused what to do to fully automate this procedure, the link provided was very informative but was not clear/simple/understandable to me.

I will use it this way until I get it licked........of course I tried to RTFM and did a little RTFManPaging.......but I just aint getting it.

Simon.
« Last Edit: August 04, 2004, 10:50:41 pm by diesel1 »
C860-Zubuntu
DLinkAir660WCF-1Gb/256Mb/64MbIntegralSD-256Mb/64MbIntegralCF

SL5500-OZ3.5.2/OPIE1.1.7

zxerx

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • http://
Script to automate kopi rsync with desktop linux?
« Reply #7 on: August 09, 2004, 06:41:27 pm »
The general procedure to set up ssh so you don't need to enter a password is:

1. Generate key DSA pairs on each system (ssh-keygen -d)
2. Put the contents of id_dsa.pub on one machine into the authorized_keys2 file on the other machine (and vice versa if required).
3. You should now be able to ssh/scp into the machine you put the public key onto

NB# all the files are located in ~/.ssh
NB# don't set a password when prompted while generating key pairs
NB# you will probably have to create the authorized_keys2 file
NB# if for some reason you want to use RSA instead of DSA, RTFM
NB# you may have to play around with which keys go on which machine
       a few times until you get it right and understand how it all works
[span style=\'font-size:7pt;line-height:100%\']Zaurus SL-C760 :: pdaXrom 1.0.5 :: Toshiba 512Mb SD :: Hagiwara 256Mb 10Mbit/s SD :: PQI 256Mb 40x CF :: Socket Low Power 10Mb/s Ethernet CF :: Seano WiFi CF :: Xircom 56k Modem CF[/span]

diesel1

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
    • http://www.diesel1.demon.co.uk
Script to automate kopi rsync with desktop linux?
« Reply #8 on: August 11, 2004, 12:57:56 pm »
Thankyou very much that worked right out of the box.
I thought it should be as simple as that.

Simon.  
C860-Zubuntu
DLinkAir660WCF-1Gb/256Mb/64MbIntegralSD-256Mb/64MbIntegralCF

SL5500-OZ3.5.2/OPIE1.1.7