Solved

diff set of env setting?

Posted on 2000-02-28
4
278 Views
Last Modified: 2013-12-06
I don't understand the following.

I am using the Bourne shell. As the shell path was set to on my machine to /usr/bin/sh I find that I have problem compiling the src of application on my HP-UX (for example zip).  I find it very troublesome to rename the shell path from all the related files from /bin/sh.  Is there a work around?

After having compiled and installed the program on my machine. I don't have problem executing it when I telnet to the server.  I found that that is because the env setting was taken from my local path .profile

However, when I use xwin32 rexec (xterm) to log to the same server. I found that the environment set on my .profile was not taken in. I could not execute the program that I install in /usr/bin/local When I execute echo $PATH, what I got is on;t just a very short path. Not the one that I define in my .profile

How can I get xwin32 to take in the env set on my .profile

Thanks
0
Comment
Question by:ycgoh
  • 2
4 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2565818
Regarding the first item, if you mean that /bin/sh doesn't exist on your machine and that you have to change occurances of "#!/bin/sh" to "#!/usr/bin/sh", then, no there isn't any work around. I'd be very suprised though, to find a system that didn't have a /bin/sh. I'd suggest talking to the sysadmin of that machine and get theim to fix it if /bin/sh doesn't exist.

".profile" doesn't get used on an rexec or rsh connect. You can finesse it though by sourcing .profile after you connect (sh .profile).
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 2566092
I'll concur here.  /bin on HP-UX 10 and 11 is a symbolic link to /usr/bin, so this should work just fine.  As for .profile, I agree there too.  Try the moral equivelant of
  rexec '. $HOME/.profile;  _the_real_command'

Alternately, if you don't need all of .profile
  rexex 'PATH="$PATH:/usr/bin/local" _the_real_command_'
0
 

Author Comment

by:ycgoh
ID: 2571162
Where should I incorporate the command given above by chris ?  My current command for xwin32 is:

 /usr/bin/X11/xterm -display $MYIP:0 -n sassp2 -fg lightBlue -bg black -sb -sl 2000&

With regards to my default shell path at /usr/bin/sh  is it correct for me to just copy all the files over to /bin  ?

Finally, how do I incorporate the path /usr/bin/local to be included into the current path for all users login in, even though from xwin


Thanks
0
 
LVL 40

Accepted Solution

by:
jlevie earned 3 total points
ID: 2571279
The command would be:

rexec '. $HOME/.profile; /usr/bin/X11/xterm.....'

Naw, you don't want to copy anything. As root do, "ln -s /usr/bin /bin".

Have them put it in their $HOME/.profile and "rexec" as above from xwin.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now