Cant get the arrow keys to work properly :(
When logging in remotely and then "su - root", getting a prompt using "/bin/sh", I can use my arrow keys to navigate the command history and also move back and forth in the prompt. However if I dont su - root I still am using the "/bin/sh" but here I only get [[^A character when pressing the left key for example and I have no command history.
The system also says Terminal type xterm when I "su - root", I have tried searching the whole web and also my system for something that could help me fix this but without any luck :( PLEASE HELP ME!!!! /fraggelfraggel |
I didn't think "sh" had command history. I think what's happening is that when you "su" to root you're actually still using your original user's shell, which may be tcsh or whatever.
Unless you really need to use "sh" for your root shell, you could just switch to "tcsh" (run "chsh" as root). Or install bash (/usr/ports/shells/bash) and use it (again, run "chsh"). |
same problem using csh
my normal user i log in with is using csh now, but I still have the same problem. Getting this when using arrow keys in the prompt:
machine: {12} [D^[ machine: {12} [DC[^[ machine: {12} [DC[B[^[ machine: {12} [DC[B[A[ and I also got no command history. Quote:
|
What is your TERM env set to?
|
"xterm" if using
->echo $TERM is the right way to find out Quote:
|
Well you either messed up something in your .cshrc(Post it) or you messed up your keylayout. Try changing your users shell to tcsh and then we will see what we can do. I am more familiar with tcsh :|
If you need to get this fixed asap head over to freebsdforums.org they get a lot more traffic and well your question will probably get answered faster. PS: If your $TERM is xterm that might also be the cause of some problems... |
cshrc
Noticed that in my
/home/$user directory there was no ".cshrc" file, but when I try to copy the skel file it ends up in /root/.cshrc :confused: but it didnt help anything. If I use the bash shell there is no problems. There is also one in / I also have csh.cshrc in /etc/ they al look like the one below. --------------------------------------------------------- #csh .cshrc file alias h history 25 alias j jobs -l alias la ls -a alias lf ls -FA alias ll ls -lA alias su su -m setenv EDITOR vi setenv VISUAL ${EDITOR} setenv EXINIT 'set autoindent' setenv PAGER more set path = (~/bin /bin /sbin /usr/{bin,sbin,X11R6/bin,pkg/{,s}bin,games} \ /usr/local/{,s}bin) if ($?prompt) then # An interactive shell -- set some stuff up set filec set history = 1000 set ignoreeof set mail = (/var/mail/$USER) set mch = `hostname -s` set prompt = "${mch:q}: {\!} " endif |
All times are GMT -5. The time now is 03:06 PM. |