0

I tried several methods from several forums but nothing worked for me. I want my display to come in portrait mode after boot.

After login if I manually rotate screen from terminal by command xrandr -o left it will rotating fine. But I am wondering in which file should I add this command so that my screen becomes portrait for permanent.

Liso
  • 15,677

1 Answers1

1

Add following to startup application :

/bin/bash -c "sleep 15&&xrandr -o left"

The reason adding 15 second of break to prevent xrandr command performed too early, which cause desktop to break while the desktop is still loading. @Jacob Vlijm explain why this is necessary.

enter image description here

Apply change to LightDM

Open your favourite text editor, I'll use gedit for example. With root privileges, because we're gonna modify system directory.

gksudo gedit /etc/lightdm/lightdm.conf

Add following entries to opened gedit.

[SeatDefaults]
display-setup-script=xrandr -o left

Save the file then.

WARNING: Haven't tested, because it's not something I want to (have to un-)do on my machine. If the X failed to start, use recovery mode to remove the file.

Liso
  • 15,677