-   Slackware (
-   -   urxvt and vi (elvis) misbehavior (

STDOUBT 01-26-2013 01:04 AM

urxvt and vi (elvis) misbehavior
Hello all!

On my 13.37 system, I recently decided to install rxvt-unicode.
Strangely, vi behaves like a line editor (ed mode?).
xterm running vi works normally.
I have searched linuxquestions, and while there is a (2009) thread about this, it was never answered. Google was no help either. It must be a rare problem.
Has anyone run into this and if so, how did you solve it?
Thanks very much!

volkerdi 01-26-2013 03:17 AM

I'm getting that you need to add something to your /etc/termcap to handle whatever rxvt-unicode is setting the $TERM variable to. You could test this quickly by setting TERM=xterm to see if elvis works then.

STDOUBT 01-26-2013 07:58 AM

Humble greetings, Chief! :-)


mike@proxima:~$ echo $TERM
mike@proxima:~$ export TERM=xterm
mike@proxima:~$ echo $TERM

vi works fine when TERM is set to xterm, but once I close urxvt, and relaunch it (/usr/bin/urxvt),
I'm back with

mike@proxima:~$ echo $TERM
rxvt-unicode-256color doesn't "stick". I've had a look at /etc/termcap and it's decidedly over my head.
My system is a bit of a mish-mash (no KDE), mainly XFCE, but now running Enlightenment (0.16.999.70492).
I would just stick with XFCE's Terminal, but it doesn't do as good a job with unicode characters as urxvt. Not that I need this for work, or anything, rather just to learn a new aspect of the system. So I'm going to make a point of studying the man page for termcap, and attempt to sort out the snag. If there's a better place to look, any pointers would be most appreciated.

Your reply is much appreciated!
Highest regards,
Mike from Portland, OR

jmccue 01-26-2013 08:31 AM

In /etc/ there are 3 termcap files: termcap, termcap-BSD and termcap-Linux. By default termcap is exactly the same as termcap-Linux

The first thing I usually do is copy /etc/termcap-BSD to /etc/termcap since the BSD version has definitions for rxvt.

I doubt doing that will fix the issue, but after doing the copy, add this string:

to the start of line 1985, so that line will look like this:

rxvt-unicode-256color|rxvt-color|rxvt terminal emulator (X Window System):\

STDOUBT 01-26-2013 07:51 PM

I did as you suggested, and now it's working fine! You saved me hours of research!
Still so much to learn...
Thank you!

All times are GMT -5. The time now is 04:30 AM.