minipine in mini VNC window (was "Doing Pine from Palm via VNC to Xvnc")

Mike Miller
Fri Jul 25 08:02:00 2003

On Fri, 25 Jul 2003, Mike Miller wrote:

> I wrote up a bunch of info about my scheme and you can read it all in my
> next message.

Here it is.  Take a look at the little .gif of the minipine window.  I
feel like a proud parent!  ;-)


I typed most of this message using my new "minipine" in a VNC window.
Here's a screenshot:

I actually used ^_ to go into an alternate editor, emacs, to do the actual
typing because a really little pine can't deal with long lines.  I like to
keep my lines at about 74 characters and minipine will only display about
25.  Here's what it looks like when I'm in pine but using the emacs

Everything below this paragraph was done in the minipine.  It's really
just pine, but with a few options selected to make it work well in
minisize.  I've been dreaming of having something like this for a few
years now, so it had better work when I get my wireless PDA!

Some people will wonder, why use VNC when you could use SSH.  That's a
good question.  First, I'm not sure if I'll like the SSH I can run on a
Palm device - will it do colors?, etc., etc.  Second, if I ever lose my
connection, with SSH, my session ends, but with VNC, I can reconnect
*exactly* where I left off.  Third, I probably can't click on the pine
window in SSH, but it is possible to do that in VNC.  Clicking with a PDA
is often a lot easier than typing control characters (even though I'll
have a QWERTY keyboard on my PDA).

I'm going to be receiving my Handspring Treo 300 in a few days.  For $15
per month I'll have unlimited always-on internet access through Sprint (or
so I'm told), so I've been coming up with some cool things to do with it.
I'm a pine user and also a VNC user.  I have Xvnc running on my Solaris
box and I can connect to it and run pine in an rxvt window.  So I thought,
why not make a mini VNC window and a mini rxvt window and connect to them
using Palm VNC viewer?

I figured out a few sneaky tricks and I think I have a really cool working
system now.  I don't have the Palm device yet, so I can't test it, but I
have a nice little VNC window running Pine.  In fact I'm typing this
message in that little window and it is quite comfortable for me.

Here are the details (I assume that you have both Xvnc and rxvt up and

(1) Choose good settings for rxvt.  I think it is wise to use black
bacground and white foreground to save batteries.  Then, imporantly, have
this line in ~/.Xdefaults:

Rxvt*font:  6x10

That will give you the tiny font you need for the mini rxvt window (6
pixels wide and 10 pixels tall).  When you need larger fonts you can use
Shift-+ (from the numeric keypad) to enlarge the font and window, but you
won't want to do that in the mini VNC window.

(2) Put this line in your ~/.vnc/xstartup file:

toolwait /usr/local/bin/rxvt +sb -geometry 26x16+-6+-25

That makes the little rxvt window and pushes it off the screen a bit so
that the borders don't show at all.  The exact values of -6 and -25 will
probably depend on your window manager, so you'll want to experiment with
this from the command line until it lines up just right.

I make a ~/.vnc/xstartmini file and a ~/.vnc/xstartmaxi file then I copy
the one I want to use to ~/.vnc/xstartup before launching vncserver.
That's the only way I could think of to maintain multiple settings in VNC.

(3) Make a little VNC session to connect to.  Palm devices are usually
160 x 160, but for certain reasons, I make my VNC session 158 x 160.  This
is the command to make it work:

vncserver -geometry 158x160 :2

where ":2" is the display number for your session.  If you use VNC much,
you'll probably want to have at least two vnc sessions running - one mini
and one ordinary.  By the way, my ordinary VNC session has been used
heavily for 494 consecutive days without failure.  Of course this means I
also haven't rebooted in 494 days, which is nice!

(4) Use a special command to launch a mini pine.  This is what I've been

pine -z -feature-list=no-use-subshell-for-suspend
-index-format='STATUS(3) FROMORTO(10) SUBJECT(11)'

That would all go on one line, but I've wrapped it for readability.  Some
of those things won't do much for you unless you have the right stuff in
your ~/.pinerc file (e.g., the ansi color).  Note that a have a 26
character wide display, but I wrap at 25 characters.

Here's one more trick I'm using -- I also use this option in pine:


where the executable file emacspine has the following one line of content

/usr/local/bin/emacs -nw $1 -f pinemode

and my ~/.emacs file contains this:

(fset 'pinemode

That all makes it so that emacs will be called by pine as the alternate
editor whenever I hit ^_ while editing, and it will function somewhat like
the pine editor automatically wrapping at 74 characters.

There are other neat tricks like using '|' (pipe), followed by ^Y and less
-S to read messages.  It lets you scroll left to right while maintaining
column alignment.

So, that's it.  Now, if I get that Treo 300 and find out that Sprint is
blocking my VNC, I'll have to kill someone!  ;-)

Here's another important thing -- you can get VNC for Palm OS from here:


Michael B. Miller, Ph.D.
Assistant Professor
Division of Epidemiology
and Institute of Human Genetics
University of Minnesota