Solved

pico not found

Posted on 2000-03-06
4
517 Views
Last Modified: 2013-12-16
I have installed pine on a Solaris 2.6 server in /opt/UWpine. I have set the /etc/profile to include the following

PATH=$PATH:/opt/netscape:/opt/UWpine/bin:.;export PATH

Now, when I telnet to the machine and try to run pico, which is in /opt/UWpine/bin it tells me "pico not found" but when I'm actually on the machine, pico runs just fine. I am logged on as root in both instances.

Any ideas?
0
Comment
Question by:strausy
  • 2
4 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2588761
Are you sure you put the PATH statement in the right place in /etc/profile (not inside a conditional)? Are you actually logging in remotely as root or as some other user and "su"ing to root (that user's .profile might be resetting PATH)?
0
 
LVL 3

Expert Comment

by:freesource
ID: 2588763
Check to see what your path is when you telnet in as root with "echo $PATH", I think you will discover what the problem is.  Try putting the path in $HOME/.bash_profile .
0
 
LVL 1

Author Comment

by:strausy
ID: 2588916
I'm logging on as myself, then su root - ing.

I thought /etc/profile was the "global profile."

When I just su root, the path to /opt/UWpine/bin is not present, however if I su - root (with a dash) it is present and works.

So I guess I'm putting this in the wrong place? I logged onto another solaris box and I can use pico with any user and there is nothing in /etc/profile.  

I'm a bit unfamiliar with Unix, what/where exactly would $HOME/.bash_profile be?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 20 total points
ID: 2588966
The "su -" differs from "su" in that the user's shell init scripts (/etc/profile in this case) are read if you "su -".

What you most likely want to do is to create the appropriate shell init files in your (and/or) root's home dir. The names vary depending on what shell you use:

sh, ksh: .profile
csh:     .login, .cshrc .logout
tcsh:    .login, .tcshrc
bash:    .bash_profile, .bashrc

It's usually a good idea to leave the system's init files /etc/profile & /etc/.login as generic as possible, only placing definitions there that are applicable to all users on the system. Further customization is best done in a user's init file.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

730 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