-5

I am booting my pi as text with autologin.

Even after modifying the bashrc file in the /home/pi folder, I still see the text in white. I know that the color is enabled, because during the boot, I see the OK in green, so the terminal seems enabled for color, but nothing show up when I run ls -la or other commands.

What am I missing? I did enable force_color_prompt=yes in bashrc; and uncommented the lines where the aliases include the --color=autol but still nothing happen.

closed as off-topic by Milliways, goldilocks Jun 17 at 17:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – goldilocks
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Does this answer help? unix.stackexchange.com/questions/261427/… – tlfong01 Jun 17 at 7:24
  • 1
    what response does echo $TERM get you? – Jasen Jun 17 at 8:33
  • your question has nothing to do with the RPi ... it is a Linux question .... research debian linux terminal colors – jsotola Jun 17 at 13:21
  • @jsotola please point me to where I said that this was a RPI issue. Please take time to read a question, if you are going to reply. – rataplan Jun 17 at 16:50
  • 1
    there's probalby more skill to address this problem in the "unix and linux" stack exchange as the TERM variable is common to all of that. it supposed to be automatically set , but I am not sure how that is meant to happen. – Jasen Jun 17 at 21:24
2

The terminal emulation also plays a role with colors on the text console. I just don't know how it is set by default because I set it always to linux. You can get your setting with:

rpi ~$ echo $TERM

Try to set it in ~/.profile as first command:

TERM=linux

then logout/logon and look if it helps.

  • Thanks, I will try this out today. As now the $TERM variable is empty – rataplan Jun 17 at 17:28
  • Hi @Jasen, you tried to add ´export TERM` to the answer. Sorry, but I haven't accepted it because it is not needed. ~/.profile is a login file similar to ~/.bashrc. It is sourced to the calling bash so there is no need to export environment variables when set in ~/.profile. – Ingo Jun 17 at 21:26
  • @rataplan, Just now I did the following: (1) login to GUI DeskTpo, (2) switch to text terminal <ctrl-alt-F1>, (3) ls -la and saw a colourful list. imgur.com/gallery/dn18IJB Does it mean my config (rpi3B=, stretch 9) can do what your config cannot do? – tlfong01 Jun 18 at 3:36
  • @rataplan, I also booted to CLI, and found "$ ls -la" colourful. "$ who" replied "pi tty1, ..." tlfong01 2019jun18hkt1559 – tlfong01 Jun 18 at 8:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.