: >
: > I'm running HP-UX 9.07 and I'm having a problem
: > with my .profile. First when I bring up a new
: > hpterm my .profile is not executed and second when
: > I run it from the command line runs but then there
: > is a logout message and none of the settings stay.
: > Any help in this will be most appreciated.
: > --
: >
: > John T. Shea
: >
: > To reply remove the nospam from my address.
: John,
: It's not supposed to read .profile. That's only read at login time.
: If you're using ksh, set the ENV variable to a file in your HOME
: directory, e.g. "export ENV=$HOME/.kshrc". Put all of your ksh commands
You left out that he must set that in his .vueprofile:
#!/bin/ksh
export ENVFILE=~/.kshrc
export ENV='${ENVFILE[(${#-}==0)+(_$-=0)+(_=1)-_${-%%*i*}]}'
The #!/bin/ksh line tells /usr/vue/config/Xsession that you will
be using the ksh. The next two lines will cause env only to be
resolved for interactive (login) shells, not for shell scripts.
You can, of course, set the hpterm loginShell resource:
go to the General Toolbox==>SysAdmin==>EditResources
in the editor, add the resource (or change it if it exists)
HPterm*loginShell: True
File->Save.
If you are returning to the current session, you're done. If
you are restoring a Home session, you need to:
1. Exit all windows except those you want started automatically
(If you are using Desktop Icons, you must restart the File
Manager).
2. Start the Style Manager.
3. Go to Startup.
4. Save Curent Session.
An alternate, and preferable method of dealing with resources is
to use xrdb to merge them in. You can't do this in .vueprofile -
because VUE loads its resources. You can, however, set up
a file to execute after vuesession is established but before
vuewm is started. Just edit and chmod +x a file named:
~/.vue/sessions/sessionetc
and you can xrdb -merge from there (the file ~/.vue/sessions/sessionexit
is executed on logout).
: that you want executed by every ksh you run in this file. As far as
: executing it from the command line, did you source it with a '.' as
: in ". ./.profile" or did you just run it like ".profile". You must
: source the file with a '.' to have the settings apply to your current
: shell. The second method spawns a subshell, the settings only apply to
: it, and when .profile is finished, the subshell dies and the settings
: die with it. Other shells have similar setups, see the man page for
: the shell you're using.
: --
: Allen Kirby AT&T ITS Production Services
: -----
: The views expressed are mine, not my employers.
--
Dan Mercer
Opinions expressed herein are my own and may not represent those of my employer.