LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-24-2005, 03:59 PM   #1
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
KDE 3.4 - Konsole doesn't read ~/.bashrc


I just compiled and installed kdelibs and kdebase 3.4.0.
When I start a Konsole or xterm, my ~/.bashrc is not being read. I worked fine under KDE 3.2.
Ideas anyone?
 
Old 04-24-2005, 05:07 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Try this one, it seems to work fine with kde 3.4
Code:
# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/profile ]; then
        . /etc/profile
fi
You have to have a .bash_profile thats similar to below,

Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME

Last edited by reddazz; 04-24-2005 at 05:09 PM.
 
Old 04-24-2005, 05:18 PM   #3
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Original Poster
Rep: Reputation: 31
Quote:
Try this one, it seems to work fine with kde 3.4

code:

# .bashrc

# User specific aliases and functions

# Source global definitions
if [ -f /etc/profile ]; then
. /etc/profile
fi



You have to have a .bash_profile thats similar to below,
Shouldn't /etc/profile be loaded in ~/.profile ? (or .bash_profile)


I didn't yet try the examples you've given, but the problem seems that the shell doesn't load .bashrc . No matter what is in it.
If I put a test in it like: echo 'test' , the test is not displayed when I open Konsole.
 
Old 04-24-2005, 06:40 PM   #4
freakyg
Member
 
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
Quote:
Originally posted by merchtemeagle
Shouldn't /etc/profile be loaded in ~/.profile ? (or .bash_profile)


I didn't yet try the examples you've given, but the problem seems that the shell doesn't load .bashrc . No matter what is in it.
If I put a test in it like: echo 'test' , the test is not displayed when I open Konsole.
/etc/profile is for global (system wide) configuration..............

while--- ~/home/<user>/.bash_profile
~/root/.bash_profile

is for personal configuration by root or users......

here is another example...........
Code:
# ~/.bash_profile: executed by bash(1) for login shells.
# I keep this file simple and put everything in ~/.bashrc

# Sets the default permissions for files. 755 for directories and 644 for files.
umask 022

# include the configurations from ~/.bashrc 
if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

export PATH=$PATH:/usr/X11R6/bin  
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig 
export PATH=$PATH:/opt/kde/bin

Last edited by freakyg; 04-24-2005 at 06:44 PM.
 
Old 04-24-2005, 11:48 PM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Bash reads .bash* files first before .profile, so creating a .bashrc and .bash_profile will stop bash from reading the .profile. Our .bashrc is reading global config from /etc/profile, so a .profile doesn't matter because it does a similar thing to .bash_profile. My explanation is not very good, but hopefully you get the gist of what I am trying to put across to you.

Last edited by reddazz; 04-24-2005 at 11:50 PM.
 
Old 04-25-2005, 04:17 AM   #6
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
My .bash_profile is a symlink to .bashrc, where I put all the important stuff. Also, why the need to read stuff in from /etc/profile? /etc/profile should already have exported the crucial system-wide stuff that any subshells need.
 
Old 04-25-2005, 05:42 AM   #7
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Thats why I said my explanation is not very good. If you can put it in better terms you are welcome. Anyway to correct myself, the .bashrc in the example I gave, is just checking to see if /etc/profile exists.

Last edited by reddazz; 04-25-2005 at 05:49 AM.
 
Old 04-27-2005, 12:01 PM   #8
bigfez
LQ Newbie
 
Registered: Mar 2005
Posts: 29

Rep: Reputation: 15
I've encountered the same problem. After upgrading to kde 3.4 konsole (bash) does not seem to source the /etc/profile or ~/.bashrc anymore. I have placed a symlink from /etc/bashrc to /etc/profile just to see if that works. I have the exact same /etc/profile ~/.bashrc ~/.bash_profile that I had before upgrade, and they work fine after being sourced. I'm just tired of typing
Code:
source /etc/profile
source ~/.bashrc
every time i open a shell.

Anyone have any ideas what's up with this?

Last edited by bigfez; 04-27-2005 at 12:03 PM.
 
  


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
Slack 9.1 won't read /etc/bashrc GATTACA Slackware 18 11-15-2004 10:23 AM
hard to read font colors on the konsole Twotone Linux - Newbie 1 09-08-2004 12:40 PM
bashrc not read by root, can't open display SerfurJ Slackware 6 12-05-2003 10:54 PM
Is konsole different under KDE 3.1 Baran Linux - Newbie 5 10-06-2003 04:40 PM
KDE Konsole Krappy Linux - Software 5 10-14-2002 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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