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
Solved

pico not found

Posted on 2000-03-06
4
513 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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.:
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.

808 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