LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-25-2005, 12:21 PM   #1
bicbac
LQ Newbie
 
Registered: May 2004
Posts: 3

Rep: Reputation: 0
It's about editing 'etc/profile'


Hi, I just installed SuSE 9.3 Pro. on Win XP to my Dell Inspiron 1200 using VmWare. After I installed NS2, which is a network simulation program, I typed ' ./install ' at ' /root/ns2/ns-allinone-2.28 ' and the installation was fine. Then I had to edit ' /root/etc/profile' to set up the path for the NS2 program. Below is the edited part.

----------------------------------
#
# Make path more comfortable
#

if test -z "$PROFILEREAD" ; then
PATH=/user/local/bin:/user/X11R6/bin:/bin:/root/ns2/ns-allinone-2.28/bin:/root/ns2/ns-allinone-2.28/bin
-----------------------------------

However, when I type ' ns ' after the editing, I got this error message :

' bash: ns: command not found '

But, the command got no problem because....If I copy ' ns ', the exacutive file, from :/root/ns2/ns-allinone-2.28/bin to ' /root/bin ' and type ' ns' It works~~! If I erase the ' ns ' from /root/bin , it is not working anymore.


Q1. I think there was some mistake during editing the profile but I don;t know what it is. please please help me.
 
Old 08-25-2005, 12:27 PM   #2
jojob
Member
 
Registered: Aug 2005
Location: Italy
Distribution: fedora
Posts: 32

Rep: Reputation: 15
After changes to profile you must close and restart your shell.
 
Old 08-25-2005, 12:28 PM   #3
ganja_guru
Member
 
Registered: Dec 2003
Location: Chennai, India
Distribution: Arch Linux 0.7
Posts: 393

Rep: Reputation: 30
ive never seen "/user/"...its always "/usr/" ...and most likely you should be editig /etc/profile and not /root/etc/profile..
 
Old 08-30-2005, 05:29 AM   #4
bicbac
LQ Newbie
 
Registered: May 2004
Posts: 3

Original Poster
Rep: Reputation: 0
^_^

many thanks to ganja_guru and jojob~


1. I restareted my shell after I change the profile, but still nothing happens.

2. Yes, ganja_guru..u're right its /etc/profile not /root/etc/profile..
but still nothing happens after I change the /etc/profile
 
Old 08-30-2005, 05:36 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Normally, using SuSE, you edit /etc/profile.local instead of /etc/profile.

Also, the script is run when logging in. So either you need to start a shell like /bin/bash -l or log-out and log-in.
 
Old 08-30-2005, 10:06 PM   #6
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
I do hope that you are not running as root, this is a really bad idea.

Is ns2 installed in /root. If it is, it will only be accessible to the root user, not regular users. Try installing it to /usr/local.

Once you have installed ns2 to /usr/local, try making a symbolic link to the ns2 executable in /usr/bin.
Code:
ln -s /usr/local/ns2/ns-allinone-2.28/bin/ns /usr/bin
Assuming that /usr/local/ns2/ns-allinone-2.28/bin/ns is the path to ns.

By making symbolic links, you remove the need to edit your $PATH.

You might need to make a link in a similar fashion to nam (I think)

I hope this helps
--Ian

Last edited by IBall; 08-30-2005 at 10:07 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
non roaming profile on a roaming profile system fieldyweb Linux - Newbie 1 10-03-2005 01:27 PM
trying to use Darwin Ports, editing the etc/profile file fyr3 Linux - Newbie 3 09-22-2005 10:41 AM
editing profile.. andox LQ Suggestions & Feedback 2 07-05-2003 07:50 PM
Editing path permanently...but I don't have .bashrc or .profile shock_ez Linux - Newbie 6 07-02-2003 06:16 PM
About Editing the User Profile emmanuelmathew LQ Suggestions & Feedback 2 02-06-2003 04:48 PM


All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration