Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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've just installed gentoo on my laptop, installation went fine and my kde works great.... except for Konsole (the terminal emulator)!
Actually it works fine, but the prompt looks like
bash-{version}$
instead of
[{username}@{hostname} {directory}]$
In the normal (non-graphical) console this is the case, so that works fine. Also I get the thing rigth once i've run
source /etc/profile
Does anyone know how i can change these settings?
I'm getting a bit tired of source /etc/profile 'ing every Konsole session i start..
If any of you can help me that would be the best..
# Celeron 850 tinwhistle .bashrc file for user fancy
# User specific aliases and functions
# Change bash prompt. See the article:
# http://www-106.ibm.com/developerwork.../l-tip-prompt/
export PS1='\d \@ \[\e[32;1m\]\u\[\e[34;1m\]@\[\e[36;1m\]\H \[\e[34;1m\]\w\[\e[32;1m\]$ \[\e[0m\]'
# For the root account use this
# export PS1='\d \@ \[\e[31;1m\]\u\[\e[34;1m\]@\[\e[36;1m\]\H \[\e[34;1m\]\w\[\e[31;1m\] # \[\e[0m\]'
# Set paths
alias path='echo -e ${PATH//:/\\n}'
# Allow local users to use my X session
# xhost +local:
# Dialup, start fetchmail daemon and startx
alias x='/sbin/ifup ppp0;fetchmail -d 300;startx'
# Alter the ls command
alias ls='ls -ac'
alias lls='ls -lac'
# Become system administrator
alias god='su -'
# Connect/disconnect the internet by modem
alias dial='/sbin/ifup ppp0'
alias hangup='/sbin/ifdown ppp0'
# Launch links with my linux links page
alias links='links /home/fancy/bookmarks.html'
# Power down/reboot
alias off='shutdown -h now'
alias boot='shutdown -r now'
# For nano editor because I forget which one I use in which distro
alias pico='nano -w'
alias nano='nano -w'
# for launching window manager/desktop environments from console login
alias a='echo DESKTOP=AfterStep > ~/.desktop;startx'
alias ice='echo DESKTOP=icewm > ~/.desktop;startx'
alias kde='echo DESKTOP=KDE3 > ~/.desktop;startx'
alias wm='echo DESKTOP=WindowMaker > ~/.desktop;startx'
alias sf='echo DESKTOP=Sawfish > ~/.desktop;startx'
alias g='echo DESKTOP=Gnome > ~/.desktop;startx'
alias xf='echo DESKTOP=XFce > ~/.desktop;startx'
alias bb='echo DESKTOP=BlackBox > ~/.desktop;startx'
alias fb='echo DESKTOP=FluxBox > ~/.desktop;startx'
alias e='echo DESKTOP=Enlightenment > ~/.desktop;startx'
# Slideshow of my photo album
alias pix='feh -r -z -F -Z -D /home/fancy/Pictures'
# Script needs to be on the bottom of the file or RH updates will fsck it up
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
Invoked as an interactive login shell, or with '--login'
When Bash is invoked as an interactive login shell, or as a non-interactive shell with the `--login' option, it first reads and executes commands from the file `/etc/profile', if that file exists. After reading that file, it looks for `~/.bash_profile', `~/.bash_login', and `~/.profile', in that order, and reads and executes commands from the first one that exists and is readable. The `--noprofile' option may be used when the shell is started to inhibit this behavior.
When a login shell exits, Bash reads and executes commands from the file `~/.bash_logout', if it exists.
Invoked as an interactive non-login shell
When an interactive shell that is not a login shell is started, Bash reads and executes commands from `~/.bashrc', if that file exists. This may be inhibited by using the `--norc' option. The `--rcfile file' option will force Bash to read and execute commands from file instead of `~/.bashrc'.
So, typically, your `~/.bash_profile' contains the line
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
after (or before) any login-specific initializations.
Maybe Konsole doesn't invoke bash as a login shell.
Terminal emulators like Konsole or gnome-terminal aren't good in my opinion,
XTerm (and clones) gives you better customization.
Personally, I love rxvt.
This was indeed the solution (putting konsole --ls in the shortcut), and it has since your reply be a standard procedure to me.
Thanx alot (all ofyou).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.