SlackwareThis Forum is for the discussion of Slackware Linux.
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.
You just need to put that command somewhere that will be read when you open a terminal - ~/.bashrc whould do it.
Thanks! Worked great
Also. Any idea how to make the terminal use the classic linux colours? I mean show the directories in green just like in the original console... so you know witch is a directory, witch is a file, etc...... In Gnome-terminal there was an option but in xfce terminal nothing like that at all.
EDIT: found it... "run command as login shell". Nice colours now :>
I'm having trouble customizing my terminal in Slackware 12. I've copied my .bashrc from my Kubuntu installation to my home directory, and my /root/ directory. However, neither my custom prompt nor my aliases are activated upon login. I've checked the file's permissions and done a quick google search, but didn't find anything useful. What could be going wrong?
spiffytech, do you have also .bash_profile or .profile on your home dir? If not, Try making a ~/.profile file with the following content:
# Begin ~/.profile
if [ -f "$HOME/.bashrc" ] ; then
source $HOME/.bashrc
fi
# End ~/.profile
"If there is a ~/.bashrc file then source it" . When you are inside an interactive login shell, e.g. tty1-6 by default .bashrc is not sourced, but you can override it doing this.
Last edited by icmp_request; 07-07-2007 at 08:10 PM.
odin:~# cat .bashrc
#.bashrc
#08-30-06 12:20 gws copied loki:/root
# Add bin to path
export PATH="$PATH:$HOME/bin"
# Dynamic resizing
shopt -s checkwinsize
# Custom prompt
#PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#08-29-06 11:40 gws
if [ `id -un` = root ]; then
PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
else
PS1='\[\033[1;32m\]\h:\w\$\[\033[0m\] '
fi
#
# Add color
eval `dircolors -b`
# User defined aliases
alias cls='clear'
alias clls='clear; ls'
alias ll='ls -l'
alias lsa='ls -A'
alias lsg='ls | grep'
alias lsp='ls -1 /var/log/packages/ > package-list'
alias na='nano'
alias web='links -g -download-dir ~/ www.google.com'
#08-29-06 11:50 gws
#To clean up and cover your tracks once you log off
#Depending on your version of BASH, you might have to use
# the other form of this command
trap "rm -f ~$LOGNAME/.bash_history" 0
#The older KSH-style form
# trap 0 rm -f ~$LOGNAME/.bash_history
A sample of .bash_profile;
Code:
odin:~# cat .bash_profile
# .bash_profile
#08-30-06 12:21 gws copied loki:/root
# Source .bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
A user .bashrc;
Code:
odin:~# cat /home/gws/.bashrc
#.bashrc
#08-30-06 12:17 gws copied loki:/home/gws
# Add bin to path
export PATH="$PATH:$HOME/bin"
# Dynamic resizing
shopt -s checkwinsize
# Custom prompt
#
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#08-29-06 11:40 gws
#if [ `id -un` = root ]; then
# PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] '
# else
# PS1='\[\033[1;32m\]\h:\w\$\[\033[0m\] '
#fi
#
# Add color
eval `dircolors -b`
# User defined aliases
alias cls='clear'
alias clls='clear; ls'
alias ll='ls -l'
alias lsa='ls -A'
alias lsg='ls | grep'
alias na='nano'
alias web='links -g -download-dir ~/ www.google.com'
#08-29-06 11:45 gws
#To clean this up and cover your tracks once you log off
#Depending on your version of BASH, you might have to use
# the other form of this command
trap "rm -f ~$LOGNAME/.bash_history" 0
#The older KSH-style form
# trap 0 rm -f ~$LOGNAME/.bash_history
Note the difference in the 'if' for the root test and the user .bashrc is absolute.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.