?
Solved

pico not found

Posted on 2000-03-06
4
Medium Priority
?
525 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
[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: 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 60 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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…
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.
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.
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

771 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