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.

It seems like there is a bug in gnome-shell. It's just impossible for me to add a wallpaper that will be spanned on boths screens. It's either spanned on the first and tiled on the second screen or vice versa. It also gets even more tiled when I click on the Activities button...

Maybe this is related to the different resolutions: Laptop Screen: 1440x900, External Monitor: 2048x1152.

How can I fix this?

share|improve this question

1 Answer 1

Ok, found the answer myself. You can't just use xrandr to change the primary screen (to get the panel on your desired monitor). It will work but leads to the bug described above.

To make this work properly, you first have to change a gnome setting:

gconftool-2 -s --type boolean "/desktop/gnome/shell/windows/workspaces_only_on_primary" 0

By default, gnome uses the config file "~/.config/monitors.xml" to enable the monitor(s) the right way and also enable a second monitor when found. There will be a "configuration" group for every combination of connected monitors previously detected. In my case, there are 2 of those groups. One for "2 monitors connected" and one for "1 monitor connected". (by the way: you can change that config file by using the gnome monitor settings dialog)

E.g:

First one: "2 monitors detected"

<configuration>
  <clone>no</clone>
  <output name="LVDS1">
      <vendor>APP</vendor>
      <product>0x9ca3</product>
      <serial>0x00000000</serial>
      <width>1440</width>
      <height>900</height>
      <rate>60</rate>
      <x>0</x>
      <y>252</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
  </output>
  <output name="VGA1">
  </output>
  <output name="HDMI1">
      <vendor>SAM</vendor>
      <product>0x041f</product>
      <serial>0x4d593233</serial>
      <width>2048</width>
      <height>1152</height>
      <rate>60</rate>
      <x>1440</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>no</primary>
  </output>
  <output name="DP1">
  </output>

Second one: "1 monitor detected"

  <configuration>
  <clone>no</clone>
  <output name="LVDS1">
      <vendor>APP</vendor>
      <product>0x9ca3</product>
      <serial>0x00000000</serial>
      <width>1440</width>
      <height>900</height>
      <rate>60</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
  </output>
  <output name="VGA1">
  </output>
  <output name="HDMI1">
  </output>
  <output name="DP1">
  </output>

In order to get the second screen as primary when connected, you only have to switch the "primary" values in the first "configuration" group. This way, gnome-shell will automatically detect and enable the second monitor as primary and of course, without any bugs like dead space on desktop or tiled wallpapers...

share|improve this answer
    
By the way: This will most likely not work with closed source graphic card drivers like fglrx or nvidia –  Benjamin Grieshaber Feb 7 '12 at 9:31

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.