Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i've used linux before so i know how to use some commands like the "more" command.
when i use it in linux, the first page of the file i view looks fine. but when i press space bar to view the next page, all of the text gets highlighted. pressing space to get to the end of the file does not change anything- the rest of the file is all highlighted. pressing "q" to prematurely quit does not remove the highlighting either.
to make matters worse, when i get back to the command line, everything is still highlighted. so even when i do a "ls" command, the listing of files/directories is all in this highlight.
i don't recall this being the behavior of the "more" command in my home distro. so i don't expect it to be the case here at work either. can someone please help me here? is there an env variable that's not set correctly or something else?
the following is additional info, though some of it may not be necessary.
1] this linux distro is red hat, though i'm not sure which version. i think it is fairly new.
2] using the "less" command instead of "more" does not change anything.
3] my definition of "highlight" is, say when i login i have a white background with black text in my xterm. when i do a "more" command, text gets highlighted such that ALL text is now white immersed in a black background!
4] one way to reverse the effects of this highlight, besides logging out and logging back in, is to "vi" a file. once in the file, the highlighting disappears. i can immediately exit the file and everything appears to have returned to normal....that is until the next time i do a "more" on a file.
can someone help me out here?
thanks, edward
Last edited by esl537; 11-20-2007 at 01:10 PM.
Reason: spelling errors
I think that the problem may be in which terminal emulator you are using. Try changing your terminal to xterm and see if the problem goes away. Enter these commands before going through the "less", "more", and "vi" test again.
i checked the TERM var with the echo command and i got back that xterm was the setting. but i went through with the commands suggested anyways.
i came across a problem when i tried doing the second command. i looked around at how to give the command so that i wouldn't get an error and found i had to do: setenv TERM xterm
i also ran across a problem with the export command. a search suggested that to use the export command, i have to be in the "bash" shell. i did an echo $SHELL and found that i am using the "tcsh" shell.
i suppose getting an error on the second command above should have hinted that there might be a shell discrepancy.
anyways, given that i am in the tcsh shell, do you (or anyone else reading this) have any suggestions on what to do? maybe a different command for export?
thanks, edward
--------------------------
Quote:
Originally Posted by jailbait
I think that the problem may be in which terminal emulator you are using. Try changing your terminal to xterm and see if the problem goes away. Enter these commands before going through the "less", "more", and "vi" test again.
"i suppose getting an error on the second command above should have hinted that there might be a shell discrepancy."
"anyways, given that i am in the tcsh shell, do you (or anyone else reading this) have any suggestions on what to do? maybe a different command for export?"
I don't know anything about tcsh. I used google to find out that Red Hat has created their own unique shell with tcsh. I think that bash using xterm will work the way that you want but I don't know what combination will work correctly with tcsh.
i don't think this is shell related. i changed my shell to bash and confirmed it by checking the $SHELL variable. and yet, i still have the same problem.
so then i went back and did the 3 steps:
echo $TERM
TERM=xterm
export TERM
and i still got the same "highlighting" problem.
are there any other suggestions?
thanks, edward
[QUOTE=jailbait;2965696
I don't know anything about tcsh. I used google to find out that Red Hat has created their own unique shell with tcsh. I think that bash using xterm will work the way that you want but I don't know what combination will work correctly with tcsh.
Once the term def gets confused, changing the shell doesn't necessarily fix it.
Either change your shell entry to /bin/bash in the /etc/passwd file and logout/in or create a new user with bash as their /etc/passwd setting and login as them.
actually, i did not do it the way suggested by the other responder. i changed it through our company's IT dept. at our company, we have two choices- either to use tcsh or bash as the default shell. (though this does not prevent us from invoking othershells as suggested.)
anyways, i changed to bash such that now when i login, it is a bash shell by default.
but this aside, the shell has nothing to do with this problem. i'm quite certain it is a terminal problem. is it possible that even though the TERM var is xterm, that in reality, it isn't xterm? or maybe it is some screwed up version of xterm emulation?
does anyone else have any other suggestions?
thanks, edward
Quote:
Originally Posted by chrism01
Once the term def gets confused, changing the shell doesn't necessarily fix it.
Either change your shell entry to /bin/bash in the /etc/passwd file and logout/in or create a new user with bash as their /etc/passwd setting and login as them.
You probably should check ~/.bashrc where probably it is set what your envirement should be like, or as I see you are only a user so maybe you should check with your sysadmin, it (the envirement) could be set on /etc/bashrc as well.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.