LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-23-2009, 02:32 PM   #1
Storken
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 0
PATH environment variable


First of all: hi, everyone!
Now to my problem:

Whenever I try to run pcsx, it outputs
Quote:
The command could not be located because '/usr/games' is not included in the PATH environment variable.
As far as i know, it is in the PATH environment variable.
Quote:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Then what else could be the cause for that issue?
I'm using Ubuntu Karmic, if that helps.

edit: needless to say, running it from the menu doesn't help aswell.
 
Old 12-23-2009, 02:36 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
The path line you posted seems to be a cut and paste of where you set the path. Did you check that your path has not been changed? Eg, try

Code:
pcsx
echo $PATH
Evo2.
 
Old 12-23-2009, 02:36 PM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
What's the output from
Code:
pcsx
env | grep PATH
 
Old 12-23-2009, 02:37 PM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
When you type:

Code:
echo $PATH
What do you get?

Try typing:

Code:
export PATH=$PATH:/usr/games
echo $PATH
Then try running it, post up results.
 
Old 12-23-2009, 02:39 PM   #5
conconga
LQ Newbie
 
Registered: Dec 2009
Posts: 22

Rep: Reputation: 1
Does the application has rights to be executed? When you give "ls -l" you should get a "x" permission for your user/group.
 
Old 12-23-2009, 02:43 PM   #6
Storken
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Strange. What I pasted into the first post was the PATH variable located in /etc/environment.


Code:
export PATH=$PATH:/usr/games
seems to have fixed it,
Code:
env | grep PATH
now ouputs
Code:
PATH=/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/games
Which "other" path does it address?
Anyhow, thanks for the rapid responses

edit: it does run from a Terminal now, but still not if executed from a menu...

Last edited by Storken; 12-23-2009 at 02:45 PM.
 
Old 12-23-2009, 02:59 PM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Any number of different login scripts may be setting/resetting your path. Eg .bash_profile .bashrc etc.


Evo2.
 
Old 12-23-2009, 05:48 PM   #8
elsheepo
Member
 
Registered: Feb 2008
Location: Los Angeles
Distribution: Slackware-current
Posts: 86

Rep: Reputation: 19
Remember storken, exporting your path variable dose not make your PATH persistent acrost reboots, in order to do this, you must edit your ~/.bashrc or its equivlent if using a nonlogin shell, if using a login shell you must edit the /etc/profile file.
 
  


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
[SOLVED] How to add an environment variable to the PATH? ggyyree Linux - Newbie 4 11-20-2009 12:49 PM
PATH environment variable moonz Red Hat 3 09-08-2005 04:10 PM
changing path environment variable iNET_boss Linux - Newbie 2 07-27-2005 04:35 PM
Modifying the PATH environment variable brunnopessoa Linux - Newbie 11 11-03-2004 10:23 PM
how do I edit the $PATH environment variable in RH7.3 needamiracle Linux - Software 3 07-02-2002 09:19 PM

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

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