Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I started using xmonad on an Ubuntu box with two monitors attached. When I start xmonad the same layout is duplicated on both monitors. For example: if I have a layout where Chrome and emacs are tiled side-by-side, then I see chrome on the left side of both monitors, and emacs on the right side of both monitors.

Is there a way to say "chrome, go to the left monitor, emacs, go to the right monitor"?

share|improve this question

migrated from stackoverflow.com Aug 31 '11 at 22:32

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 3 down vote accepted

To me it sounds like the view is cloned. There are two steps to fixing your problem:

  1. Unclone the views and set them side by side
  2. Learn how to move windows between desktops in xmonad and how to switch desktops

To uncloneuse xrandr to set different views for each monitor.

Open a console and type:

$xrandr 

It should display something along the lines:

LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800       60.0*+
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 connected (normal left inverted right x axis y axis)
   1024x768       60.0 +   85.0     75.1     70.1  
   1280x1024      75.0     60.0  
   1280x960       75.0     60.0  
   1152x864       75.0  
   832x624        74.6  
   800x600        85.1     72.2     75.0     60.3     56.2  
   640x480        85.0     72.8     75.0     60.0  
   720x400        70.1  
TV1 disconnected (normal left inverted right x axis y axis)

In my case LVDS1 is the laptop and VGA1 is a connected projector.

To set the projector left of the monitor use:

$xrandr --output VGA1 --auto --left-of LVDS1

This will use the default resolution for the projector (in this case 1024x768) and place the view left of the laptop screen.

To set a custom resolution use

$xrandr --output VGA1 --mode 1280x800 --left-of LVDS1

In your case it will be something along the lines:

$xrandr --output MONITOR2 --auto --left-ot MONITOR1

The shortcuts for moving apps between desktops and switching desktops are

Mod Key + 1,2,3, - 9 for bringing the desktop to the monitor the mouse is on

Mod Key + SHIFT + 1,2,3, - 9 for sending the currently focused application to the particular desktop

The default Mod Key for xmonad is Alt but you can set it to the Windows key in order to free Alt for use in applications.

share|improve this answer

Sure there is, but you have to enable xinerama for this.

Make sure that you have setup xinerama correctly.

share|improve this answer

It sounds like you have not setup TwinView yet? If you follow the link and do that then it will start working correctly; I remember having the same problem. And there are plenty of example configs that work well in multi-headed environments; like my own one for example (though it is meant for Dvorak users).

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.