Gnus development mailing list
 help / color / mirror / Atom feed
* synchronizing desktop machine and laptop
@ 1998-12-24  4:32 Richard Coleman
  1998-12-24  7:44 ` Kai.Grossjohann
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Richard Coleman @ 1998-12-24  4:32 UTC (permalink / raw)


This posting is only partly related to Gnus, but since Lars has
recently gotten a new laptop I thought I would ask here.

What method are people using to keep their laptop and desktop machine
in synch?

I've been investigating Coda recently (http://www.coda.cs.cmu.edu/) and
that seems the best method so far.

But imagine if I use Gnus on my laptop in unplugged mode.  When I get
home and put the laptop back on my network, any changed files are
replicated back to my desktop machine.  But now it seems that the
message I wrote will be sent twice (once from each machine).

Does anyone know about IMAP disconnected mode (does nnimap even support
that)?  How does that compare to nnagent?

I'm just looking for ideas.

I'm currently using FreeBSD (2.x) although I'm thinking of trying
NetBSD (since 1.3.3 was just released).

--
Richard Coleman
coleman@math.gatech.edu


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: synchronizing desktop machine and laptop
  1998-12-24  4:32 synchronizing desktop machine and laptop Richard Coleman
@ 1998-12-24  7:44 ` Kai.Grossjohann
  1998-12-24 13:15 ` William M. Perry
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Kai.Grossjohann @ 1998-12-24  7:44 UTC (permalink / raw)


Richard Coleman <coleman@math.gatech.edu> writes:

  > What method are people using to keep their laptop and desktop
  > machine in synch?

Well, I have two desktop machines, but one is at home via a dialup
link, so the problem is the same :-)

I use rsync.  I do `uni get' to retrieve mail from work, then at home
I do M-x gnus-unplugged RET.  When I'm finished with mail stuff, I do
`uni put'.

This script calls `unimail' and `uniemm', where `unimail' synchronizes
the mail files and directories, and `uniemm' fetches new mail and
sends queued mail and stuff at the remote end.

Suppose my user name is `kaihome' with home dir /home/kaihome at home
and it is `kaiwork' with home dir /home/kaiwork at work.  Then:

,----- unimail
| #!/bin/sh
| 
| AH="kaiwork@work:/home/kaiwork"
| DO="-av --delete --exclude Incoming*"
| CFG="--rsh ssh --rsync-path /home/kaiwork/bin/rsync"
| 
| #  ------------------------------------------------------------ 
| #  -- dorsync <source> <target> -- 
| #  ------------------------------------------------------------
| #  Copies one directory from <source> to <target>
| 
| dorsync ()
| {
| 
|     echo rsync $DO $CFG $1 $2
|     rsync $DO $CFG $1 $2
| 
| }
| 
| #  ------------------------------------------------------------ 
| #  -- get -- 
| #  ------------------------------------------------------------ 
| #  Retrieves mail from uni
| 
| get ()
| {
| 
|     dorsync $AH/.newsrc $HOME/.newsrc
|     dorsync $AH/.newsrc.eld $HOME/.newsrc.eld
|     dorsync $AH/.nnmail-cache $HOME/.nnmail-cache
|     dorsync $AH/Mail/ $HOME/Mail/
|     dorsync $AH/News/ $HOME/News/
| 
| }
| 
| #  ------------------------------------------------------------ 
| #  -- put -- 
| #  ------------------------------------------------------------ 
| #  Uploads mail to uni
| 
| put ()
| {
| 
|     dorsync $HOME/.newsrc $AH/.newsrc
|     dorsync $HOME/.newsrc.eld $AH/.newsrc.eld
|     dorsync $HOME/.nnmail-cache $AH/.nnmail-cache
|     dorsync $HOME/Mail/ $AH/Mail/
|     dorsync $HOME/News/ $AH/News/
| 
| }
| 
| #  ------------------------------------------------------------ 
| #  -- Util functions -- 
| #  ------------------------------------------------------------ 
| 
| usage ()
| {
| 
|     echo "Usage: $0 ( get | put )"
|     echo "Synchronizes mail with uni."
|     echo "Get means download, put means upload."
|     exit 1
| 
| }
| 
| #  ------------------------------------------------------------ 
| #  -- Main program -- 
| #  ------------------------------------------------------------ 
| 
| if [ $# != 1 ] ; then
|     usage
| fi
| 
| case $1 in
|     get)
|         get
|         ;;
|     put)
|         put
|         ;;
|     *)
|         usage
| esac
`-----

,----- uniemm
| #!/bin/sh
| 
| ssh -l kaiwork work /usr/sw/emacs/20.3/bin/emacs \
|         -batch -l site-start -l .emacs.custom \
|         -f do-some-startup \
|         -l .emacs -l gnus -l .gnus -l gnus-agent -f kai-gnus-agent-do
`-----

