[comp.sys.hp] XSession & the env?

jsd@esl.ESL.COM (Jeff Dalton) (08/28/90)

I'm attempting to run emacs from the HP Control "box".  When I do this, there
is the problem of setting the environment to the same as in my .profile and
.kshrc files.  It seems that only the env specified with the XSession.* cmds
is visible from emacs.  The problem I'm having is setting up the env with
the limited XSession commands. 

Is there any way to have XSession referance the env set by the .profile and 
.kshrc files?  Everything works the way I want if I start emacs from a hpterm,
but doesn't seem like the way if should work.
-- 
Jeff Dalton, ESL Inc.                    Real programmers can write 
jsd@esl.com                                 Fortran in any language.

bigelow@hpfcso.HP.COM (Jim Bigelow) (08/30/90)

/ hpfcso:comp.sys.hp / jsd@esl.ESL.COM (Jeff Dalton) / 10:34 am  Aug 28, 1990 /

> I'm attempting to run emacs from the HP Control "box".  When I do this, there
> is the problem of setting the environment to the same as in my .profile and
> .kshrc files. 

I run emacs from the Xsession control box with the following set up in
my .Xdefaults and help file.  I think you could set your environment
as needed as an argument to the /bin/sh command.  I hope this will
help you get set up.

Jim Bigelow
S300 Pascal
Colorado Langauage Lab.
HP

---- .Xdefaults  ---- 

XCtrl*addPrograms:  datebook  emacs cutdisp

XCtrl*emacs*CommandLine:        /bin/sh -c "DISPLAY='unix:0'; export DISPLAY; exec /usr/local/bin/emacs -i -w =80x43 -bg wheat"
XCtrl*emacs*ManPage:            emacs
XCtrl*emacs*IconBitmap:		emacs


---- /usr/lib/X11/helpfiles/app_info/emacs ----

The GNU project Emacs text editing program
__________________________________________________________________

GNU Emacs is a new version of Emacs, written by the author
of the original (PDP-10) Emacs, Richard Stallman.

Emacs has an extensive interactive help facility, but the
facility assumes that you know how to manipulate Emacs
windows and buffers. ESC-x info <return> enters the Help
facility.  Help Tutorial (ESC-x help-for-help t) requests
an interactive tutorial which can teach beginners the
fundamentals of Emacs in a few minutes.  Help Apropos
(ESC-x help-for-help a) helps you find a command given its
functionality, Help Character (ESC-x help-for-help c)
describes a given character's effect, and Help Function
(ESC-x help-for-help f) describes a given Lisp function
specified by name.

eric@hpfcda.HP.COM (Eric Flink) (09/04/90)

> I'm attempting to run emacs from the HP Control "box".  When I do this, there
> is the problem of setting the environment to the same as in my .profile and
> .kshrc files.

> Is there any way to have XSession referance the env set by the .profile and 
> .kshrc files?

It is true that xsession does not read your shell configuration files.
You can use the following trick to cause your .profile and .kshrc files
to be read:

hpterm -T emacs -n emacs -e ksh -c ". ~/.profile ; . ~/.kshrc ; exec emacs"

Try hooking this command line up to your emacs button on the control panel.

Regards,

Eric Flink

eric_flink@fc.hp.com
(303) 229-2313

This posting does not reflect the official position of Hewlett-Packard Company