Xterm-256color + screen + mutt + vim = @£%&¡#!
Sorry, I shouldn't be swearing in the subject line, I know, it's just that I've spending way too much time lately trying to get xterm with 256 colors to go nicely with mutt and vim through screen. It seems that no matter how I tweak the settings, in .Xresources, .screenrc, and .vimrc, I will either get functioning colors in mutt (and other ncurses apps) OR ctrl'ed function keys in vim, but never both. Either the colors are garbled in mutt (lines which should have been colored all the way, get the background color where there is no text), or the ctrl combinations in vim don't work, unless I map them with ^v directly, but that's not ideal either.
I'm not necessarily asking for help, but if someone has a working setup like this with fine-tuned rc-files lying around, I'd be delighted to see them. :-)
Hey that was spooky! One comes to realize how personal these settings are. Using someone else's rcfiles... there's room for some serious split personality thing here.
Thanks for the link, anyway. I'll try them out.
Similar Messages
-
[Solved] Setting xterm to xterm-256color won't work as described
My goal was to set TERM to xterm-256color as described in the wiki but it doesn't work.
I tried to add xterm*termName: xterm-256color to ~/.Xresources (with .xinitrc containing [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources) and /etc/X11/xinit/xinitrc. Merging the setting manually with xrdb -merge ~/.Xresources was also without luck.
Additionally i tried to add the line export TERM=xterm256-color to /etc/profile and to a custom script in /etc/profile.d.
I've also checked if even the scripts were executed by creating a file with touch. The file was created, so /etc/profile was executed.
The only way to set TERM to xterm-256color was by adding export TERM=xterm256-color to my ~/.zshrc (~/.bashrc would've worked also), but this is the way how it should not be done and furthermore i would like to set xterm to use 256 colors system-wide.'
I use XFCE, gnome and gdm if this helps.
Last edited by klingt.net (2014-03-11 09:25:42)Are you using xterm or are you using Xfce's Terminal app? I ask because there has been confusion in the past about setting $TERM for Xfce's Terminal. See https://bbs.archlinux.org/viewtopic.php?id=175581
From the documentation for the Xfce Terminal Preferences, http://docs.xfce.org/apps/terminal/preferences, under Compatibility:
Emulation setting
This specifies the terminal emulation. This does not only set the $TERM value, but also the input conversion of the VTE widget. By default this is set to xterm, if changed /etc/termcap will be read to get the emulation values.
If you have an application that needs $TERM for correct functionality, it is better to set this manually in your ~/.bashrc file (or whatever shell you use) and set the terminal emulation as xterm to avoid incorrect characters in the Terminal. -
Does anyone know how to get screen to play nicely with an 88-color term (urxvt in this case)? I run vim in a terminal all the time and I use the inkpot scheme which requires 88 colors. If I run vim in screen the pretty colors don't show through. I've seen stuff on setting screen to pass through 256 colors but not 88.
I got 256 colors stuff working perfectly. The problem I have left is that 88 colors stuff comes out wrong. It looks like all the colors are shifted to blue. I guess the can be fixed by a termcapinfo line in my screenrc but I'm clueless as to what that line needs to be.
EDIT: NVM, I got it working - I just had to set TERM to xterm-256color before running screen.
For those interested you need to recompile screen for 256 colors (with abs set up, just add --enable-colors256 to the ./configure line in the PKGBUILD)
Then you need to do something or another to change TERM for screen. I add the following to my .zshrc but it should be similar for bash.
alias screen='TERM=xterm-256color screen -T $TERM' -
Urxvt, xterm, vim, and gnu screen.
To make this simple: all i want is 256 color support in one terminal, that will give 256 color support in vim, gnu screen, and not screw up shells i ssh into. If I could get this working in xterm alone consider this solved.
The more I try to fix my problem it seems the more complicated it gets. What I want, I thought was simple:
Now xterm seems to be the most workable solution, I guess I can give up on having clickable links, so that can go on the back burner. But these are the problems i'm having.
Here's the problem point by point:
Urxvt
$ echo $TERM
xterm-256color
Urxvt will run a perl script I have to display 256 colors. Except is does not show the grayscale ramp shown here:
VIM in urxvt does NOT show any colors. It's all white text.
This is my .vimrc
$ cat .vimrc
syntax on
set ignorecase
set smartcase
set incsearch
set hlsearch
let g:netrw_http_cmd = "wget -q -O"
if &t_Co == 256
colorscheme xoria256
else
colorscheme desert
endif
in urxvt Gnu Screen
echo $TERM
screen-256color-bce
the perl script does not display 256 colors like it should.
vim in urxvt in screen again, does not show any colors. all white text.
Xterm
echo $TERM
xterm
Xterm displays the full 256 colors from the script including the grayscale ramp.
vim in xterm displays the desert theme (i would prefer it default to the xoria256, no idea why the 256 color script works but vim doesn't see xterm as a 256 capable terminal).
in xterm, Gnu Screen
echo $TERM
screen-256color-bce ( I do not see in any file where this option is defined)
Xterm with Gnu Screen displays the full 256 colors from the script including the grayscale ramp.
Vim in Gnu Screen in Xterm displays 256 colors properly.
Here is my .screenrc
#terminfo and termcap for nice 256 color terminal
# allow bold colors - necessary for some reason
attrcolor b ".I"
# tell screen how to set colors. AB = background, AF=foreground
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
# erase background with current bg color
defbce "on"
#term xterm-256color
term screen-256color
startup_message off
caption always "%{= KW}%-w%{= gW}%n %t%{-}%+w %-="
hardstatus alwayslastline "%{= kW} %-= %{= kC}Session:%u%{= kW} %5` | %{= kC}Host:%{= kW} %H | %1` |%{= kC} MEM:%{= kW} %2`MB /%{= kC} SW: %{= kW}%3`MB | %4` %{= kR}Unread %{= kW}| %m/%d %c"
vbell off
#Backticks to display information in status bar
backtick 1 60 60 /home/username/bin/get_uptime
backtick 2 60 60 /home/username/bin/get_freemem
backtick 3 60 60 /home/username/bin/get_freeswap
backtick 4 60 60 /home/username/bin/get_gmail
backtick 5 60 60 /home/username/bin/get_sessionname
defscrollback 5000
screen -t root 0 sudo -s
screen -t shell 1 bash
screen -t shell 2 bash
screen -t shell 3 bash
screen -t shell 4 bash
screen -t shell 5 bash
screen -t shell 6 bash
screen -t shell 7 bash
screen -t irc 8 irssi
screen -t home 9 bash
select 1
here is my .Xdefaults
!XTerm*font: -*-terminal-*-*-*-*-14-*-*-*-*-*-*-
XTerm*font: xft:DejaVu Sans Mono:size=8
xterm*faceName: Mono
xterm*faceSize: 8
XTerm*background: #191919
XTerm*foreground: white
XTerm*pointerColor: white
XTerm*pointerColorBackground: black
XTerm*cursorColor: white
!XTerm*internalBorder: 3
XTerm*loginShell: true
XTerm*scrollBar: false
XTerm*scrollKey: true
XTerm*saveLines: 1000
XTerm*multiClickTime: 250
XTerm*boldColors: false
xterm*title: xterm
xterm*geometry: 160x25
! Black
XTerm*color0: #262626
XTerm*color8: #252525
! Red
XTerm*color1: #C12121
XTerm*color9: #E50E0E
! Green
XTerm*color2: #597b20
XTerm*color10: #89b83f
! Yellow
XTerm*color3: #Ded838
XTerm*color11: #efef60
! Blue
XTerm*color4: #265997
XTerm*color12: #3F6FD0
! Magenta
XTerm*color5: #706c9a
XTerm*color13: #826ab1
! Cyan
XTerm*color6: #69a2b0
XTerm*color14: #a1cdcd
! White
XTerm*color7: #BBBBBB
XTerm*color15: #EEEEEF
URxvt*termName: xterm-256color
URxvt*urlLauncher: /usr/bin/firefox
URxvt.matcher.pattern.1: \\bwww\\.[\\w-]\\.[\\w./?&@#-]*[\\w/-]
URxvt.matcher.button: 2
URxvt.perl-ext-common: default,matcher
URxvt*saveLines: 4000
URxvt*background: #191919
URxvt*secondaryScroll: true
URxvt*scrollBar: false
URxvt*geometry: 150x25
URxvt.font: xft:DejaVu Sans Mono:size=8
URxvt.xftAntialias: true
URxvt*foreground: white
URxvt*pointerColor: white
URxvt*pointerColorBackground: black
URxvt*cursorColor: white
!URxvt*inheritPixmap: True
!URxvt*shading: 90
!URxvt*tintColor: #999
URxvt*keysym.Home: \033[1~
URxvt*keysym.End: \033[4~
! Black
URxvt*color0: #262626
URxvt*color8: #252525
! Red
URxvt*color1: #C12121
URxvt*color9: #E50E0E
! Green
URxvt*color2: #597b20
URxvt*color10: #89b83f
! Yellow
URxvt*color3: #Ded838
URxvt*color11: #efef60
! Blue
URxvt*color4: #265997
URxvt*color12: #3F6FD0
! Magenta
URxvt*color5: #706c9a
URxvt*color13: #826ab1
! Cyan
URxvt*color6: #69a2b0
URxvt*color14: #a1cdcd
! White
URxvt*color7: #BBBBBB
URxvt*color15: #EEEEEF
To Fix In Xterm
-Get Vim to display 256 colors without Gnu Screen
To Fix In Urxvt
-Get vim to display any color, but preferably 256 colors in urxvt and urxvt with Gnu Screen. (and yes, it's a 256 capable urxvt)
-Get shells i SSH into to recognize the reported term variable
To Fix In Gnu Screen
-Make it stop reporting the term variable as screen-256color-bce without losing 256 color support as this screws up shells i ssh to.
any help would be greatly appreciated. I feel like a dog chasing its tail b/c when I find a fix to one problem, I end up creating 1-2 more.
Last edited by scv5 (2009-07-31 14:11:31)I had similar but different issues regarding this. Now, i have 256 color support in whatever terminal/ssh/screen session I'm in.
The relevant config lines:
.Xdefaults:
XTerm*termName: xterm-256color
URxvt*termName: rxvt-256color
.vimrc
" 256 colors only if you can handle it
if $TERM =~ "-256color"
set t_Co=256
colorscheme zenburn
endif
.screenrc
# term
term xterm-256color
# main options
altscreen on
attrcolor b ".I"
defbce "on"
# some termcaps
termcapinfo xterm-256color 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
termcapinfo rxvt-256color 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
note: this setup caused an issue where background colors in mutt/htop inside screen did not extend passed the line's text. i had to solve that via this workaround.
Last edited by brisbin33 (2009-07-31 21:28:55) -
Mutt display broken when using screen
Running Arch 2010.05, Mutt 1.5.21-1, screen 4.0.3-8. Using iTerm2, build 0.20.20101110.
If I run Mutt within screen, no matter the terminal type in iTerm or my .screenrc, it looks like this:
http://img403.imageshack.us/img403/5955 … 8at201.png
If I set my terminal type to vt100 and run Mutt on its own, everything is normal. The inverted bars don't disappear between characters.
Here's my .screenrc:
hardstatus on
hardstatus alwayslastline
hardstatus string "%-w%L>%{= }%n %t%{-}%52<%+w %L= %=%{.. } %C %H "
defencoding UTF-8
term vt100 # though I can change this to xterm-256color, rxvt, etc.
startup_message off
I found one post where someone was having a similar problem, but I can't find it and also know that he either didn't find a solution or his solution didn't work for me.
Any ideas? I'm way new, so don't assume I know or have done anything productive in trying to troubleshoot.
-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code --
Last edited by mp (2010-11-28 19:20:29)I'm guessing that resolving that isn't as easy as adding "-bce" to the end of the term entry in .screenrc, as that didn't seem to make a difference. I also tried adding "defbce on" with similar luck.
I also found the fifth entry in the Mutt appearance FAQ to be directly applicable to my situation, though their solution (run Mutt in screen even if you don't need its capabilities) clearly isn't working for me.
I'll try using color commands instead of reverse, I suppose, and see if that does it.
Thanks. -
Hello,
I recently started to use Xterm rather than urxvt, and there's a weird glitch when using vim. I have cursorline enabled, so the background of the cursor line is a different color from the regular background, and I used this config in urxvt and termite and it works properly. However, in Xterm, when I scroll down, the cursor line leaves a "trace" on the background where there is no text.
http://i.imgur.com/9CO522D.png
This is a screenshot of the issue I'm having, and I am using vim to edit my colorscheme file, urxvt is on the left and xterm is on the right. As I said, this colorscheme gave me no problems on urxvt and termite, but in case I'm missing something I thought I might as well show it.
Also, the comments in the colorscheme file shouldn't have a separate background either, and they don't in urxvt, and there shouldn't be yellow highlighting on '=dar' at the top of the colorscheme file. I don't understand why there can be so many differences from terminal to terminal.
Can anyone help me fix this?
Thanks,
wadawalnut
-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --Does the problem occur with other vim colorschemes? Perhaps we can eliminate the colorscheme and any .vimrc configurations or plugins as the source of the problem.
You can create a very basic .vimrc file, perhaps naming it basic.vim
set nocompatible
filetype plugin on
set t_Co=256
syntax on
Start vim using basic.vim instead of your .vimrc:
$ vim -u basic.vim <file_to_edit>
Vim should open with the default colorscheme. Then add cursorline highlighting and see if the problem exists.
:se cul
If the graphical glitch is there, you've pretty much eliminated your .vimrc as the source of the problem. If the "tracing" problem isn't there, change to a colorscheme where you know it has previously occurred.
:colo <my_colorscheme>
Try editing different filetypes to make sure the problem isn't a filetype or syntax plugin.
Edit: Ctrl+l, (Control plus lowercase L) should refresh the screen in vim.
Last edited by thisoldman (2015-03-08 18:47:05) -
Vim refuses to start in urxvt+screen if 'mouse' is set
I recently went back to using screen, so I noticed I have an issue with vim, which just sits there doing nothing, but only in screen inside urxvt. in a VT it starts just fine.
this issue is exactly the one described here.
as a workaround, I added to my .vimrc
set mouse=
not that I use the mouse for something else than copy-pasting (which any decent terminal does fine anyway)... but this is annoying.
anyone encountering this too?I just searched for a solution and found this thread.
I can confirm the problem. Additional info:
Vim works if I set "term $TERM" in .screenrc (atm that's "rxvt-unicode"), but when I change it to the default value of "screen", then Vim doesn't start anymore until I do a "set mouse=" in .vimrc -
[kinda solved] screen hardstatus: right align problem...
hey guys, previously i was using an old monitor at 1024x768 & screen's hardstatus was working fine with that setup. but some days ago i got a new monitor & now at a resolution of 1920x1080, the stuff that is supposed to be at the right most side has got some problem & is appearing abt 200-300px (i guess) before. i have googled it but found nothing.
here's a shot
http://omploader.org/vNWducg
& here's my screenrc
# Basic Settings {{{
nethack on # Fun error messages
deflogin off # All screens are considered logins
autodetach on # Detach on HUP instead of kill
startup_message off # Don't be annoying
vbell off # Don't be annoying
defshell -$SHELL # The dash makes it a login shell
defscrollback 10000 # Remember a lot
nonblock on # Block input from hung applications
defutf8 on # Always use utf8
defflow off # Turn off flow-control
msgwait 5 # Display msgs for N seconds
altscreen on # Enable alternate screen support
defbce on # Erase background with current background color
bell_msg "" # For urgency hints
setenv LC_CTYPE en_US.UTF-8
term rxvt-256color
# Define terminal capabilities {{{
termcapinfo xterm-256color 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
termcapinfo rxvt-256color 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
backtick 1 1800 1800 bday
backtick 2 1800 1800 cat ${HOME}/.weather
sorendition '= dY'
hardstatus alwayslastline '%{= M}%H%{W} | %{= B}%l%{W} | %{G}%1`%{W} | %{C}%2` %= %{= w}%-w%{+b r}%n*%t%{-b r}%{w}%+w'
# Banish screen 0, it sucks {{{
bind c screen 1
bind ^c screen 1
bind 0 select 10
# find the nearest shell
bind s select zsh
screen -t torrents 1 rtorrent
screen -t zsh 2
# Keybinds {{{
# Be lazy and use Fx keys for screen switching
#bindkey -k k1 select 1
#bindkey -k k2 select 2
#bindkey -k k3 select 3
#bindkey -k k4 select 4
#bindkey -k k5 select 5
#bindkey -k k6 select 6
#bindkey -k k7 select 7
#bindkey -k k8 select 8
# Use F11 as escape (for caps-lock mapped to F13)
bindkey -k F1 command
# vim:foldlevel=0
Last edited by vik_k (2010-09-11 09:47:00)sorry -- I dont have a solution to your problem.
do you know howto get screen to send a command to the bash shell its displaying?
paste seems to do what I want,... if get date command in buffer, C-A ]
will send date, and bash runs date.
but how can I that to loop to automatically simulate activity to prevent ssh timeouts and disconnects -
[SOLVED] Vim color scheme
Hello! This is my first post and I'm new with Archlinux, sorry if this trouble is very simple but I'm a newbie...
The question... Vim color scheme only works fine when I use sudo or when I'm root...
I've put the color scheme in /usr/share/vim/vim73/colors and in ~/.vim/colors, and I've configured /etc/vimrc and ~/.vimrc
I don't know what's wrong...
Correct color scheme (with sudo):
Wrong color scheme (normal user):
Thank you very much!!
Last edited by Midnith (2012-03-27 11:58:48)Hi again!
Kaustic wrote:
There's your problem. xterm (as indicated by tput) only supports 8 colours.
If you're using Konsole, check the configuration and change the session to xterm-256color. Alternatively can set the environment variable within your ~/.bashrc file like so: export TERM=xterm-256color
It works! Thank you very much and sorry for the inconveniece
Kaustic wrote:
(PS: To list all the terminals you can use with 256 colours try the following command: (Iirc there was a cleaner way to do this, but alas)
ls /usr/share/terminfo/*/* | grep 256
The output:
/usr/share/terminfo/E/Eterm-256color
/usr/share/terminfo/d/darwin-256x96
/usr/share/terminfo/d/darwin-256x96-m
/usr/share/terminfo/g/gnome-256color
/usr/share/terminfo/k/konsole-256color
/usr/share/terminfo/m/mlterm-256color
/usr/share/terminfo/m/mrxvt-256color
/usr/share/terminfo/p/putty-256color
/usr/share/terminfo/r/rxvt-256color
/usr/share/terminfo/s/screen-256color
/usr/share/terminfo/s/screen-256color-bce
/usr/share/terminfo/s/screen-256color-bce-s
/usr/share/terminfo/s/screen-256color-s
/usr/share/terminfo/v/vte-256color
/usr/share/terminfo/x/xnuppc+256x96
/usr/share/terminfo/x/xnuppc-256x96
/usr/share/terminfo/x/xnuppc-256x96-m
/usr/share/terminfo/x/xterm+256color
/usr/share/terminfo/x/xterm-256color
How I put xterm-256color by default? -
URxvt - Handle clickable links and irssi with screen over ssh ?
Hi,
I use URxvt as a replacement to gnome-terminal. But I can't manage to make three things working :
- First, I followed the wiki to set clickable links. It worked but since a little time (I don't know really when it stopped working) URxvt only colors the links. When I click on them, it doesn't do anything.
Here is my .Xresources :
! Taille par défaut
URxvt*geometry: 100x30
! Police TTF
URxvt*font: xft:Bitstream Vera Sans Mono:style=Regular:pixelsize=12:antialias=true
! Taille du buffer et barre de défilement
URxvt*saveLines: 10000
URxvt*scrollBar: true
URxvt*scrollBar_right: true
URxvt*scrollColor: #c2dd5a
URxvt*scrollBar_floating: true
URxvt*scrollstyle: plain
! Curseur et nom du terminal
URxvt*cursorColor: white
URxvt*termName:xterm
! Couleurs
URxvt*foreground: #ffffff
!URxvt*background: #000000
! Black
URxvt*color0: #101010
URxvt*color8: #2e3436
! Red
URxvt*color1: #cc0000
URxvt*color9: #ff361e
! Green
URxvt*color2: #8ae234
URxvt*color10: #93ff00
! Yellow
URxvt*color3: #ffc005
URxvt*color11: #ffd00a
! Blue
URxvt*color4: #004f9e
URxvt*color12: #0071ff
! Purple
URxvt*color5: #e50060
URxvt*color13: #eb0061
! Cyan
URxvt*color6: #4bb8fd
URxvt*color14: #34E2E2
! White
URxvt*color7: #eeeeec
URxvt*color15: #f2f2f2
! Utilisation de la vraie transparence
URxvt*depth: 32
URxvt*background: rgba:0000/0000/0000/cccc
! Onglets
URxvt*.perl-ext: tabbed
URxvt.tabbed.tabbar-fg: 2
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg: 3
URxvt.tabbed.tab-bg: 0
! Liens
URxvt.perl-ext-common: default,matcher,fullscreen
URxvt.urlLauncher: /usr/bin/firefox
URxvt.matcher.button: 1
URxvt.colorUL: #4682B4
! Fullscreen
URxvt*keysym.F11: perl:fullscreen:switch
! touches home et end
URxvt*keysym.Home: \033[1~
URxvt*keysym.End: \033[4~
- I'd like to automatically launch an urxvt term at startup and connect to an irssi screen session on a remote server (via ssh).
I tried : urxvt -e "ssh user@remote -t irc" where irc is an alias on the remote server that attach the irssi screen session. The problem is that with this command, urxvt opens and close immediately. I then tried to add the -hold option and various combination of "bash -c" I saw on the forum but nothing worked...
- And finally, how can I use nautilus-open-terminal to open a urxvt term in a specific folder ? I set the correct entries in dconf-editor and followed the wiki page but it doesn't work...
Thanks
Last edited by doupod (2013-04-06 16:42:18)I had similar but different issues regarding this. Now, i have 256 color support in whatever terminal/ssh/screen session I'm in.
The relevant config lines:
.Xdefaults:
XTerm*termName: xterm-256color
URxvt*termName: rxvt-256color
.vimrc
" 256 colors only if you can handle it
if $TERM =~ "-256color"
set t_Co=256
colorscheme zenburn
endif
.screenrc
# term
term xterm-256color
# main options
altscreen on
attrcolor b ".I"
defbce "on"
# some termcaps
termcapinfo xterm-256color 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
termcapinfo rxvt-256color 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
note: this setup caused an issue where background colors in mutt/htop inside screen did not extend passed the line's text. i had to solve that via this workaround.
Last edited by brisbin33 (2009-07-31 21:28:55) -
[SOLVED] urxvt + screen + zsh, title is not displayed correctly
I use urxvt and screen inside it. The screen's title is set up to display the current program and the window number. However after changing from bash to zsh, it always display "zsh" instead of "vim" or "top" which is currently running.
my screenrc:
# This is an example for the global screenrc file.
# You may want to install this file as /usr/local/etc/screenrc.
# Check config.h for the exact location.
# Flaws of termcap and standard settings are done here.
startup_message off
#defflow on # will force screen to process ^S/^Q
deflogin on
#autodetach off
vbell on
vbell_msg " Wuff ---- Wuff!! "
# all termcap entries are now duplicated as terminfo entries.
# only difference should be the slightly modified syntax, and check for
# terminfo entries, that are already corected in the database.
# G0 we have a SEMI-GRAPHICS-CHARACTER-MODE
# WS this sequence resizes our window.
# cs this sequence changes the scrollregion
# hs@ we have no hardware statusline. screen will only believe that
# there is a hardware status line if hs,ts,fs,ds are all set.
# ts to statusline
# fs from statusline
# ds delete statusline
# al add one line
# AL add multiple lines
# dl delete one line
# DL delete multiple lines
# ic insert one char (space)
# IC insert multiple chars
# nx terminal uses xon/xoff
termcap facit|vt100|xterm LP:G0
terminfo facit|vt100|xterm LP:G0
#the vt100 description does not mention "dl". *sigh*
termcap vt100 dl=5\E[M
terminfo vt100 dl=5\E[M
#facit's "al" / "dl" are buggy if the current / last line
#contain attributes...
termcap facit al=\E[L\E[K:AL@:dl@:DL@:cs=\E[%i%d;%dr:ic@
terminfo facit al=\E[L\E[K:AL@:dl@:DL@:cs=\E[%i%p1%d;%p2%dr:ic@
#make sun termcap/info better
termcap sun 'up=^K:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:IC=\E[%d@:WS=1000\E[8;%d;%dt'
terminfo sun 'up=^K:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC:IC=\E[%p1%d@:WS=\E[8;%p1%d;%p2%dt$<1000>'
#xterm understands both im/ic and doesn't have a status line.
#Note: Do not specify im and ic in the real termcap/info file as
#some programs (e.g. vi) will (no,no, may (jw)) not work anymore.
termcap xterm|fptwist hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l
terminfo xterm|fptwist hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l
# Long time I had this in my private screenrc file. But many people
# seem to want it (jw):
# we do not want the width to change to 80 characters on startup:
# on suns, /etc/termcap has :is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l:
termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
# Do not use xterms alternate window buffer.
# This one would not add lines to the scrollback buffer.
#termcap xterm|xterms|xs ti=\E7\E[?47l
#terminfo xterm|xterms|xs ti=\E7\E[?47l
#make hp700 termcap/info better
termcap hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'
terminfo hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'
#wyse-75-42 must have defflow control (xo = "terminal uses xon/xoff")
#(nowadays: nx = padding doesn't work, have to use xon/off)
#essential to have it here, as this is a slow terminal.
termcap wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h
terminfo wy75-42 nx:xo:Z0=\E[?3h\E[31h:Z1=\E[?3l\E[31h
#remove some stupid / dangerous key bindings
bind ^k
#bind L
bind ^\
#make them better
bind \\ quit
bind K kill
bind I login on
bind O login off
bind } history
# Modified Liberty, Display the status on the gnome terminal title
#hardstatus string "[screen %n%?: %t%?] %h"
termcapinfo xterm*|rxvt*|urxvt* 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
hardstatus string "[screen: %w] %h"
# scrollback buffer size
defscrollback 5000
Solved by adding this to .zshrc
case $TERM in
xterm*|rxvt*|screen*)
precmd() { print -Pn "\e]0;%m:%~\a" }
preexec () { print -Pn "\e]0;$1\a" }
esac
Last edited by helloworld1 (2011-04-12 16:25:53)I have
defhstatus "^Et"
in my .screenrc. Maybe there's something you like even better, e.g. there's also "^EH" which I used to use. Just checkout what can be done with defhstatus, you'll find what you want. -
[SOLVED] VIM not displaying many glyphs
I'm struggling to get the full glyph set to display in VIM. Particularly missed are the mathematical super- and sub-script. I've worked on the problem and tried various fixes for displaying UTF-8 characters without success.
(Code block bad form? Ok T. IMHO. There's that type of post where the OP doesn't know why something isn't working and they quote a dump truck of details, even though they're not sure what's relevant and what isn't. And the longer the quote, the harder it is to figure out what they're doing wrong. I didn't want to be that guy. I was hiding the verbosity, in the event my font problems are simpler than I've made it.)
1) Applied settings from these WIKI pages:
Fonts
Xterm
2) Apps I've installed
$ pacman -Qs font
local/dina-font 2.92-4
A monospace bitmap font, primarily aimed at programmers
local/fontconfig 2.11.1-1
A library for configuring and customizing font access
local/fontsproto 2.1.3-1
X11 font extension wire protocol
local/freetype2 2.5.3-2
TrueType font rendering library
local/gsfonts 1.0.7pre44-4
Standard Ghostscript Type1 fonts from URW
local/libfontenc 1.1.2-1
X11 font encoding library
local/libotf 0.9.13-2
OpenType Font library
local/libxfont 1.4.7-3
X11 font rasterisation library
local/libxft 2.3.2-1
FreeType-based font drawing library for X
local/t1lib 5.1.2-5
Library for generating character- and string-glyphs from Adobe Type 1 fonts
local/tamsyn-font 1.10-1
A monospaced bitmap font for the console and X11
local/terminus-font 4.39-1
Monospace bitmap font (for X11 and console)
local/ttf-bitstream-vera 1.10-10
Bitstream vera fonts
local/ttf-droid 20121017-3
General-purpose fonts released by Google as part of Android
local/xorg-bdftopcf 1.0.4-2 (xorg xorg-apps)
Convert X font from Bitmap Distribution Format to Portable Compiled Format
local/xorg-font-util 1.3.0-2 (xorg-fonts xorg)
X.Org font utilities
local/xorg-font-utils 7.6-4
Transitional package depending on xorg font utilities
local/xorg-fonts-100dpi 1.0.1-5 (xorg)
X.org 100dpi fonts
local/xorg-fonts-alias 1.0.3-1
X.org font alias files
local/xorg-fonts-encodings 1.0.4-4 (xorg-fonts xorg)
X.org font encoding files
local/xorg-fonts-misc 1.0.1-3
X.org misc fonts
local/xorg-fonts-type1 7.4-3
X.org Type1 fonts
local/xorg-mkfontdir 1.0.7-2 (xorg xorg-apps)
Create an index of X font files in a directory
local/xorg-mkfontscale 1.1.1-1 (xorg-apps xorg)
Create an index of scalable font files for X
3) A forum search found some common issues:
unicode symbols not working in my terminal
$ localectl
System Locale: LANG=en_US.UTF-8
LC_COLLATE=C
VC Keymap: US
X11 Layout: n/a
$ locale -a
C
en_US.utf8
POSIX
$ echo $TERM
xterm-256color
4) ~/.Xresources
! wiki.archlinux.org/.../Xterm
xterm*termName: xterm-256color
xterm*locale: true
xterm*saveLines: 4096
xterm*bellIsUrgent: false
xterm*VT100.geometry: 80x25
xterm*faceName: Droid:style=Regular:size=12
xterm*dynamicColors: true
xterm*utf8: 2
xterm*toolBar: false
5) ~/.xinitrc
# X11 Fonts
xset +fp /usr/share/fonts
Last edited by xtian (2014-07-27 14:43:23)Linux fonts are a muddle. Consoles can only display 256 characters, maybe 512. You simply cannot display many texts in a console. To navigate through the font mess in X, you need some familiarity with fontconfig. Xft uses fontconfig to select fonts. Fontconfig documentation is not user-friendly.
Droid is a family of fonts. My installation of the Droid family includes 27 different fonts. The command fc-list will list fonts matching a pattern. I usually filter the output by piping through grep. To list the Droid fonts, file name first followed by the fontconfig name, I use:
$ fc-list | grep Droid
Your fc-match results for Droid are from fontconfig doing its best to give you a readable display. Fontconfig cannot find a matching font for the name 'Droid', so it falls back to a "safe" font, 'Bitstream Vera Sans'.
XTerm or UXTerm or URxvt
I have my locale correctly configured, I think. I do not see any real advantage for uxterm over xterm. In my X resources, I include the lines,
xterm*termName: xterm-256color
XTerm*locale: true
For good glyph coverage with xterm, I have found 'DejaVu Sans Mono' to be among the better fonts. If I truly need utf8 coverage, I use urxvt. Urxvt allows one to use a ladder of fonts. If the character is not found in the first font listed, urxvt will search through the other listed fonts until it finds a glyph that can be displayed.
urxvt*font: xft:DejaVu Sans Mono:style=Book:antialias=false:size=8, \
xft:WenQuanYi Bitmap Song:size=8, \
xft:FreeSerif:style=Regular, \
xft:unifont:style=Medium:antialias=false
Here's a screenshot with three xterms using Droid, DejaVu Sans Mono, and Liberation Mono, plus one urxvt using the fonts in the code above. They all show the same portion of Markus Kuhn's utf8 test text. -
Urxvt + vim arrow keys in insert mode problem
There's this annoying problem I've been experiencing for a while now that I haven't been able to fix.
I'm running urxvt-unicode-256color as my terminal emulator. When I'm using vim in insert mode, accidentally hitting the arrow keys inserts A B C D or into the file. I don't use the arrows keys, but accidentally hitting them can get really annoying. I've read all sorts of ways to resolve this and none of the seem to work. The only way I was able to get around this was to set $TERM to be xterm, but that seems like a weird fix for this.
Is there another way of solving this?nan wrote:
karol wrote:
nan wrote:Is there another way of solving this?
Map the keys in vim to something useful or to nothing at all.
BTW, I have the same setup and my cursor keys result in movement like hjkl, so:
- check if you're using vim and not vi,
- change your settings in .vimrc.
I've already mapped the keys to do nothing. But it doesn't seem to work. I'm using map and imap, I've also use set t_ku, etc.
How do I check if I'm using vim as opposed to vi? I've already installed the vim package.
I have set nocompatible in my .vimrc but it doesn't seem to do anything.
Mr.Elendig wrote:set your TERM to rxvt-256color, make sure vim is not in compatible mode (and that you are actually using vim and not vi)
My term vairable is already set to rxvt-unicode.
Set it to 'rxvt-256color' -
Hi,
I'm trying to get the solarized theme for Vim working in the terminal http://ethanschoonover.com/solarized.
The problem I'm having is that it doesn't look like the pictures which are on the site; the colors are off. However, the solarized theme claims to support Vim terminal fine. I followed the readme about the setup.
I have copied the Xresources file provided with the solarized theme to my home folder, and I've set up my Vim appropriately. The colors are close, but not quite the same. My TERM setting is set to xterm, not xterm-256color, does this matter if my Xresources file is set up correctly? If not, how do I set up xfce4-terminal so that it does use xterm-256color? I tried changing the environment variable for it in the options instead of setting it in bashrc, but I just get VTE errors. I exported it manually in a terminal session and made sure tput colors outputted 256, but this made no difference when running Vim.
I tried using urxvt but it didn't work correctly and the fonts are really ugly, so I'd rather stick to xfce4-terminal if I can cause it doesn't require as much configuration.
I feel as if I'm missing something, this seems a lot more complicated than it should be to just get a colorscheme working in Vim terminal. Am I missing something?What do you mean when you say you've set up your vim appropriately? Terminal colorschemes from .Xresources and vim colorschemes from .vim files are different. Did you install the solarized colorscheme for vim? More precisely, did you install solarized.vim file in either ~/.vim/colors or /usr/share/vim/vim73/colors, or alternately install vim-solarized-git from the AUR? Did you add "colorscheme solarized" to your .vimrc? You can check if you've got the solarized colorscheme properly installed for vim by issuing the command "colorscheme solarized" in vim. If solarized isn't recognized as a colorscheme, it's not installed.
Last edited by bananagranola (2013-05-04 18:14:18) -
GNU Screen and 256 color terminal
Okay I've been racking my brain over trying to get 256 colors working while in screen.
If I run the 256colors2.pl script (found in xterm source) while in xterm / roxterm / xfce4-terminal it shows all colours as expected.
$ echo $TERM
xterm
Now I followed the wiki and added the "term screen-256color" line to my .screenrc
but if I run screen and run the 256colors script it doesn't show 256 colours (all messed up)
If I exit screen and manually set my $TERM
$ export TERM=xterm-256color
then run screen again, things seem to work properly.
But why?
I've read elsewhere on this forum that it's not good practice to force your $TERM so what should I do here?
What is the proper way? I just cant wrap my head around why 256 colors work when $TERM=xterm outside of screen, but not when in screen.
Last edited by Zer0 (2009-10-30 05:10:08)I recommend just using TERM=xterm-256color, as TERM=xterm does not reflect the terminal's capabilities. Replacing the command for your current terminal emulator with something like:
xterm -tn xterm-256color
should be sufficient.
I now use rxvt-unicode-256color from [community], which uses a 256color terminfo by default. Why xterm and friends don't use this when it is supported, I don't understand.
Last edited by chpln (2009-10-30 06:32:44)
Maybe you are looking for
-
How do I delete a large file without my computer crashing?
I am playing around with HD video and have a very large Quicktime File (12.5GB) that froze my computer while rendering. I need to delete it. (CRASH: screen freezes and dark line slowly comes from top to bottom and once entire screen is slightly dar
-
Error with data source while running hybernate program
Hi, An error has occured while running the hybernate example.I have deployed the application using the net weaver. The Error is : 500 Internal Server Error SAP J2EE Engine/6.40 Application error occurs during processing the request. Detail
-
IPhone 3G Disconnected while upgrading. Now it is not working!!
Hi. I have attempted to upgrade my iPhone 3G from 3.1.2 to iOS 4.1. This is exactly what happened: - Since I had an old iTunes version on my Win XP laptop, I had to uninstall and install the newest version (10) of iTunes. - I connected my iPhone to i
-
Dng and CR2 files display as icons in CS5
Now I have installed CS5 on three machines - a new installation on WIN7, and here everything is alright - no problem! Two machines running XP wth a previous CS4 installation uninstalled show up in Bridge with this problem: dng and CR2 files display a
-
Indesign Server CC Trial issues
The installation instructions states You need to download Adobe Provisioning Toolkit Enterprise Edition (APTEE) for using the InDesign Server trial The download link only refers to CS6, CS5.5 & CS5 not CC Since there is no Adobe Provisioning Toolkit