,----- uni
| #!/bin/sh
| 
| case "$1" in
|     get)
|         echo "`date`: Getting mail from Uni"
|         start=`date`
|         isdnctrl dial ippp0
|         sleep 5
|         uniemm
|         unimail get
|         isdnctrl hangup ippp0
|         echo "${start}: Started getting mail from Uni"
|         echo "`date`: Done getting mail from Uni"
|         ;;
|     put)
|         echo "`date`: Sending mail to Uni"
|         start=`date`
|         isdnctrl dial ippp0
|         sleep 5
|         unimail put
|         uniemm
|         unimail get
|         isdnctrl hangup ippp0
|         echo "${start}: Started sending mail to Uni"
|         echo "`date`: Done sending mail to Uni"
|         ;;
|     *)
|         echo "Usage: $0 (get|put)"
|         echo "    get: connects to uni, gets new mail, downloads mail."
|         echo "    put: uploads changes, connects to uni, sends queued"
|         echo "         messages, then like get."
|         exit 1
|         ;;
| esac
`-----

As you can see, the script uniemm calls a function, which is defined
as follows in my .emacs:

,-----
| (defun kai-gnus-agent-do ()
|   (let ((gnus-verbose 5))
|     (message "Kai: fetching Agent session.")
|     (flet ((y-or-n-p (prompt) t)
|            (yes-or-no-p (prompt) t))
|       (gnus-agent-batch))
|     ;(gnus-agent-fetch-session)
|     (message "Kai: starting Gnus")
|     (gnus)
|     (message "Kai: sending drafts")
|     (gnus-group-send-drafts)
|     (message "Kai: fetching agent stuff")
|     (gnus-agent-batch)
|     (message "Kai: exiting Gnus")
|     (gnus-group-exit)
|     (save-buffers-kill-emacs t)))
`-----

All of this is a bit complicated, but it seems to work.

I'm also thinking about using IMAP, but I don't know the state of
affairs with respect to disconnected operation.

kai
-- 
This gubblick contains many nonsklarkish English flutzpahs,
but the overall pluggandisp can be glorked from context. -- David Moser


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: synchronizing desktop machine and laptop
  1998-12-24  4:32 synchronizing desktop machine and laptop Richard Coleman
  1998-12-24  7:44 ` Kai.Grossjohann
@ 1998-12-24 13:15 ` William M. Perry
  1998-12-24 15:59   ` Karl Kleinpaste
  1998-12-24 21:09 ` Aaron M. Ucko
  1998-12-25  0:15 ` Simon Josefsson
  3 siblings, 1 reply; 8+ messages in thread
From: William M. Perry @ 1998-12-24 13:15 UTC (permalink / raw)
  Cc: ding

Richard Coleman <coleman@math.gatech.edu> writes:

> This posting is only partly related to Gnus, but since Lars has recently
> gotten a new laptop I thought I would ask here.
> 
> What method are people using to keep their laptop and desktop machine in
> synch?
> 
> I've been investigating Coda recently (http://www.coda.cs.cmu.edu/) and
> that seems the best method so far.
> 
> But imagine if I use Gnus on my laptop in unplugged mode.  When I get
> home and put the laptop back on my network, any changed files are
> replicated back to my desktop machine.  But now it seems that the message
> I wrote will be sent twice (once from each machine).

  Since I am never without my laptop, I just use NFS and symlink from my
various home machines (mixture of linux, solaris, and hp/ux) onto the
laptop via 'amd'.  I also do the same on our even broader mix of machines
at work.  This way no matter what machine I'm logged into, gnus does the
right thing.

  Symlinks are: .gnus.el, .newsrc, .newsrc.eld, .nnmail-cache, Mail, and
News - works really well.

> Does anyone know about IMAP disconnected mode (does nnimap even support
> that)?  How does that compare to nnagent?

  Haven't tried it, although just plain imap works pretty well.  I'm
pushing really hard on our mis people to switch.

-bp


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: synchronizing desktop machine and laptop
  1998-12-24 13:15 ` William M. Perry
@ 1998-12-24 15:59   ` Karl Kleinpaste
  1998-12-24 17:01     ` William M. Perry
  0 siblings, 1 reply; 8+ messages in thread
From: Karl Kleinpaste @ 1998-12-24 15:59 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:
> Since I am never without my laptop, I just use NFS and symlink from my
> various home machines (mixture of linux, solaris, and hp/ux) onto the
> laptop via 'amd'.

That works until you're working on a machine behind an IPmasq gateway
and try to NFS-mount something in the Greater Out There, at which
point the server Out There logs messages from amd about the insanity
of the source request because its source port is mis-mapped, in turn
because the IPmasq gateway itself is using the intended port, so that
the masq code picks a replacement at random.

My solution is simply to ssh into my main machine, to run XEmacs
there.  I have yet to find a synchronization scheme that isn't either
horridly hackish or prone to failure in the face of unexpected
networking weirdnesses like IPmasq.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: synchronizing desktop machine and laptop
  1998-12-24 15:59   ` Karl Kleinpaste
@ 1998-12-24 17:01     ` William M. Perry
  0 siblings, 0 replies; 8+ messages in thread
From: William M. Perry @ 1998-12-24 17:01 UTC (permalink / raw)
  Cc: ding

Karl Kleinpaste <karl@justresearch.com> writes:

> wmperry@aventail.com (William M. Perry) writes:
> > Since I am never without my laptop, I just use NFS and symlink from my
> > various home machines (mixture of linux, solaris, and hp/ux) onto the
> > laptop via 'amd'.
> 
> That works until you're working on a machine behind an IPmasq gateway and
> try to NFS-mount something in the Greater Out There, at which point the
> server Out There logs messages from amd about the insanity of the source
> request because its source port is mis-mapped, in turn because the IPmasq
> gateway itself is using the intended port, so that the masq code picks a
> replacement at random.

  well, don't try to do that. :)

> My solution is simply to ssh into my main machine, to run XEmacs there.
> I have yet to find a synchronization scheme that isn't either horridly
> hackish or prone to failure in the face of unexpected networking
> weirdnesses like IPmasq.

  My laptop is always on the same internal net as the machine I want to be
using, so that's not an issue.  To each his own user & network specific
way. :)

-bp


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: synchronizing desktop machine and laptop
  1998-12-24  4:32 synchronizing desktop machine and laptop Richard Coleman
  1998-12-24  7:44 ` Kai.Grossjohann
  1998-12-24 13:15 ` William M. Perry
@ 1998-12-24 21:09 ` Aaron M. Ucko
  1998-12-25  0:15 ` Simon Josefsson
  3 siblings, 0 replies; 8+ messages in thread
From: Aaron M. Ucko @ 1998-12-24 21:09 UTC (permalink / raw)


This isn't quite the same situation, but when I'm at my permanent home
(as I am now), I'm stuck behind a dialup connection which isn't all
that great; since I don't want to tie up the phone line too long, I
rcp SOUP packets back and forth.  It's not ideal, but it works well
enough and lets me read both mail and news offline.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: synchronizing desktop machine and laptop
  1998-12-24  4:32 synchronizing desktop machine and laptop Richard Coleman
                   ` (2 preceding siblings ...)
  1998-12-24 21:09 ` Aaron M. Ucko
@ 1998-12-25  0:15 ` Simon Josefsson
  1998-12-26 16:46   ` Wes Hardaker
  3 siblings, 1 reply; 8+ messages in thread
From: Simon Josefsson @ 1998-12-25  0:15 UTC (permalink / raw)
  Cc: ding

Richard Coleman <coleman@math.gatech.edu> writes:

> Does anyone know about IMAP disconnected mode (does nnimap even support
> that)?

Protocol-wise a imap-client doesn't have to do anything to support
disconnected operation, which means nnimap "support" it.

> How does that compare to nnagent?

It's the same thing actually, a client implementing imap disconnected
mode would do it the way gnus-agent/nnagent does it (I imagine, only
having a fuzzy idea about the agent internals).

OTOH I'm not aware of anyone that has used gnus-agent + nnimap, so it
isn't a plug'n'play solution that would solve your problem today.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: synchronizing desktop machine and laptop
  1998-12-25  0:15 ` Simon Josefsson
@ 1998-12-26 16:46   ` Wes Hardaker
  0 siblings, 0 replies; 8+ messages in thread
From: Wes Hardaker @ 1998-12-26 16:46 UTC (permalink / raw)
  Cc: ding

>>>>> On 25 Dec 1998 01:15:50 +0100, Simon Josefsson <jas@pdc.kth.se> said:

Simon> OTOH I'm not aware of anyone that has used gnus-agent + nnimap,
Simon> so it isn't a plug'n'play solution that would solve your
Simon> problem today.

I've tried it.  It doesn't work.  nnimap still tries to talk to the
server on entry/exits (If I recall) from the summary buffer.  I think
you get some backtraces too at various points...

It's on my todo list to play with it more, but it doesn't work yet (I
haven't tried with the .8 series though...)

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1998-12-26 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-24  4:32 synchronizing desktop machine and laptop Richard Coleman
1998-12-24  7:44 ` Kai.Grossjohann
1998-12-24 13:15 ` William M. Perry
1998-12-24 15:59   ` Karl Kleinpaste
1998-12-24 17:01     ` William M. Perry
1998-12-24 21:09 ` Aaron M. Ucko
1998-12-25  0:15 ` Simon Josefsson
1998-12-26 16:46   ` Wes Hardaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).