Ubuntu – How to easily open the Launcher with a secondary monitor to the left

11.04launchermultiple-monitorsunity

I have two monitors (24" as main and a 19" to the left).

Each time I want to swap to a different application or launch a new one, the launcher seems a little problematic to come up. Even though moving my mouse across the top Ubuntu logo gets it up, it still seems quite spasmodic.

Anybody else found a problem and is there a solution?

Best Answer

Create a Mouse Void

This is quite a long answer that I felt is better kept separate from my other one.

So that you understand where this solution came from, my monitor layout is as follows:

desktop

The two black area 1280x88 are off the screen but my mouse can still enter this due to an X bug. The workaround is a small program that prevents the mouse entering this void called XCreateMouseVoid.

Home Button Mouse Stopper

You can also use XCreateMouseVoid to create a small box that the mouse will stop against when pushed into the top left corner of the primary screen. This is what I have shown in green area of this image:

mousevoid

Installing

  1. Download XCreateMouseVoid and extract the files to your home folder
  2. Open the folder in Terminal and run this command:

    cd ~/XCreateMouseVoid && make
    
  3. Test the program with values:

    ~/XCreateMouseVoid/XCreateMouseVoid 0 0 1280 88
    
  4. Add to Startup Applications so its always runs upon bootup.

Calculate Values

The values required for XCreateMouseVoid are: x, y , w, h

  • x & y refer to the start co-ordinates of the rectangle. These co-ordinates are based upon the whole desktop area and not individual monitors.
  • w & h refer to the width and height of the rectangle

For my setup to stop the mouse entering the top and bottom black 1280 x 88 areas along with stopping it travel past the Home Button, I run two instances of the program with these values:

XCreateMouseVoid 0 0 1280 88
XCreateMouseVoid 0 1112 1280 88

Small Rectangle

If you have a different setup you can create the small rectangle as I mentioned earlier. The rectangle measures 60 x 25, which is the minimum width needed to properly stop the mouse.

The only value you need to change is x which is calculated by subtracting 60 from your secondary monitor's width. e.g. 1280 x 1024 monitor I subtract 60 from 1280 to get the value 1220 for XCreateMouseVoid:

XCreateMouseVoid 1220 0 60 25

Trapped Mouse Cursor

Occasionally the mouse cursor can jump into the created mouse void and become trapped. The solution is to press either the Super or Menu key so that a menu opens and frees the mouse cursor.

Related Question