User Tools

Site Tools


howto:custom_console

Customising the Console

~~This page replaces what was previously “Make the console have a transparent black background/Konsole Background Settings”, last modified by neil1952~~

Konsole Background Settings

Konsole has a black background in easy mode and a white background in advanced mode. To change it to a black semi-transparent one:

  1. Open the console either with CTRL-ALT-t (easy mode) or from Applications→system→console (advanced mode).
  2. Click Settings→configure console→Schema.
  3. In the schema box, choose 'Transparent dark background'
  4. Check the 'Set as default schema' box
  5. Use ALT-click to drag the dialogue up so you can click 'Apply', then 'OK'.
  6. You may need to close console and reopen it to see the changes.

Changing the default prompt

Here is a very well written guide to changing the default bash prompt: http://www.linuxselfhelp.com/howtos/Bash-Prompt/Bash-Prompt-HOWTO.html#toc6

If thats a bit much, then the following is short guide to make your prompt look like this in yellow: ”/etc/X11 # ”. I.E. displaying just the working directory and a hash. Xandros uses a format similar to this, but eeeXubuntu for example uses something like “username@machinename-workingdirectory-$”, which takes up lots of room on a small screen if the first part never changes!

The following guide should work in any distribution, and set your prompt to yellow “workingdirectory # ”.

  1. First make a backup of your original .bashrc file like so:
    cp ~/.bashrc ~/.bashrc.bak
  2. If you mess up then you can put everything back to normal with
    cp ~/.bashrc.bak ~/.bashrc
  3. Open a terminal and type
    mousepad ~/.bashrc
  4. The parts we want to customise are lines starting with PS1. We want to comment them all out and replace them with something like
    PS1="\[\033[1;33m\]\w #\[\033[0m\] "
  5. In eeeXubuntu I had to make sure the following was commented out with hashes (some already was):
    # set a fancy prompt (non-color, unless we know we "want" color)
    #case "$TERM" in
    #xterm-color)
    #    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    #    ;;
    #*)
    #    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    #    ;;
    #esac
    
    # Comment in the above and uncomment this below for a color prompt
    #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  6. Save your changes and open a new terminal. The prompt should have changed! Well done!
howto/custom_console.txt · Last modified: 2008/05/21 11:15 by richardkemp