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.

I rotated my screen, an 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

5 Answers 5

up vote 7 down vote accepted
+50

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

greeter-setup-script=/etc/lightdm/greeter_setup.sh

Then make the file /etc/lightdm/greeter_setup.sh with the following contents:

#!/bin/bash
xrandr -o left
exit 0

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

share|improve this answer
1  
Changed to xrandr -o right. worked perfect. –  j0h Jan 24 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.

share|improve this answer
    
I will look into it, This is the sort of method I was trying to figure out. –  j0h Jan 24 at 22:59
    
Thanks, this helped me to fix XMonad. –  Peter Becich Jul 20 at 0:37

Falconer's answer helped me very much, but lightdm has since 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 files:

  • /etc/lightdm/lightdm.conf.d/80-display-setup.conf

    [SeatDefaults]
    display-setup-script=/etc/lightdm/display-setup.sh
    
  • /etc/lightdm/display-setup.sh

    #!/bin/sh
    xrandr -o right
    

Then make the script executable: sudo chmod a+rx /etc/lightdm/display-setup.sh

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: arandr
  • 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

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

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:

[SeatDefaults]
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.

Version

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

References

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.