Jump to content

Photo

Bodhi 4.2.0 - How to change text color of Terminology, please?


  • Please log in to reply
9 replies to this topic

#1 Centauri39

Centauri39

    Member

  • Members
  • 35 posts

Posted 10 July 2017 - 04:21 PM

When I open Terminology, the prompt username@computername :~$ has the same color than the commands and the output.

So it's difficult to find the beginning of the last command.

How can I change the text color of only the prompt, without changing the other ones, please?

 

Note: Yes, I did search for a solution on the web, but there seems to be no guide for this problem.





A big thank you to everyone who contributes to Bodhi Linux


#2 DOOMguy

DOOMguy

    Member

  • Members
  • 166 posts

Posted 10 July 2017 - 08:02 PM

The documentation for terminology can be found in /usr/share/doc/terminology.

 

I haven't messed around with the right click pop up menu, where different themes can be found (they can also be useful as an intro to themes e.g. nyanology or. pikachu


Unsolicited advice for learning linux, that won't cost you anything


#3 Centauri39

Centauri39

    Member

  • Members
  • 35 posts

Posted 10 July 2017 - 08:21 PM

There's no such a file in that folder.

 

I know there are some themes for Terminology, but all I want to change is the prompt color.



#4 The waiter

The waiter

    Module Master

  • Developer
  • 1576 posts
  • LocationBanska Bystrica, Slovakia

Posted 10 July 2017 - 08:52 PM

Hmm, I did not know the answer, so I asked in #e IRC channel where I got the answer it is a matter of the current shell, not the Terminology. So the info source

https://www.cybercit...-linux-or-unix/

To set a red color prompt, type the following command:
$ export PS1="\e[0;31m[\u@\h \W]\$ \e[m "

Enjoy :)

#5 Centauri39

Centauri39

    Member

  • Members
  • 35 posts

Posted 11 July 2017 - 12:56 AM

After playing a few hours with the code, I ended up with that by adding these two lines to the end of the .bash.rc of my personal folder.

screenfetch | lolcat
#export PS1="\n\e[1;33m\u\e[m\e[0;31m@\e[m\e[1;32m\h:\e[m\e[1;34m\w\$ \e[m "
export PS1="\n\e[1;33m\u\e[m@\e[0;31m\h: \e[1;32m\w\e[m\e[1;34m\$ \e[m "

As you can see, I also installed screenfetch and lolcat to my system.

The 1st one is to get me some hardware data and the 2nd one to have some color in the screenfetch section of my terminology.

 

EDIT:

Now, the 3rd line is a fixed version of the 2nd one.



#6 Centauri39

Centauri39

    Member

  • Members
  • 35 posts

Posted 11 July 2017 - 08:16 AM

I just used Terminology again, but now, when I go up in the history, the prompt is disappearing.

Is there anybody with an idea were I might have gone wrong?

 

EDIT:

Problem solved!

See my previous post.

 

EDIT2:

Sorry, it is not solved.

When I go back in the history of Terminology using the "arrow up"-key, all the previous commands are displayed, but later on the way up, the prompt is still disappearing.

 

My current code is now:

export PS1="\n\e[0;32m\u@\h:\w\$\e[m "

Why does it happen, please?



#7 The waiter

The waiter

    Module Master

  • Developer
  • 1576 posts
  • LocationBanska Bystrica, Slovakia

Posted 11 July 2017 - 10:58 AM

I will give it a try when I get home in the evening...



#8 The waiter

The waiter

    Module Master

  • Developer
  • 1576 posts
  • LocationBanska Bystrica, Slovakia

Posted 11 July 2017 - 07:15 PM

OK

 

Maybe this will help you. 

Let's suppose your .bashrc file is not empty and has got some default settings. Try to find this line and uncomment it:

#force_color_prompt=yes

 

That should be all you need to do.

 
If you have not that line let me know. We will try add some script inside
 
Good luck :)
 
BTW: I like this colored prompt. Good idea, thx... :D
 
EDIT: to be complete this is that script if missing:


#9 Charles@Bodhi

Charles@Bodhi

    Old Faithful

  • Moderators
  • 4515 posts
  • LocationZeist, The Netherlands

Posted 11 July 2017 - 08:45 PM

Without changing anything except removing the # in front of #force_color_prompt=yes I got a nice bright green prompt. No extra scripting needed unless you want a different color. This ubuntu-page has some easy color info.

 

I have not tested my history yet to see how sticky this behavior is.

 

Enjoy,

Charles



#10 Centauri39

Centauri39

    Member

  • Members
  • 35 posts

Posted 13 July 2017 - 07:11 PM

Sorry, for my late response, I've been busy on something else.

 

I had to reinstall the entire Bodhi.

Now, I set up .bashrc the way you told me above.

I've also chosen the marble wallpaper.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users