LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Mouse stops working fully after screen detaches (https://www.linuxquestions.org/questions/slackware-14/mouse-stops-working-fully-after-screen-detaches-616660/)

Anithen 01-27-2008 03:21 PM

Mouse stops working fully after screen detaches
 
I'm using Slackware 11 on 2 computers with Fluxbox as my window manager. If I open rxvt, start either a new screen or attach one in progress (screen -r) and then detach it, I will not be able to use any Fluxbox keybindings, access the right-click menu by right-clicking the root window, use the scroll wheel to change desktops, etc. The mouse wheel works when used over the toolbar, though. This problem also happens after using apps like emelfm and k3b, but it doesn't happen regularly enough for me to reproduce. I really don't know what can be causing this, but it has to be a Fluxbox problem, because I can still do ctrl+alt+backspace to kill xorg and startx again as an inconvenient fix for this problem. Any help provided is greatly appreciated. I've been reading about Fluxbox, linux mouse problems, screen, and searching for "detaching problem screen" and other search variations for so long, but to no avail. I hope someone knows about this. Thanks so much.

Anithen 01-29-2008 01:41 PM

Saving files in vim seems to help. Reproducible...
 
Ok, I'm making a little bit of progress. Fluxbox was at the point where I could no longer pass commands to it (no root menu, no desktop wheeling, no keyboard shortcuts, etc), but I then saved a file in vim (ZZ) and doing that restores functionality. So, I guess now my question is "What changes behind the scenes when you save a file in vim using a terminal such as rxvt or xterm?" Something behind the scenes is what resolves the problem, allowing us to fix all instances of it, whether functionality is lost after detaching screen or after using other apps: emelfm, k3b, pan, firefox, etc.

Thanks in advance for any assistance provided.

Anithen 01-29-2008 02:21 PM

Oh, more about the newest revelation: If I copy and paste text into screen using the middle click (mouse wheel) it also disables the aforementioned functionality. The same goes for copying text with screen. At the moment I copy the text I need and come out of copy mode I lose the same functionality.

dive 01-29-2008 03:05 PM

Quote:

Originally Posted by Anithen (Post 3039078)
If I copy and paste text into screen using the middle click

Do you mean in vim? Or anywhere? You could try playing with mouse settings in .vimrc to see if it helps:

set mouse=r

Anithen 01-29-2008 05:20 PM

Hello, Dive. It was happening in screen and regular rxvt, but at the moment copying and pasting with the middle wheel isn't effecting anything. Copying and pasting inside of screen, switching back and forth between windows is consistently messing up the mouse, though. Vim comes into play nicely, because it's the first thing I've found to fix this without having to restart X. All I have to do is add some garbage characters to a test file and ZZ to save it. It's weird, because I actually have to add characters to the file to make it work. If I add one or two it won't work. I actually have to put about 4 or more characters, save it, and then resume using the computer normally. This excites me, though, because if I can find out what vim is doing behind the scenes maybe I can fix this or at least make an alias for whatever command is being issued. Then at least I'd be able to type "a" whenever this happens.

Alien_Hominid 01-30-2008 12:14 AM

What does happen if you go to any other virtual console (no X) and try pasting there? I have similar problem with virtual console myself and I found that pasted text is incosistent and I suspect that this is gpm related. It doesn't seem to affect X though, but I wasn't running fluxbox last time I checked.

Anithen 01-30-2008 12:53 AM

Good evening, Alien Hominid. I like that game and its genre.
I don't notice a difference when I paste text into the virtual console. Only thing weird I see about that is that text from X doesn't copy over to vc, and the same vice versa; text from vc won't paste into X.

Anithen 02-27-2008 09:35 PM

Recap
 
I would like to just recap on this just in case I haven't provided enough information for help. I am using the newest fluxbox. I am using slackware 11. I am using the version of screen that came with the distro. If I use screen in any terminal program (rxvt) and detach the screen or switch between different windows within the screen session I won't be able to use the mouse or the keyboard shortcuts the same as before. Any mouse commands that I can use while the mouse is over the root window (the wallpaper area, or area that's not occupied by the fluxbox toolbar or another window) won't work, so that means no right clicking or middle-clicking takes effect. Keyboard shortcuts that don't work are all of the fluxbox keybindings in my ~/.fluxbox/keys file. This makes is so that, since I don't have any icons on my desktop, if I accidentally close rxvt after detaching screen or switching between windows (ctrl+a a), I won't have the ability to launch any other applications unless I do ctrl+alt+backspace: the only keyboard shortcut to work once everything's messed up.

Temp fix: open vim, press i for insert mode, and then ESC to exit insert mode. This makes everything normal again. What is causing this? How can I fix this? Thanks.

Anithen 03-23-2008 11:01 PM

Solved!!!
 
Good evening to all. This problem was upsetting me for a while, and I was even going to upgrade when I don't fully think it's time yet. Even though I'm enjoying idesk, I only started using it because of this problem. Mouse shortcuts, keyboard shortcuts, multimedia keys, etc all weren't working during the above mentioned situations, but I also forgot to mention that the problem would arise even if I did, for instance, ctrl + a a when screen wasn't running. I found that pressing ESC in the terminal will set things right again, no matter what I'm currently doing in the terminal (rxvt, in my instance).

This does not fix the problem, but it's so easy to fix that consider it one. I also noticed that after pressing ESC to fix this, the problem wouldn't reoccur: after I just pressed ESC to fix this, I was switching back and forth through screen windows without the problem happening. I'm very happy, and I hope someone out there who's read this with the same problem finds joy with this, too.

Anithen 04-25-2008 09:27 PM

...And now this is solved to a further extent, since I now realize I don't need rxvt open in order to press ESC in side of to get fluxbox keyboard commands and mouse commands working again. I can just press ESC 3 times after clicking on empty desktop space, and I'm back in business.

I just realized I didn't have rxvt open and my right click menu wasn't working nor were the keyboard shortcuts. I was just about to restart X, when I tried this.

Hope this helps someone,

Anithen 06-13-2008 10:51 PM

Months later, I know a little more about this:

1. When I cannot mouse or use keyboard commands pressing ESC 1 time does the trick.

2. This can happen anywhere in fluxbox if you try doing a screen keyboard command, eg; CTRL+A A or CTRL+A C

3. I think I discovered how it starts, as I accidentally caused the problem on a once "clean" Slackware 12 install.

4. More on this here:

http://www.linuxquestions.org/questi...2/#post3184323

willow_jones 07-28-2008 04:54 AM

For any kind of PC up gradation or PC maintenance a best place i know is PC Repair Experts you can have a look by yourself i hope you won't be disappointed because one of my friend referred me this site and by that time i am with this site and recommending others


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