.profile questions

.profile questions

Post by John T. She » Wed, 09 Jul 1997 04:00:00



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.

 
 
 

.profile questions

Post by Allen Kirb » Wed, 09 Jul 1997 04:00:00



> 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
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.

 
 
 

.profile questions

Post by Dan A. Merc » Thu, 10 Jul 1997 04:00:00



: >
: > 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.

 
 
 

.profile questions

Post by Allen Kirb » Fri, 11 Jul 1997 04:00:00



<snip>
> You left out that he must set that in his .vueprofile:

<snip>

Actually, if you do that then you don't get the settings when you
telnet or rlogin into the box.  I set my .vueprofile to call .profile
with the VUE variable set, then in my .profile I test the $VUE variable
and do the X-windows stuff there.  This way you only have one file to
change for things like PATH, etc. that works with or without X-windows.
This appears to be the recommended way of doing things, at least on
9.05.
--
Allen Kirby                     AT&T ITS Production Services

-----
The views expressed are mine, not my employers.

 
 
 

1. Simple (I hope) profiling questions on AIX

I'm trying to profile a program that forks.  It is large.  I want to
profile only one part of it.

I've tried tprof and get access denied messages and device nonexistant
messages (the first at startup, the latter at exit) - any ideas what I
might do (email if you want the exact messages)?

Second, I've tried using the -pg option on compiling a portion of my
code (one library).  I link using -pg.  I run the program and do not
get a gmon.out file (due to the fork, should I expect a file anyway,
but one that does not include all the information before the fork, or
what?)?  I've been reading IBM's "documentation" (specifically
_Performance Monitoring and Tuning Guide_) and cannot figure out what
to try next.  Any ideas would be helpful - my email address (as per my

Have fun! - Bob

--
===============================================================================
The opinions expressed above are those of Bob Hays and not SPSS, Inc.

                   Fax:   (312) 329-3657 |  for a windshield on a freeway" -PG

2. Sendmail 8.7 breaks Solaris 2.4 NIS+

3. .profile question

4. Help With Apache tweeking

5. a .profile question about the xenix vsh

6. pipes and stdout?

7. .profile question

8. Trouble Mounting CD-ROM in FreeBSD 2.2.8

9. HPUX 10.2 /etc/profile question

10. bash .profile questions

11. samba pdc and profiles question

12. profile question

13. .profile question