Results 1 to 6 of 6

Thread: terminal font coloring questions

  1. #1
    Join Date
    Oct 2010
    Location
    Prague
    Beans
    263
    Distro
    Ubuntu UNR

    terminal font coloring questions

    Ok I want the username and OS specified in the terminal to look something like this

    Code:
    username@ubuntu:~$apt-get moo
    can this be done in xterm or aterm or any other terminal for that matter ?
    Last edited by I'mGeorge; December 1st, 2010 at 07:16 PM.
    Debian rulz but Ubuntu it's alright either

  2. #2
    Join Date
    Feb 2008
    Beans
    5,636

    Re: terminal font coloring questions

    Code:
    PS1="\033[0;31m\u\033[0;34m@\h:\w\$\033[0m"
    export PS1

  3. #3
    Join Date
    Oct 2010
    Location
    Prague
    Beans
    263
    Distro
    Ubuntu UNR

    Re: terminal font coloring questions

    Quote Originally Posted by TeoBigusGeekus View Post
    Code:
    PS1="\033[0;31m\u\033[0;34m@\h:\w\$\033[0m"
    export PS1
    Thx man, now my terminal blends a little bit better into my desktop theme.
    Debian rulz but Ubuntu it's alright either

  4. #4
    Join Date
    May 2009
    Beans
    111

    Re: terminal font coloring questions

    Quote Originally Posted by TeoBigusGeekus View Post
    Code:
    PS1="\033[0;31m\u\033[0;34m@\h:\w\$\033[0m"
    export PS1
    how did you come up with that? for those of us who want to create our own custom string?

    and is that a permanent change or does it default back to normal once restarted?

  5. #5
    Join Date
    Feb 2008
    Beans
    5,636

    Re: terminal font coloring questions

    Quote Originally Posted by 0949er View Post
    how did you come up with that? for those of us who want to create our own custom string?

    and is that a permanent change or does it default back to normal once restarted?
    http://sourceforge.net/projects/linu...2.pdf/download
    Chapter 14

  6. #6
    Join Date
    Oct 2010
    Location
    Prague
    Beans
    263
    Distro
    Ubuntu UNR

    Re: terminal font coloring questions

    Quote Originally Posted by 0949er View Post
    how did you come up with that? for those of us who want to create our own custom string?

    and is that a permanent change or does it default back to normal once restarted?
    Nice manual @TeoBigusGeekus but to answer @0949er in a few words here it goes.
    PS1 it's a shell variable, as I've just found out myself. So if you wanna find more about how you can customize prompt settings that are stored in this variable,and it's parameters follow this link http://www.cyberciti.biz/faq/bash-sh...linux-or-unix/

    If you wanna make the changes permanent edit the file ~/.bashrc from your home folder. Look for something that's pretty much like this

    Code:
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    and replace it with your own, in my case it's what TeoBigusGeekus already gave me

    Code:
    PS1="\033[0;31m\u\033[0;34m@\h:\w\$\033[0m"
    Debian rulz but Ubuntu it's alright either

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •