You are not logged in.

#1 2016-10-20 19:39:13

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Xfce4-terminal does not apply bash configuration [SOLVED]

At least, it looks like...

Until a few days ago, on all my terminals (graphical and tty) my /etc/bash.bashrc was applied with some aliases, fancy and unnecessary colors, etc...
The I updated xfce4-terminal from 0.6.3-3 to 0.8.0-2, and the config is not applied anymore

- All my ttys are still normal.
- All other graphical terminals are still normal.
- In xfce4-terminal, if I'm sourcing /etc/bash.bashrc, still nothing happens.
- Rolling back to version 0.6.3-3 reverts the behaviour to normal.

By the way, this could be a deliberate change. I've also noticed other changes of the behaviour, like kind of a built-in bash completion...

Could somebody explain to me?

Last edited by scar (2016-10-22 12:42:23)


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#2 2016-10-20 23:01:12

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

In xfce4-terminal configuration, is bash started as a login shell?


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#3 2016-10-21 13:37:27

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

No.
(The option " Settings - General - Run command as login shell " is not checked.)


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#4 2016-10-21 13:41:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

What DE?

Online

#5 2016-10-21 14:50:59

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

The DE is Xfce.
All packages up-to-date, only stable repos.


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#6 2016-10-21 16:11:17

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

Could this be also related to the problem?

I've tried to install a couple of terminal emulators,
and when prompted like:

echo $TERM

All gtk3 based ones answer

xterm-256color

while others (konsole, lxterminal) drop out

xterm

Why is that variable changing?
Can this be related to /etc/bash.bashrc not being sourced?

If you look at the page: http://docs.xfce.org/apps/terminal/preferences

you will find this:

Emulation setting (removed in 0.8.0)
This specifies the terminal emulation. This does not only set the $TERM value, but also the input conversion of the VTE widget. By default this is set to xterm, if changed /etc/termcap will be read to get the emulation values.
If you have an application that needs $TERM for correct functionality, it is better to set this manually in your ~/.bashrc file (or whatever shell you use) and set the terminal emulation as xterm to avoid incorrect characters in the Terminal.

Last edited by scar (2016-10-21 16:18:32)


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#7 2016-10-21 18:22:35

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

scar wrote:

No.
(The option " Settings - General - Run command as login shell " is not checked.)

OK, from man 1 bash:

When bash is invoked as an interactive login shell, or as a  non-interactive  shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.

When  an  interactive  shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists.

and

$ grep /etc/bash\.bashrc /etc/profile
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc

Since you chose to put your settings into /etc/bash.bashrc, it seems that unless bash is a login shell, it won't source /etc/bash.bashrc. Try putting your settings in ~/.bashrc...


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#8 2016-10-22 12:42:04

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

My bad.

Interestingly I've fixed it by putting

export TERM="xterm"

at the beginning of /etc/bash.bashrc

have more than one user here, same bashrc for everyone...

Problem solved.
Reason still unknown.


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#9 2016-10-22 20:39:09

cmsigler
Member
Registered: 2013-11-18
Posts: 35

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

Hi,

Upon updating to xfce4-terminal 0.8.0-2 I lost my color prompt, too.  Very unsettling.  What a delicate snowflake I am.... :^\

scar wrote:

Interestingly I've fixed it by putting

export TERM="xterm"

at the beginning of /etc/bash.bashrc

Confirmed.  This "magically" fixes the problem.  $TERM was originally "xterm-256color"

Clemmitt

Offline

#10 2016-10-24 10:20:52

zivziv
Member
From: Florida, USA
Registered: 2010-02-05
Posts: 49
Website

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

Leonid.I wrote:
scar wrote:

No.
(The option " Settings - General - Run command as login shell " is not checked.)

OK, from man 1 bash:

When bash is invoked as an interactive login shell, or as a  non-interactive  shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.

When  an  interactive  shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists.

and

$ grep /etc/bash\.bashrc /etc/profile
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc

Since you chose to put your settings into /etc/bash.bashrc, it seems that unless bash is a login shell, it won't source /etc/bash.bashrc. Try putting your settings in ~/.bashrc...

vte3 (gtk3 version) is no longer respecting TERM variable value; instead, it forces it to be 'xterm-256color'. This is why emulation setting has been removed from xfce4-terminal configuration.

Could you please tell what exactly didn't work for you with the default TERM value and started working after changing it to 'xterm'?
Have you tried another vte3-based terminal (e.g. gnome-terminal) - is their behavior the same as xfce4-terminal's?

Offline

#11 2016-11-05 17:20:27

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

This will be quick...

All vte3 based terminal emulators showed the same weird behaviour.
By weird behaviour I mean they don't apply anything from my system-wide bash configuration. (I.e.: exports, aliases, functions, useless custom color prompt, etc...)

Before this upgrade, everything was applied.

Last edited by scar (2016-11-05 17:20:57)


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

#12 2016-11-05 17:54:28

zivziv
Member
From: Florida, USA
Registered: 2010-02-05
Posts: 49
Website

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

scar wrote:

This will be quick...

All vte3 based terminal emulators showed the same weird behaviour.
By weird behaviour I mean they don't apply anything from my system-wide bash configuration. (I.e.: exports, aliases, functions, useless custom color prompt, etc...)

Before this upgrade, everything was applied.

By system-wide configuration do you mean scripts from /etc/profile.d/?
That's indeed weird as they are applied fine here. Have you submitted a bug against vte as you're suspecting it being responsible for your issue?

Offline

#13 2016-12-05 19:23:31

scar
Member
From: Hungary
Registered: 2009-10-01
Posts: 442

Re: Xfce4-terminal does not apply bash configuration [SOLVED]

No - by system-wide configuration I ment /etc/bash.bashrc.
And as far as I know, it should be system-wide.
And no, have not filed a bug - I don't know if feature or bug.

Last edited by scar (2016-12-05 19:24:58)


“The future has already arrived. It's just not evenly distributed yet.”
― William Gibson

Offline

Board footer

Powered by FluxBB