LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-05-2005, 09:44 PM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
.bashrc not being sourced


I have this alias in my /root/.bashrc file
alias ssh='ssh 192.168.1.103'
it only seems to be sourced when I am logged into kde and use a konsole. When I try to use it in textmode(no gui) it does not seem to be sourced.

example when I type the command "ssh" in konsole it does the command "ssh 192.168.1.103"

when I type the commad "ssh" in textmode it tells me the error that I need more parameters(like an ip address). It seems that the alias is not being sourced. Why?
 
Old 01-05-2005, 10:07 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Do you have a .bash_profile?

What usually happens is .bash_profile is for text mode ( login shells ) and .bashrc is used for X consoles ( non-login shells ).

You'll probably find a commented out bit in .bash_profile like

# include .bashrc if it exists
#if [ -f ~/.bashrc ]; then
# source ~/.bashrc
#fi

Which allows you to use .bashrc in text mode as well. Its partly a security thing. and sometimes you want a diffrent set of options depending on text vs X.

Last edited by leonscape; 01-05-2005 at 10:09 PM.
 
  


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
where is bashrc ? Kanaflloric Slackware 12 10-06-2007 02:47 PM
.bashrc help shanenin Linux - Software 4 02-14-2004 06:17 PM
.bashrc not sourced koyi Slackware 4 08-02-2003 10:00 AM
bashrc nobu Slackware 6 03-21-2003 10:53 AM
.bashrc prasad Linux - General 1 04-14-2001 09:51 AM


All times are GMT -5. The time now is 09:14 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration