LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-30-2007, 01:11 AM   #1
m3lkor001
LQ Newbie
 
Registered: Jun 2006
Location: Elk Grove, CA
Distribution: Slackware 12.0
Posts: 27

Rep: Reputation: 15
.bashrc for su problems


got my bashrc working for my normal login but tried to get it to work the same for my su login as well but whenever i login as su at the terminal i get this error but colors end up working right.

Code:
m3lkor001@Linux12:~$ su
Password:
dircolors: no SHELL environment variable, and no shell type option given
Linux12:/home/m3lkor001#
and here is my .bashrc

Code:
# .bashrc

export PS1='\h:\w\$ '
umask 022

# Adding colour discriptions to files and dirs

export LS_OPTIONS='--color=auto'
eval `dircolors`
alias ls='ls $LS_OPTIONS'

# User specific aliases and functions

alias mono='telnet meson.mono.org'

# Makes current directory title of the console

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
using the same bashrc for my normal and su login.

command i used to copy my .bashrc file for su is (as root)


Code:
cp /home/m3lkor001/.bashrc /root

thanks for the help
 
Old 11-30-2007, 08:28 AM   #2
Mr_C
Member
 
Registered: Jan 2004
Location: Trinidad & Tobago
Distribution: Slackware
Posts: 317

Rep: Reputation: 30
ln -s /root/.bashrc /root/.bash_profile

then your su should work without that error message.


Personally I have 'source=~/.aliases' in my .bashrc & .bash_profile (well I linked this to .bashrc) and I put all custom stuff in the ~/.aliases file like http://claytons.googlepages.com/aliases.txt

Last edited by Mr_C; 11-30-2007 at 08:33 AM.
 
  


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
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 10:59 PM
bashrc ovince Programming 1 04-24-2007 02:27 AM
problems with .bashrc mocke Linux - Software 6 05-12-2006 05:41 PM
.bashrc f0rmula Linux - Software 24 12-28-2003 09:43 PM
Where is .bashrc? Luantum Slackware 3 12-01-2003 12:29 AM

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

All times are GMT -5. The time now is 12:01 AM.

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