Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-07-05 13:14:32

jt1122
Member
Registered: 2021-03-26
Posts: 245

xfce4-terminal -e not reading ~/.bashrc?

Hi,

I have options defined for less in ~/.bashrc.

LESS=--use-color --line-num-width=3

Running

xfce4-terminal -e 'less f.txt' 

doesn't show colours.

Running less from the xfce4-terminal prompt "as usual" does.

Doesn't xfce4-terminal -e '<command>' read ~/.bashrc?.

Thanks

Offline

#2 2023-07-05 14:58:39

Tamaranch
Member
Registered: 2020-12-31
Posts: 321

Re: xfce4-terminal -e not reading ~/.bashrc?

No it doesn't, because bash is invoked non-interactively: see man bash -> invocation.
You can try this:

xfce4-terminal -e "bash -ic 'less f.txt'"

Offline

#3 2023-07-05 15:04:40

jt1122
Member
Registered: 2021-03-26
Posts: 245

Re: xfce4-terminal -e not reading ~/.bashrc?

Thanks .

Offline

#4 2023-07-06 08:32:52

PaperNick
Member
Registered: 2013-05-26
Posts: 107

Re: xfce4-terminal -e not reading ~/.bashrc?

Thanks Tamaranch! Didn't know about the interactive mode. Had the same issue as jt1122.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 521.21 KiB (Peak: 530.19 KiB) ]