Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 11-21-2003, 09:26 AM   #1
Registered: Aug 2003
Location: Castricum, The Netherlands
Distribution: Debian
Posts: 49

Rep: Reputation: 15

hullo everyone..

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


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..

Old 11-21-2003, 10:32 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 259Reputation: 259Reputation: 259
Create a .bashrc file or edit the existing one in your users home directory.
Old 11-21-2003, 10:45 AM   #3
LQ Guru
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 60
# Celeron 850 tinwhistle .bashrc file for user fancy
# User specific aliases and functions

# Change bash prompt. See the article:
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
Old 11-21-2003, 11:30 AM   #4
Registered: Nov 2003
Location: Italy: 44 42' N - 12 11' E
Distribution: Slackware, what else?!!
Posts: 63

Rep: Reputation: 15
From Bash reference manual

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.

Hope this can help you,
sorry for my english.
Old 11-21-2003, 11:44 AM   #5
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Just put konsole --ls in your konsole shorcut command line
Old 08-01-2004, 09:29 AM   #6
Registered: Aug 2003
Location: Castricum, The Netherlands
Distribution: Debian
Posts: 49

Original Poster
Rep: Reputation: 15
Sorry for not replying,

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).
Old 08-01-2004, 09:42 AM   #7
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Originally posted by BSlack
From Bash reference manual
wrong link..........

besides a better one is this...........


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
$LINENO can't be modified in bash 3.0, while it can be in bash 2.05b Darwish Linux - Software 1 11-07-2005 03:57 PM
bash my little bash alaios Linux - Newbie 4 01-11-2005 12:59 AM
bash + html + javascript or just bash ? rblampain Programming 4 12-01-2004 08:53 AM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 07:42 PM
Bash Half_Elf Linux - General 2 05-01-2002 07:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration