Solved

diff set of env setting?

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
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.

785 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