LinuxQuestions.org
Help answer threads with 0 replies.
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 09-06-2004, 08:58 AM   #1
Alfexy
LQ Newbie
 
Registered: Sep 2004
Location: germany
Distribution: slackware
Posts: 8

Rep: Reputation: 0
Angry created ~/.bashrc doesn't work


Hi,
I use Slackware 9.1 and discovered that I have no .bashrc in my home folder. I searched in the forum for this problem and everybody said simply to create a new: but it does't work!

when I login or start a new terminal it doesn't run the script (change color, export etc.)
I tried with and without to set it as executable (chmod +x)...

and does anybody know where to add scripts which only run one time when I start linux. Like bashrc but global.

Thank you and linuxquestions.org
 
Old 09-06-2004, 09:06 AM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there...

typing "bash" will make the trick.
probably your default shell is not bash : you can check that with finger
you need to change it : /etc/passwd
in the line that contains the user ,
change /bin/whatever to /bin/bash

cheers

slackie1000
 
Old 09-06-2004, 09:32 AM   #3
Alfexy
LQ Newbie
 
Registered: Sep 2004
Location: germany
Distribution: slackware
Posts: 8

Original Poster
Rep: Reputation: 0
thank you slackie1000
when I type bash the the script works!
but not when i log in normally. In /etc/passwd all users are set to /bin/bash.
when I start root the command line is like this:
root@xar600:~#
other users are:
bash-2.05b$

In other users it works but not in root!!
 
Old 09-06-2004, 09:50 AM   #4
usercsr
Member
 
Registered: Sep 2003
Location: Little Rock, Arkansas
Distribution: Slackware-Current
Posts: 129

Rep: Reputation: 15
What terminal are you using? If you are using gnome-terminal, then to to the second tab in prefenrences ('Title and Command') and check the 'Run command as login shell' option.
 
Old 09-06-2004, 10:19 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
For Slackware and for the generic default .bash_profile settings do this:

As the user in your home directory:

cat /etc/bash_profile > .bashrc > .bash_profile

This will copy the default bash_profile in /etc to your home directory for users own settings. Then just edit the file how you want it.
 
Old 09-06-2004, 10:20 AM   #6
mirradric
Member
 
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188

Rep: Reputation: 31
Are you logging in from console? If it is so, you are starting a login shell and .basrc is not executed. You need to use .profile or .bash_profile for login shells.
 
Old 09-06-2004, 10:34 AM   #7
Alfexy
LQ Newbie
 
Registered: Sep 2004
Location: germany
Distribution: slackware
Posts: 8

Original Poster
Rep: Reputation: 0
Great Thanks To all!!!

Thanks 2 all!

I'll try to what you say, but this won't be my last question....

Alfexy.
 
Old 09-06-2004, 01:58 PM   #8
Nikon01
Member
 
Registered: Jul 2003
Distribution: Slackware 10.0
Posts: 196

Rep: Reputation: 30
Well if the above stuff doesn't work you can always slap all your stuff in one .sh file in /etc/profile.d/ and chmod +x it. It will run on startup and you can still set different stuff for different users like the PS1 thing.
 
  


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
bashrc Aliases don't work soren625 Linux - Newbie 10 01-27-2005 08:59 AM
~/.bashrc doesn't work Kristian2 Slackware 6 05-19-2004 04:12 AM
.bashrc ? Longinus Linux - Newbie 2 03-27-2004 11:50 AM
.bashrc roofy Slackware 7 05-06-2003 01:32 PM
.bashrc prasad Linux - General 1 04-14-2001 09:51 AM

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

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