LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-04-2011, 11:39 PM   #1
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
Question TERM=xterm-256color vi only show 1 line problem


using slackware 64 13.37, when I switch $TERM from linux to xterm-256color, from /usr/share/terminfo/x/xter-256color, program vi only show 1 line, and will not fill up my xterm screen, how do i fix this problem.

if I switch $TERM back to linux or xterm, vi will fill and show on entire xterm screen, but they only has 8bit colors.
 
Old 12-05-2011, 03:57 AM   #2
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 360

Rep: Reputation: 199Reputation: 199
In Slackware vi is a symlink to elvis. I don't think that elvis has 256 color support. You might want to use vim instead.
 
Old 10-02-2012, 06:04 PM   #3
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278

Original Poster
Blog Entries: 7

Rep: Reputation: Disabled
Finally, find out what is wrong, need to tweak /etc/termcap file (version 13.37), scroll to line#144, modify/add

|xterm-256color|

in between.

And, the bash prompt line will wrap properly (move cursor down for newline), vi(elvis) will work as in TERM=linux. vim will show a lot more colors.

add shopt -s checkwinsize in .bashrc will update columns and line numbers.

Last edited by number22; 10-02-2012 at 06:45 PM.
 
Old 10-05-2012, 07:26 PM   #4
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278

Original Poster
Blog Entries: 7

Rep: Reputation: Disabled
Modify /etc/DIR_COLORS files; add xterm-256color term type too.
Code:
 TERM xterm-256color

Last edited by number22; 10-05-2012 at 07:31 PM.
 
Old 12-09-2012, 05:11 PM   #5
lopid
Member
 
Registered: Jun 2008
Posts: 156

Rep: Reputation: Disabled
I wonder if we can have this in a future ‘etc’ Slackware package, since it affects more than just vi/elvis. For example, readline’s horizontal-scroll-mode is ignored when TERM is xterm-256color and it isn’t in /etc/termcap. Might as well add xterm+256color and the 88 colour versions, too.

My DIR_COLORS already included xterm-256color.
 
Old 12-10-2012, 11:46 PM   #6
elyk
Member
 
Registered: Jun 2004
Distribution: Slackware
Posts: 241

Rep: Reputation: 49
On my machine I've decided to remove the termcap package, then rebuild a few of the stock Slackware packages so they link to ncurses (which uses terminfo) instead. It seems to make most of these kinds of problems go away. One less package to install, one less thing to go wrong...

The process goes something like this:
  1. Recompile bash using --with-curses, then reinstall it (so that we can still use bash after the next few steps).
  2. Remove the libtermcap package.
  3. Rebuild aaa_elflibs without the libtermcap files, then reinstall it. libtermcap is now gone.
  4. Next we want ncurses to fill in where we removed libtermcap. Rebuild the ncurses package with a couple of modifications. Remove the part where termcap.h gets renamed to termcap-ncurses.h to avoid clobbering the one from libtermcap since this isn't necessary anymore. Add compatibility symlinks from libtermcap.{a,so} to libncurses.{a,so} (search the Slackbuild for "Olde obsolete names" where we already do something similar) so that anything trying to link to libtermcap will instead get linked to ncurses. Reinstall after rebuilding.
  5. We no longer need the termcap-{BSD,Linux} files in /etc. Rebuild the etc package without them, also without the part of doinst.sh that copies one of these to /etc/termcap. Reinstall after rebuilding. It's now safe to delete /etc/termcap, which is a leftover from this package.
  6. Rebuild and reinstall at least the following stock Slackware packages so they'll link to ncurses instead of libtermcap: a/bash (in case you skipped the first step, but this time --with-curses isn't strictly needed), x/xterm, a/elvis, a/tcsh, a/procps, n/gnupg, n/gnupg2, n/tftp-hpa, n/mtr, ap/jove, l/pilot-link, kde/analitza, d/ruby. I found these using "objdump -x $FILE | grep NEEDED" on all the executable and library files I could find. There may be others. You may have other non-stock packages that need to be rebuilt.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
TERM=xterm iftop run in php (size of window). tsukasagenesis Linux - Networking 0 05-02-2010 03:15 PM
[SOLVED] xterm - how to go onto next line when end of current line is reached? devnull10 Linux - Newbie 18 03-21-2010 05:41 AM
back space erases whole term on command line sharky Linux - Newbie 4 04-27-2009 12:28 PM
Xterm command line scrolling dah328 Linux - General 2 04-27-2006 03:32 PM
Command line screen res changing in X from Xterm? Frustin Linux - Hardware 9 12-16-2003 07:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration