LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-07-2006, 03:34 PM   #1
goggyturk
LQ Newbie
 
Registered: Oct 2003
Posts: 22

Rep: Reputation: 15
Debian 3.1 $PATH config probs


Hi, sorry to bother you with a basic question like this, but which config files do I change to add to my $PATH entries at logon?

I want to add /usr/lib because I suspect it's screwing up MPlayer compilation, so I added the following, in bold text, to my /etc/profile:

if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/lib:"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/lib:"
fi

When I reboot there's no change - /usr/lib doesn't appear and MPlayer still won't work.

I'm sure some of you can sort this in 2 seconds...
 
Old 09-07-2006, 04:24 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,075
Blog Entries: 14

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
It depends on which shell you're running. By default most Linux users use "bash". Instead of editing /etc/profile try editing /etc/bashrc.

Note also /etc/profile (for ksh) and /etc/bashrc (for bash) are GLOBAL meaning ever user that logs in gets those changes. For individual users you would modify $HOME/.profile or $HOME/.bashrc respectively.

I'm assuming you know how to do "echo $PATH" after login to verify you have the PATH you expect.

/usr/lib by the way is typically for libraries as implied by its name. Binaries should be in /usr/bin, /usr/sbin or similar locations.

Posting the error you're getting when it tries to start may help with diagnosing the problem.
 
Old 09-07-2006, 04:28 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,241
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
check the hidden profile file in your home directory...
~/.profile
Could be your personal profile script is over riding the system profile script..

Quote:
Special Scripts
/etc/profile - Executed when the user logs in
~/.profile - Executed when the user logs in
~/.bashrc - Executed when BASH is launched
~/.bash_logout - Executed when the user logs out


or simple

PATH=${PATH}:/usr/lib

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/lib

Since those scripts get executed at login there is no need to reboot (a 'la windows)..
simply log out and back in if you want to test the profile script changes.
 
Old 09-08-2006, 12:49 PM   #4
goggyturk
LQ Newbie
 
Registered: Oct 2003
Posts: 22

Original Poster
Rep: Reputation: 15
OK, thanks for your help guys. Your suggestions worked, but MPlayer still won't cooperate. I'll post in the software section for that tho'.

Cheers!
 
  


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
Wireless Networking config probs TheAvenger Linux - Wireless Networking 2 06-22-2006 11:37 AM
[Debian]gtk-config was not found in your $PATH eerf Linux - Security 1 01-18-2005 10:26 PM
iptables config probs geniarse Linux - Networking 4 10-28-2004 01:18 PM
Debian XFree86 Config probs dthomson Debian 3 05-10-2004 09:15 AM
Network config probs boltar Linux - Networking 2 06-17-2001 12:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:14 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