4

I was looking into the possibilities of changing the foreground and background colours in command-only-mode, which I understand uses tty1

I tried changing the colours in my .bashrc file, which are applied when I login, but when I then run a command like ls, top, man or vi etc, all either appear to have their own colour scheme or get their colours from some system wide defaults and when I exit the command and control returns to the command line/shell, the colours I set are overridden by the command that I just exited.

I am looking for a way to permanently and consistently set the colour scheme somewhere, preferably in one place which can be applied to all shells, commands and TTY's etc.

So isn't there some kinda gismo laying round some place that can do that? and if not why not ;)

  • 1
    I would start with terminfo to define the schema. Most CLI tools should use this souce, too. see http://man7.org/linux/man-pages/man5/terminfo.5.html – LupusE Nov 20 '19 at 20:54
  • 1
    That would be a tricky one - the programs you mentioned (ls, top, man, vi) do all support color schemes, but each program has its own way of determining which color to put where. The closest you might be able to get is to convince your system that black is white, white is black, blue is yellow, etc. I feel your pain, but the best solution is usually to manually create a color scheme for each program and store the config files somewhere permanent to reapply if you need to on a different system or installation. Some of them are easy to do, some are hard. Good luck! – izzy Nov 20 '19 at 20:58
  • Thanks for the useful comments, I was worried that someone was going to say that. So basically, it appears there is no system-wide method of achieving this and any solution would be a workaround and a lot of complicated hard work to merely change your colour scheme and so it doesn't appear to be worth the time and the effort. It would be neat if there was a single css file that all of the TTY's and commands took their colour scheme from and if I was going to put in the effort then I would make it as simple and as practical as it could be, that's how I would do it. –  Nov 21 '19 at 12:16

1 Answers1

0

Maybe this is what you are looking for: https://askubuntu.com/a/153493/1010453 I know u stated that you tried writing them into bashrc but for me it does work even if I use ls.

  • Thanks for the answer, but been there, tried that already and that's the reason I posted this question. What I was looking for is a solution to set the colour scheme system system wide using a single CSS file, like what ubuntu.css/gnome-Shell.css does for the Ubuntu/Gnome GUI colour scheme. –  Nov 26 '19 at 16:31