You are Here:
Install Updates Gimp Error - see Security & Bug Fixes Section Sticky



[ SOLVED ] How to change the color of user@host text line of LXTerminal?

Author (Read 2203 times)

0 Members and 2 Guests are viewing this topic.

 

gabanmaven

  • New to Forums
  • *
  • 2
    Posts
  • Country: id
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 3.8 32bit

  • CPU: Intel Atom Z530

  • MEMORY: 1Gb
Hello, complete newbie here.

I have googled this topic, but everything related to this question was about ubuntu. Being a newbie myself, I tried it on my machine anyways, and of course it didn't work.

I'm using stock terminal (LXTerminal). In the Preferences, the only options are to change font, font size, background color and foreground color. I'd like to change the color of user@host to be something else, so it's easier to differentiate which is command and which is output, especially in a long list. As SU, the user@host color changes to red, so that's awesome. Is it possible to do the same outside SU, say, change the user@host to light blue or something.

Cheers!!

Last Edit: April 20, 2018, 11:56:33 AM by gabanmaven
 


Re: How to change the color of user@host text line of LXTerminal?
« Reply #1 on: April 19, 2018, 12:10:02 PM »
 

trinidad

  • Moderator
  • Platinum Level Poster
  • *****
  • 1006
    Posts
  • Country: us
  • Reputation: 178
  • Linux Lite Member
    • dbts-analytics.com

  • Linux Lite: 4.4 64bit

  • CPU: AMD A8 5500 4 cores

  • MEMORY: 8Gb

  • VIDEO CARD: AMD/ATI Radeon HD 7560D
Try the link below. Make sure the syntax looks like a match to your original before you copy and paste.
http://ezprompt.net/

or read through this link
https://www.howtogeek.com/307701/how-to-customize-and-colorize-your-bash-prompt/

TC

All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.
 

Re: How to change the color of user@host text line of LXTerminal?
« Reply #2 on: April 19, 2018, 06:55:21 PM »
 

GregO

  • Occasional Poster
  • **
  • 51
    Posts
  • Country: us
  • Reputation: 4
  • Linux Lite Member

  • Linux Lite: 3.8 32bit

  • CPU: Intel Core i3

  • MEMORY: 6Gb
https://www.linuxliteos.com/forums/other/colored-bash-prompt-for-linux-lite/

Close .bashrc and save changes and open a terminal.
Last Edit: April 19, 2018, 06:58:57 PM by GregO
We only get one shot at this thing called life, let's make the best of it.
 

Re: How to change the color of user@host text line of LXTerminal?
« Reply #3 on: April 19, 2018, 07:00:11 PM »
 

GregO

  • Occasional Poster
  • **
  • 51
    Posts
  • Country: us
  • Reputation: 4
  • Linux Lite Member

  • Linux Lite: 3.8 32bit

  • CPU: Intel Core i3

  • MEMORY: 6Gb
We only get one shot at this thing called life, let's make the best of it.
 

Re: How to change the color of user@host text line of LXTerminal?
« Reply #4 on: April 20, 2018, 11:55:19 AM »
 

gabanmaven

  • New to Forums
  • *
  • 2
    Posts
  • Country: id
  • Reputation: 0
  • Linux Lite Member

  • Linux Lite: 3.8 32bit

  • CPU: Intel Atom Z530

  • MEMORY: 1Gb
https://www.linuxliteos.com/forums/other/colored-bash-prompt-for-linux-lite/

Close .bashrc and save changes and open a terminal.

Thank you, good Sir!
Worked like magic!  :D
 

Re: How to change the color of user@host text line of LXTerminal?
« Reply #5 on: April 20, 2018, 06:48:56 PM »
 

GregO

  • Occasional Poster
  • **
  • 51
    Posts
  • Country: us
  • Reputation: 4
  • Linux Lite Member

  • Linux Lite: 3.8 32bit

  • CPU: Intel Core i3

  • MEMORY: 6Gb
https://www.linuxliteos.com/forums/other/colored-bash-prompt-for-linux-lite/

Close .bashrc and save changes and open a terminal.

Thank you, good Sir!
Worked like magic!  :D

Glad it worked out for you.

You can also change user@host color in .bashrc where you see the line with PS1 by changing [01;32m\] with one of the others on the list below.

[01;30m\]  Black
[01;31m\]  Red
[01;32m\]  Green
[01;33m\]  Yellow
[01;34m\]  Blue
[01;35m\]  Purple

Replace the 0 with a 4 and it will be underlined.
Last Edit: April 20, 2018, 07:13:58 PM by GregO
We only get one shot at this thing called life, let's make the best of it.
 


 


Install Updates Gimp Error - see Security & Bug Fixes Section Sticky