LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-26-2007, 07:11 AM   #1
dave811
LQ Newbie
 
Registered: Jan 2007
Distribution: Slackware 11.0
Posts: 5

Rep: Reputation: 0
Path problems


I've just installed Slackware 11.0 and it's my first attempt to seriously replace Windows. I've dabbled in Linux before but I'm a newbie.

This is baffling me. I can start X as root using the startx command but if I su to another user it tells me "Command not found". Then if I su back to root it gives me the same error even though it worked before changing users.

/etc/profile contains:

PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"

but when I type "echo $path" it just returns a blank line.

Am I missing something obvious here?
 
Old 01-26-2007, 07:52 AM   #2
KleB
Member
 
Registered: Jan 2006
Location: Slovenia
Distribution: Slackware, Gentoo
Posts: 97

Rep: Reputation: 15
It's because su starts another instance of bash. And it does _not_ run your profile. If you want to read the profile, I think that command "su -" does the job.
 
Old 01-26-2007, 07:56 AM   #3
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Instead of "echo $path"
try
"echo $PATH" instead.
Hope that helps some. Really shouldn't be starting X as root though ;]
 
Old 01-26-2007, 10:42 AM   #4
dunric
Member
 
Registered: Jul 2004
Distribution: Void Linux, former Slackware
Posts: 498

Rep: Reputation: 100Reputation: 100
Quote:
Originally Posted by lord-fu
Instead of "echo $path"
try
"echo $PATH" instead.
Hope that helps some. Really shouldn't be starting X as root though ;]
Because it's run with suid root privileges anyhow
 
Old 01-26-2007, 11:32 AM   #5
dave811
LQ Newbie
 
Registered: Jan 2007
Distribution: Slackware 11.0
Posts: 5

Original Poster
Rep: Reputation: 0
I'm not really sure what was wrong but deleting and readding the user account fixed the problem.

Thanks for the su - user tip, I had no idea it didn't load your profile.
 
Old 01-26-2007, 07:07 PM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
And remember ... Linux is case-sensitive ... unlike some other OSs.
 
  


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
Problems with PATH and wine ch4s3r Linux - Software 2 11-11-2003 05:16 PM
Some problems regarding path and X Peppe Linux - Newbie 1 10-23-2003 01:20 PM
PATH problems.. please help n3wb1e Linux - Newbie 4 10-17-2003 10:15 PM
Full Path problems chedmaster Linux - Newbie 1 06-26-2003 10:24 AM
Problems with $PATH hagbardc Linux - General 2 04-22-2003 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:02 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
Open Source Consulting | Domain Registration