I'm having a problem when invoking the shell within emacs. The problem is how the output is displayed in the emacs window. Here's a clear example of the problem.
As you can see, the display is distorted. Does anyone know how I can fix this problem? From what I can tell, they look like vt100 characters but I'm not too sure about it.
If you try /bin/ls instead, it'll probably work. It's most likely because ls is aliased to "ls --color=tty". Try to unalias it.
it is probably aliased to --color=always. ls usually recognizes when it is in a shell that doesn't understand the color codes, and tries to dumb itself down. Or it might be an emacs bug along the lines of "color codes aren't implemented". I think color codes are implemented, but there is something up with emacs. Don't know, not a big emacs user.
Both of you were right on regarding this matter. I should have suspected that the color would have been the problem but I was rather perplexed looking at those characters.
Do either of you know how I can invoke the shell without invoking .bashrc within emacs? I still like the color mode when I am using konsole and all.
Try adding this to your .bashrc instead:
Or, if you're using RH8 (why can't I ever remember what distro anyone is using?), you could create an empty file named /etc/DIR_COLORS.dumb, and it will fix it for you.
if [ "$TERM" = dumb ]; then unalias ls; fi
Dolda is a linux guru
Is there anything that you don't know? Had I known anyting about the env variable $TERM being set to dumb, I would have done this. Thanks for solving this problem for me. By the way I am using Debian. I'll post that information next time I post something else.
I think it would be a good idea to display a user-definable "Distro" entry beside the current "Location" one. Would it be possible for you to set that up, sykkn?
By the way, bpark, to be entirely "correct", I'd recommend you to examine how the system-wide profile scripts alias ls and fix it there. The script is /etc/profile.
/etc/profile contains absolutely no information about ls and the color mode. It has to do with my .bashrc file inside the home directory. Is it different in Redhat 8?
Indeed it is. I don't know if your /etc/profile does the same, but mine also sources all files that are globbed by /etc/profile.d/*.sh, and one of them is /etc/profile.d/colorls.sh, which sets up everything that has with it to do.
I don't know which is smarter really... Debian's system does make it easier for the individual users to set it up, it would seem, while RedHat's allows the sysadmin to change implementation details whenever and then just change one file so that it works for all users. I guess it's all about what you prioritize.