Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
# .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
# 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.
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..............
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
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.