Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

diff set of env setting?

Posted on 2000-02-28
4
Medium Priority
?
285 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 12 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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…
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…
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…
Suggested Courses

715 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