LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 10-26-2003, 08:48 PM   #1
dhrivnak
Member
 
Registered: Oct 2003
Location: USA
Distribution: Slackware 9.1
Posts: 50

Rep: Reputation: 15
Exclamation Easy help needed from someone who knows something...


I got a problem that is probably really easy to solve:

I made .bashrc files for my root and user for aliases, but I can't get them to work (unless I do a "source .bashrc" each time after I turn on the computer). Any way to initialize them during startup? I tried adding the following to the /etc/rc.d/rc.S script:
Code:
#initializes .bashrc files:
source /root/.bashrc
source /home/dan/.bashrc
Any ideas?
 
Old 10-26-2003, 09:23 PM   #2
DarknessX
Member
 
Registered: Jun 2003
Location: New Jersey, USA
Distribution: Slackware & Debian
Posts: 37

Rep: Reputation: 15
are you sure you're running bash?

.bashrc won't do a whole lot of good if you're running tcsh for example.
Try loading up a shell, and typing 'bash' and seeing if your aliases work.

If they do, edit /etc/passwd and change the last option (should be a path to a shell) to /bin/bash for your user and root.

If that doesn't work, someone on a higher linux plateau is needed.
 
Old 10-26-2003, 09:24 PM   #3
tgflynn
Member
 
Registered: Oct 2003
Location: Rochester, New York (USA)
Distribution: Debian
Posts: 119

Rep: Reputation: 15
The rc script you wrote will have no effect whatsoever. The initialization files need to be read when a shell is started. The rc scripts are executed in an entirely different context.

Try creating files named .bash_profile which contain the following lines in the users' home directories (or add these lines if the files already exist) :

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

Tim
 
Old 10-26-2003, 09:55 PM   #4
DarknessX
Member
 
Registered: Jun 2003
Location: New Jersey, USA
Distribution: Slackware & Debian
Posts: 37

Rep: Reputation: 15
like Tim/tgflynn.
 
Old 10-26-2003, 11:27 PM   #5
dhrivnak
Member
 
Registered: Oct 2003
Location: USA
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by tgflynn
The rc script you wrote will have no effect whatsoever. The initialization files need to be read when a shell is started. The rc scripts are executed in an entirely different context.

Try creating files named .bash_profile which contain the following lines in the users' home directories (or add these lines if the files already exist) :

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

Tim
Thanks a LOT! It worked. I was using bash, but didn't have the .bash_profile files...
 
  


Reply



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
easy connect not easy in suse greg collins Linux - Newbie 11 03-30-2006 07:31 PM
Easy urpmi ,no easy send mail. akihandyman Linux - General 2 12-27-2004 02:15 PM
Linux4RegularGuys - EASY FTP setup using vsftpd - READ THIS FOR EASY HELP DropHit Linux - Networking 4 11-25-2004 02:44 PM
Too easy... tyccea Linux - General 4 10-22-2003 05:13 AM
Is there a easy way? whaase Slackware 3 11-09-2002 01:07 AM

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

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