colors for files/dirs when using proot-distro with --termux-home?

I like the default color scheme of blue directories, white files, green executables, etc. When I log into my debian proot using this command, proot-distro login --user userr debian, this color scheme is still shown. But when I add --termux-home, everything shows as white. This is weird because the colors show when not I'm the proot. How do I get it to show colors when using --termux-home?
11 Replies
Komo
Komo5w ago
try source <(dircolors -p -b)
sudomain
sudomain5w ago
That gave me
userr@localhost:~$ source <(dircolors -p -b)
dircolors: the options to output non shell syntax, and to select a shell syntax are mutually exclusive
Try 'dircolors --help' for more information.
userr@localhost:~$ source <(dircolors -p -b)
dircolors: the options to output non shell syntax, and to select a shell syntax are mutually exclusive
Try 'dircolors --help' for more information.
Komo
Komo5w ago
try without -p flag
sudomain
sudomain5w ago
No output this time, but it does set $LS_COLORS, though everything is still white
Komo
Komo5w ago
try ls --color=auto and you probably should alias it in your bashrc
sudomain
sudomain5w ago
Thanks! This was the solution but i'm still curious about the cause. Guess I'll have to take a peek at the code for proot-distro
Dr. Jaska
Dr. Jaska5w ago
It's likely that your shell rc which you don't have yet in proot aliases ls to be ls --color=auto
sudomain
sudomain5w ago
I think it's just standard ls from coreutils:
~ $ type ls
ls is /data/data/com.termux/files/usr/bin/ls
~ $ alias ls='ls -l'
~ $ type ls
ls is aliased to `ls -l'
~ $ type ls
ls is /data/data/com.termux/files/usr/bin/ls
~ $ alias ls='ls -l'
~ $ type ls
ls is aliased to `ls -l'
Dr. Jaska
Dr. Jaska5w ago
On Debian \ls does not give me any colors. On Termux it does. I assume that there is a compile time flag for the default value if --color=WHEN Debian as in a desktop Debian over SSH, not proot
sudomain
sudomain5w ago
Hmm it gives me colors Oh, root or not root user? The root user I think never has colors, but a user other than root I think has it by default
Dr. Jaska
Dr. Jaska5w ago
On Debian normal non-root user. Termux as the Termux user as it's a single user system.