Rotating screen on Fedora

14,078

I'm not sure exactly what login manager Fedora 19 uses by default - you haven't said which you happen to be using, if not the default. Regardless, I know that the LightDM display manager (Ubuntu's current default) is usable in Fedora, so here is an answer for LightDM. Other login managers should have something equivalent.

With that in mind...

There should be a directory called /etc/lightdm/lightdm.conf.d which is where custom configurations can be stored. You can create a new file in that directory (you'll need to be root) called 20-startup-script.conf:

[SeatDefaults]
display-setup-script=/usr/local/bin/rotate-screen

In the script /usr/local/bin/rotate-screen, you can write a script which rotates the screen, and LightDM will run this script before it displays the login screen. In order to rotate the screen, you'll need to use a tool called xrandr.

You'll have to play around with xrandr on the command line to get an idea of what options you should be using, but you can do something like this:

$ xrandr
Screen 0: ...
LVDS1 connected ...
    1366x768 ...
    ...
VGA1 disconnected ...
....

Names like LVDS1 and VGA1 are output names, and you'll want to keep these in mind. You can figure out which display name corresponds to the monitor you want to rotate by doing the following:

$ xrandr --output LVDS1 --rotate left

If the screen rotates, then you've found the right display name (in this case, LVDS1).

You can then write the following script into /usr/local/bin/rotate-screen (requires root access):

#!/bin/sh
xrandr --output LVSD1 --rotate left

You can then chmod +x /usr/local/bin/rotate-screen (also requires root), and then log out. If you did it correctly, the login screen should be rotated, and LightDM will rotate the screen before every login.

Share:
14,078

Related videos on Youtube

eof
Author by

eof

Updated on September 18, 2022

Comments

  • eof
    eof over 1 year

    I run Fedora 19 under KDE and would want to configure two 27" screens rotated 90 degrees. My problem is that while I can go to:

    System Settings -> Display and Monitor

    and rotate them 90 degrees, this setting does not work in the login screen. Therefore, my desktop is correctly rotated, but in the login screen I have to bend sideways to look at the screen.

    A plus would also be a way to get the output rotated in the text mode console. I'm sure that this won't be doable for the kernel boot output, but once login terminals are loaded I should be able to instruct the framebuffer somehow to rotate the output.

    • N. D.
      N. D. over 9 years
      Which display manager are you using?