Solved

diff set of env setting?

Posted on 2000-02-28
4
277 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

708 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

18 Experts available now in Live!

Get 1:1 Help Now