[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Solved] Re: Problem with colors in terminal



On 2017-07-12 11:29 +0200, steve wrote:

> Le 12-07-2017, à 11:05:22 +0200, deloptes a écrit :
>
>>steve wrote:
>>
>>> We see that LS_COLORS is set in xterm but not in xfce4-terminal. I don't
>>> understand why since both should read ~/.bashrc when executed.
>>>
>>> Any ideas?
>>
>>I think .bashrc is read only if you use bash as login shell.

It's the other way around, .bashrc is only read if bash is _not_ a login
shell.  Which is why many people source ~/.bashrc from ~/.bash_profile
(or ~/.bash_login, or ~/.profile) to get the same behavior, no matter if
the are running a login shell or not.

> Trying 'bash --login' gave me colors. xfce4-terminal was treated as a
> non-login interactive shell, and thus was not reading $HOME/.bashrc.

By the comment above, xfce4-terminal should have treated bash as a login
shell, however it does not do this in my experience.  Now I'm confused.

> I also had to change my TERM variable to xterm-color in order to work.

That's something you definitely don't want to do, xterm-color is for
_very_ ancient terminals.  Be prepared for misbehavior in curses
programs.

Is there a reason why you are deviating from the default
TERM=xterm-256color in xfce4-terminal?

Cheers,
       Sven


Reply to: