vim won't open under screen
I just started using screen again, but it seems that vim won't open while I'm running screen. I can open elvis fine, as well as lynx, but no vim. It's the same whether I use Konsole or xterm. When I type the command, the cursor just moves to the next line and doesn't do anything. There's no processor activity, just nothing. When I list the processes, though, it shows the vim process.
Any thoughts? Things I can try/look into? |
Inside screen, what's the value of the TERM environment variable? (echo $TERM). Also, can you post your ~/.screenrc if it exists?
|
Here you go. I think everything's pretty much standard Slackware, except my escape command...
~$ echo $TERM screen ~$ cat ~/.screenrc escape `` vbell on autodetach on startup_message off pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." defscrollback 1000 termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l termcapinfo xterm* OL=100 termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' termcapinfo xterm 'kh=\EOH:kI=\E[2~:kD=\E[3~:kH=\EOF:kP=\E[5~:kN=\E[6~' termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007' termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' termcapinfo xterm* be termcapinfo wy75-42 xo:hs@ termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J termcapinfo 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@' termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC termcapinfo linux C8 bind k bind ^k bind . bind ^\ bind \\ bind ^h bind h bind 'K' kill bind 'I' login on bind 'O' login off bind '}' history register [ "\033:se noai\015a" register ] "\033:se ai\015a" bind ^] paste [.] |
I had a similar problem some time ago and I recalled it was due to the TERM environment variable, but yours is OK. You could try posting the output of the "env" command to try to see if there's anything weird, and also your vimrc if it exists and you could also try to run "strace vim" to see if there's anything weird. BTW, when you paste something use the "code" tag or it will be mangled by the forum software.
|
Thanks for the ideas & for looking at this stuff. Here's my env output. I ran a diff on the output from running screen & not running it, and the main difference seems to be the whole TERMCAP stuff. The TERM variables also changes from xterm to screen.
Code:
CPLUS_INCLUDE_PATH=/usr/lib/qt/include:/usr/lib/qt/include Code:
set nocompatible |
I've compared your output of env with mine and there don't seem to be big differences. A bit in TERMCAP regarding the number of available lines and columsn, a bit in some KDE environment variables indicating that I use yakuake and you use konsole, etc. Everything seems to be minor, so I don't really know what more to check. See if you can resolv your hostname fine (slackbox.slacknet) and you have included an entry for it in /etc/hosts.
Code:
--- my-env.txt 2007-10-01 12:06:43.000000000 +0200 |
I do have any entry in /etc/hosts, and I can ping slackbox.slacknet fine, so I think that means everything's OK...
I noticed that vim is now mouse-aware in slackware (or if it was before, I didn't notice it). Now you can select text when running vim in Konsole, and vim changes to visual mode. Anyway, could that be something that's not working under screen? I'm kind of grasping at straws, because I really don't know what kind of problem it is. :( |
OK, I've made progress. When I reboot, it works. But, when I got my dhcp address, where I was sending a different hostname, it stopped working. So, I changed my hostname to match what I was sending to the dhcp server, and that's not a problem anymore.
The other problem involves my svn KDE4. If I switch to my kde4 user & launch a KDE4 application from screen, vim stops working. I'm not sure exactly sure what's happening here, but I can work around it for now. |
Has anyone had any luck identifying the source of this problem, and a solution? I'm currently experiencing this problem and haven't yet found a permanent workaround.
I'm running Slackware 12.0 thanks, Kierse |
Did you upgraded some packages from slackware current such as gtk+2?
|
Not that I know of but its been a while since I've had to update anything on my machine. I've been experiencing this particular problem for quite some time but it hasn't really affected me until recently.
I'll compare my installed package against the Slack 12 list and see if there are any differences. |
So I compared a list of installed packages on my machine against the Slack 12 list of packages and didn't notice anything unusual.
I did however come up with a functional (yet hackish) work around for anyone having this problem: while working in screen, each virtual terminal's environment variable TERM has a value of 'screen'. Setting this variable to 'xterm' (ie. enter TERM='xterm' in command prompt) in every virtual terminal you wish to run vim in seems to correct the issue. Vim obviously uses this variable for something but isn't written to properly handle a TERM value of 'screen'. |
So I compared a list of installed packages on my machine against the Slack 12 list of packages and didn't notice anything unusual.
I did however come up with a functional (yet hackish) work around for anyone having this problem: while working in screen, each virtual terminal's environment variable TERM has a value of 'screen'. Setting this variable to 'xterm' (ie. enter TERM='xterm' in command prompt) in every virtual terminal you wish to run vim in seems to correct the issue. Vim obviously uses this variable for something but isn't written to properly handle a TERM value of 'screen'. |
I have a vague memory of something involving a bad interaction with gpm, but that's all I can remember at the moment. Try killing off gpm and see if the problem remains.
|
Quote:
|
All times are GMT -5. The time now is 05:09 PM. |