Subject: Problems starting pine from HP Vue Frontpanel and menus

From: Ian Leiman <[email-masked]>
Date: Thu, 10 Feb 1994 20:36:53 +0300 (EETDST)

This is a problem that has bothered me a long time, but I haven't had
any luck in finding a nice solution. Perhaps someone in this mailing
list has figured it out??

We use HP9000/730 hosts with HP/UX 9.01 and from 700/RX X-terminals
configured to use HP-Vue. PINE does not of course work properly with
the default HpTerm terminal windows, you must use Xterm. In HpTerm
cursors keys won't work etc. weird things happen. Modifying ttyin.c
would surely fix this, but that's not my idea of having fun :-)

Even when you use xterm, you must start pine from a shell. Starting pine
by using 'xterm -e pine', which starts pine directly without invoking any 
shell first, does not work properly. Something goes wrong with the
tty-driver and the screen becomes messy. This would work however: 
'xterm -e csh -c pine'

but executing the shell in between is really a waste of CPU time and system
resources. The shell shouldn't really be needed. Then you could of course
make a shell script (say eg. 'exec.pine') that contains 
#!/bin/csh
exec pine

executed by 'xterm -e exec.pine', to get rid of the shell after pine starts.
This isn't very elegant either. Also, pine won't start from tcsh or zsh
properly, you must use csh. This is the only program that I know of, that
behaves like this. Answer may be found from ttyout.c's 2000 lines of code,
or maybe it's HPs fault?

The standard way to put something like pine into Vue Workspace Menu is 
modifying your ~/.vue/vuewmrc (or system-wide '/usr/vue/config/sys.vuewmrc') 
in the following manner:

Menu VueRootMenu
{
    "Workspace Menu"               f.title
    pine _P Meta<key>F11 f.exec "xterm -e pine"
    ...etc...
}

Can somebody explain why doesn't this work, and I really must use the ugly:
    pine _P Meta<key>F11 f.exec "xterm -e csh -c pine"

Equivalently, adding PINE to Front Panel goes like this. To a file called
'/usr/vue/config/panels/fp.mail' you add (included in vuewmrc):
CONTROL Pine
{
  TYPE button
  IMAGE mail
  LABEL "Pine"
  PUSH_ACTION f.exec "xterm -e /usr/local/bin/pine"
}
...etc...
BOX Bottom
{
  TYPE             secondary
  CONTROL          Pine
}
...

which of course doesn't work, you must make it
  PUSH_ACTION f.exec "xterm -e /bin/csh -c /usr/local/bin/pine"

************************
Note, that you can also replace PINE as your MAILER action, which means that 
you could have PINE start from the standard mail button of Front Panel. You 
need a file called '/usr/vue/config/types/pine.vf', that contains:
ACTION Pine
        DESCRIPTION     Pine mailer action 
        TYPE            COMMAND
        EXEC-STRING     /usr/local/bin/pine
        WINDOW-TYPE     TERMINAL
END

then in your '~/.vue/types/user-prefs.vf' OR '/usr/vue/types/user-prefs.vf':

# To use a mailer other than elm, define an action for your mailer and
# substitute it for Elm.
ACTION Mailer
        TYPE            MAP             Pine
END

The problem here is that Vue absolutely refuses to use Xterm disregarding
that I have defined personally and system-wide TERMINAL action as Xterm. 
Vue persistently uses Hpterm and Pine thus won't work. A less elegant
work-around is to have a script start the xterm, which would start the
shell and then pine. But that's too desperate...

-- 
Ian Leiman, M.Sc.             phone +358 0 5104 4453, fax +358 0 5104 4764

---

From: Daniel Simmons <[email-masked]>
Date: Thu, 10 Feb 1994 12:19:53 -0700

>would surely fix this, but that's not my idea of having fun :-)

This doesn't "exactly" answer your question, but...

I have a patch for pine version 3.87 (I haven't updated it to 3.89 yet)
which makes it work properly in an hpterm (I had to because a number of our
users actually use hp dumb terminals--not under x windows).  There are
still a few small problems, but they are basically little reverse video
buglets that don't amount to much (99% of everything works correctly).

I've also talked with the pine maintainers about some more hardcore changes
to their terminal i/o library which would fix the rest of the problems.  We
may work together to integrate the changes in some future release of pine. 

Anyway, if you want the patch, let me know.

Danny
-- 
Daniel Simmons          electronic mail : [email-masked]
Idaho State University       voice mail : (208) 236-3199
Computer Center              snail mail : Box 8037, Pocatello