Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently installed Ubuntu 12.10 on another PC, and decided to install XFCE (by installing xubuntu-desktop) Everything works great, except XFCE refuses to store my screen resolution and setup.

I have two monitors, each with different resolutions:

---------------- -----------------
|              | |               |
|Left 1680x1050| |Right 1920x1080|
|              | |               |
---------------- -----------------
      |  |             |  |

However when booting and logging in to the XFCE desktop I get:

----------------- ----------------
|               | |              |
|Right 1680x1050| |Left 1680x1050|
|               | |              |
----------------- ----------------
      |  |             |  |

i.e. The screen resolutions are incorrect and the displays are the wrong way around.

I have an xrandr command stored in a script which fixes this perfectly, but XFCE won't run it at startup.

I've tried both adding the script to the Startup Applications list in the System Settings (using the GUI) and modifying session-setup-script property of the LightDM config (as suggested here), and creating /etc/X11/xorg.conf with the settings.

None of these worked.

Also, might be worth mentioning, at the login screen (LightDM) the resolutions and orientations are correct.

Any tips?

[Edit] Okay, I was asked to provide more information... I'm not sure what else I can really add, so I'll just try to clarify...

I have a working shell script with the xrandr command that corrects the display setup, but I cannot get it to run at startup. The script works fine when run manually after logging in. I have set the script as the display-setup-script and session-setup-script in /etc/lightdm/lightdm.conf as recommended here, which works for the login screen, but as soon as I log in, and the XFCE desktop loads, the settings are ignored.

As mentioned, I've also tried adding the script to the Startup Applications via the Setting Manager GUI, which had no effect.

share|improve this question
possible duplicate of How do I setup dual monitors in XFCE? – Chris Wilson Mar 5 '13 at 16:58
I mention that I've tried the solution mentioned in that question. My problem is that the script isn't being ran at startup – user137832 Mar 5 '13 at 21:08
@user137832 I recommend adding detailed information about what you've tried and what happened (and why you believe the problem is that the script isn't being run), by editing your question. – Eliah Kagan Mar 6 '13 at 2:33

Just to check a couple of things...

Could you post the contents of your script?

Did you try adding a sleep command before the xrandr command to make sure the display loads before the script runs? Try...

sleep 5 && [your xrandr command here]

If 5 seconds doesn't work then increase to 10. Let us know the results.

share|improve this answer

Your Answer


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.