SCIENTIFIC-LINUX-USERS Archives

November 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Chris Stevens <[log in to unmask]>
Reply To:
Chris Stevens <[log in to unmask]>
Date:
Thu, 29 Nov 2007 16:12:41 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (52 lines)
James Harrison wrote:
> On Thu, 2007-11-29 at 14:39 -0300, Pedro Ferreira wrote:
>   
>> I have done something wrong with a bashrc file. I added a line at the
>> end of the file:
>> export PATH=/home/.../:$ PATH
>>
>> and apparently that worked fine, I could run that application from
>> everywhere. But when I logged out and tryed to log in again, I
>> couldn't. There was that "less than 10 seconds session" warning.
>> Anybody knows how I should modify  the file and which file should I
>> modify? Someone told me to modify the ".bashrc" file, but that does
>> not exis on my pc.
>>
>> Thanks,
>>             Pedro Ferreira.
>>
>>
>>     
>
>
>
> I'm not understanding how your situation is possible. How did you modify
> the .bashrc file to edit your $path if you don't have a .bashrc file?
>
> The command shown above shouldn't work as typed; it does pre-pend to
> $path it prepends to $ and then has the word PATH in there. Is that just
> a typo?
>
> James
>
>   

Was the bashrc file that you modifed the global /etc/bashrc file (no 
dot)? Or a home user /home/username/.bashrc (with dot)?  If you messed 
up the global /etc/bashrc, then that would affect every login.  If you 
can't login with root, then use the rescue disk, mount the partitions 
and undo what you did.

As far as the path is concerned, you usually want to put the new path at 
the end, unless you know that you want it differently.  You want the 
system to first search the standard paths for a typed command and then 
check your additional directories last.  Otherwise, if you happen to 
accidentally name a custom program that matches a standard system 
command, you just disabled access to that system command unless you 
specify the full path name to the system command.   See this link for an 
example of the syntax.

http://www.linuxheadquarters.com/howto/basic/path.shtml

Chris

ATOM RSS1 RSS2