SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
Here's my .vimrc (I don't think there's anything that's a problem, because it's the same problem whether or not I use it...):
Code:
set nocompatible
set softtabstop=3
set shiftwidth=3
syntax on
set foldmethod=marker
set autoindent
set nobackup
set number
set bs=2
set incsearch
"MAPS & ABBREVIATIONS
"mutt-style page up/down
noremap <Space> <PageDown>
noremap - <PageUp>
noremap t e
noremap T E
"insert/append a char & stay in normal mode
noremap e i <esc>r
noremap E a <esc>r
"alternative to <esc>
imap ii <esc>
"inoremap <tab> <esc>
"nnoremap > i<tab><esc>
"format paragraph
map f gqap
"yank whatever's selected into "w
map <F1> "wy
map <F2> "wp
imap <F2> <esc>"wpa
"grab a word and then paste it
imap <F3> <esc>B"zyWTa
imap <F4> <esc>"zpa
"tab stuff
map <F5> :tabnew<CR>
map <C-n> :tabnew<CR>
imap <F5> <esc>:tabnew<CR>i
imap <C-n> <esc>:tabnew<CR>i
map <F6> :tabprevious<CR>
map <C-Left> :tabprevious<CR>
map <F7> :tabnext<CR>
map <C-Right> :tabnext<CR>
imap <F6> <esc>:tabprevious<CR>i
imap <C-Left> <esc>:tabprevious<CR>i
imap <F7> <esc>:tabnext<CR>i
imap <C-Right> <esc>:tabnext<CR>i
map <F9> :set number!<CR>
imap <F9> <esc>:set number!<CR>i
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.
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.
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.
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.
For the sake of posterity, I have been running into this same problem -- vim freezing when used inside screen -- and disabling gpm was the answer. Thanks, Dagmar.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.