Slackware shell config help
This is a simple problem but I just can't get my head around with :confused:.
Too stupid Problem is I want to have my interactive shell(kde konsole) to have same 'more-colorful' like in login shell so I put /etc/profile in my .bashrc. And I want login shell has same config as interactive shell. Here's my ~/.bashrc Code:
. /etc/profile #the dilemma line Code:
if [ -f ./.bashrc ]; then I put a diagram for you... Code:
login-shell |
When I had my web site running I had a nice how-to about harmonizing the bash scripts. If anybody is interested in moving that how-to the slackware.docs site, contact me and I'll forward the text.
In the mean time, try this: Code:
# ~/.bash_profile Code:
# ~/.bashrc |
You want Konsole to give you a shell like the one when you log in at boot?
Just change the setting in konsole Settings -> Edit Current Profile Change "Command:" from "/bin/bash" to "/bin/bash -ls" Click Apply The "-ls" on the end of the command tells bash you want to invoke it as if you were logging in and will execute the same scripts giving you the exact same environment. |
Instead of sourcing /etc/profile, just cherry pick what you need in it and copy/paste that in ~/.bashrc. In addition, possibly run only (parts of) the scripts in /etc/profile.d that you need.
|
And Didier is right again.
It's the second time someone has the crazy idea of sourcing /etc/profile form ~/.bashrc By the way. If you don't want the fortune message do this: # chmod -x /etc/profile.d/bsd-games-login-fortune.sh Jaime Sommers Schoolteacher |
It's a Real Good Idea to leave /etc/profile alone; i.e., don't ever edit it (it's system-wide).
For customization, system-wide, you can add files to /etc/profile.d. For personal customization, you can add a ~/.profile file in your home directory and you can add ~/.bashrc file as well. Now, why would you want to do things like that? Well, the sequence when you log in is execute (in this order)
Code:
# Append any additional sh scripts found in /etc/profile.d/: All that happens once at log in and it happens when you open a terminal window as a "log in shell" which is what you typically want -- you get all the environment settings, aliases you like and all that sort of thing. Hope this helps some. |
Member Response
Hi,
I like to provide my users with this; Quote:
Hope this helps! |
Just for fun
Just for fun and off topic. This is my bash prompt.
Code:
function bg_jobs |
All times are GMT -5. The time now is 10:56 AM. |