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 rotated my screen, and once I login, it works fine. But, the greeter (login) screen hasn't got the message that things are rotated 90 degrees. How can I change the rotation of the login screen?

enter image description here

UPDATE: lock screen is in correct position. I only see this when I boot, or log out.

share|improve this question
up vote 13 down vote accepted

Add this line to the /etc/lightdm/lightdm.conf file (in the [SeatDefaults] section):


Then make the file /etc/lightdm/ with the following contents:

xrandr -o left
exit 0

Then make it executable with sudo chmod +x /etc/lightdm/ Then reboot.

share|improve this answer
Changed to xrandr -o right. worked perfect. – j0h Jan 24 '14 at 23:00

Another option that should work is to copy ~/.config/monitors.xml to /var/lib/lightdm/.config .

This certainly works for my monitor position and resolution information, so I would assume it would work for rotation too.

Edit: For maximum flexibility, one could make a symbolic link between the above:

sudo su
cd /var/lib/lightdm/.config
ln -s /home/<your_user>/.config/monitors.xml .
chown -h lightdm:lightdm monitors.xml

This way, if your monitor setup changes in the future, it will automatically reflected to the login screen. Notice the necessary -h flag on the chown command, as explained in chown is not changing symbolic link.

share|improve this answer
I will look into it, This is the sort of method I was trying to figure out. – j0h Jan 24 '14 at 22:59
Thanks, this helped me to fix XMonad. – Peter Becich Jul 20 '14 at 0:37
Making the link didn't work for me, I did the permission thing as described but it still told me that the permissions were wrong. Copying the file worked fine. – LovesTha Jun 17 '15 at 22:15

14.04 and above

Falconer's answer helped me very much, but lightdm changed for Ubuntu Trusty 14.04. There is no longer a /etc/lightdm/lightdm.conf file on my system. lightdm has now gone the "Debian way" and had its configuration broken up into a conf.d directory. You now need to create the following file:


display-setup-script=xrandr -o right

As suggested in Electric Head's answer, the xrandr command can go right in this file, no need to create a separate script.

If you want a xrandr command that deals with multiple monitors, you can use arandr to generate it for you. My xrandr command actually ends up being:

xrandr --output DVI-1 --mode 1920x1080 --pos 1080x0 --rotate left --output DVI-0 --mode 1920x1080 --pos 0x0 --rotate right

To get that I used the following commands:

  • sudo apt-get install arandr
  • arandr
  • Use the GUI to configure your monitors like you want them:

  • Use "Layout" -> "Save As" to save it to a file that contains your monitor configuration command.

With this in place, my monitors are properly rotated when I log in as well, so there is no need to do additional configuration in Gnome, XFCE, or KDE. The only other place that I need to configure monitor rotation is in virtual framebuffer terminals, as explained in How do I rotate my display when not using an X Server?

share|improve this answer
FWIW, My clean 32-bit 14.04 install has no /etc/lightdm/lightdm.conf.d/ directory and creating one then following the rest of the instructions here didn't work. The instructions in Electric Head's answer did work, though. I'm not sure why one worked and not the other, but just wanted to leave this comment for posterity's sake in case someone else encounters the same situation as I had. – reirab Jan 12 '15 at 22:53

falconer pretty much nailed it but I'd like to point out a simplification.

You can put an xrandr command directly in /etc/lightdm/lightdm.conf as a system hook. You don't need to create a shell command to call a separate script containing a shell command (though of course you can if you see a reason to do so). Also, there's no mention of /etc/lightdm/lightdm.conf.d/ in man lightdm and I didn't have either this or lightdm.conf on my system. So, although I'm sure it probably does work as suggested by Stephen, again, you don't need to do this.

So, if it doesn't exist already, something along the lines of the following in /etc/lightdm/lightdm.conf (sudo, obviously) should work just fine:

display-setup-script=xrandr --output DVI-1 --auto --rotate left

See man xrandr for configuration options.

BTW: I could probably have got away with comments/edits here but I don't have the rep and I did want to add the sources for this information.


$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.1 LTS
Release:    14.04
Codename:   trusty


share|improve this answer

Have you tried xrandr -o value? As a value use either left or right

Also you can create a custom shortcut by following this HOW TO

share|improve this answer

protected by Community Dec 16 '14 at 14:36

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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