Solved

diff set of env setting?

Posted on 2000-02-28
4
283 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
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 how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

751 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