Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using two separate X screens on two monitors and I would like them to be connected at the lower right corner. That is, if you move to the lower right corner of screen0 the mouse should appear at the upper left of screen1.

I do not want an entire edge of each monitor to be permeable to the mouse.

I modified the xorg.conf file like so:

Section "ServerLayout"
Identifier     "Layout0"
Screen      0  "Screen0" 0 0
Screen      1  "Screen1" Relative "Screen0" 1200 1000
InputDevice    "Keyboard0" "CoreKeyboard"
InputDevice    "Mouse0" "CorePointer"
EndSection

(screen 0's resolution is 1280x1024)

so there is a bit of overlap. However whenever I move the mouse to the bottom of screen0, the pointer appears at the upper left of screen1. And, the entire top of screen1 is permeable to the mouse and brings it to the lower left corner of screen0.

I have tried various numbers in following the "relative" statement - if I put 1280 1024 the mouse does not cross over at all. If I use 1280 1023 the entire right side of screen0 is permeable.

I haven't been able to find any documentation about how to explicitly tell the mouse where to crossover - is there some? It seems that xorg is being really aggressive in guessing where the mouse crossover should take place.

Does anyone know how to do this? Thanks!

share|improve this question
    
one really strange thing. say screen0 is 1000 pixels wide, and screen1 is positioned on x at +980. When I am at the very right edge of screen0 and move downwards, I show up 20 pixels from the top left of screen 1. as I move left, I get closer to the left edge of screen0 when I come out. and when I am more than 20 pixels away from the right edge of screen0, I come out at the very left edge of screen1. I believe that instead of passing through in this case, the mouse should just stay on screen0. –  fastmultiplication Mar 8 '11 at 16:18

2 Answers 2

When you are using multiple monitors - make sure with what configuration tool (or how) you manage the configuration. There are several ways how to configure just this one setting, how screens are positioned relative one to another.

I would try to check what tools (settings->Display, driver configuration tool) you have that shows configuration as it is working for you now, and in that tool change the settings, as far as my experience - Ubuntu can be configured the common Linux way, but then Ubuntu configuration tools kick in and override settings in Xorg or wherever you set them.

share|improve this answer
    
at first I used the nvidia program to do it but to set up what I have outlined above, I just edited xorg.conf. –  fastmultiplication Mar 8 '11 at 16:18
up vote 0 down vote accepted

SOLVED!

in https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/389519 there is a link to a program called XCreateMouseVoid. I used nZain's version (there is a later improved version that would work, but I haven't compiled it) to set up barriers that force the mouse certain directions. The link is https://bugs.launchpad.net/ubuntu/+source/libxrandr/+bug/373367/+attachment/1053824/+files/XCreateMouseVoid.tar.gz

Here are the barriers I created.

XCreateMouseVoid 1280 0 1280 1022 l &
XCreateMouseVoid 1280 924 1441 100 d &
XCreateMouseVoid 0 1023 1278 100 u &
XCreateMouseVoid 1180 1026 100 901 r &

it is so sweet and works like a charm.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.