I found these answers, but they're old and I wonder if there are any new solutions for this.

This answer says add xrandr commands to /etc/gdm/Init/Default.

How to set the monitor to its native resolution which is not listed in the resolutions list?

And this answer says to edit /etc/X11/xorg.conf which I don't have on my ubuntu 14.04.

How can I make xrandr customization permanent?

This explains how to create an xorg.conf file in case I don't have one.

Where is the X.org config file? How do I configure X there?

I've also found this method of running a script on startup to add the required resolution and setting it to the relevant screen. It looks a bit hacky and I'd like to know if there's a better way.

How to add a resolution in display settings?

Are these relevant to 14.04 in 2017?


Here are the steps that I used to keep xrandr commands permanent. First, make a file in your home folder called .layout.sh. Next, open it with your favorite text editor. Put the following line at the top: #!/bin/bash. Below that, put all of the xrandr commands you want to be run on start. Next run the following command in terminal:

sudo chmod +x ~/.layout.sh ; echo "DISPLAY=:0 bash ~/.layout.sh" >> .profile ; echo '' >> .profile

You will need to add the .layout.sh file and run the command for all of the users who you want to have the monitor settings.

Basically, this runs the XRandR commands when you login.

  • I think this method is mentioned in the last link I provided in the question. – Zephram Apr 8 '17 at 6:43
  • Does it not work the way you expected? – Feldspar15523 Apr 8 '17 at 16:37
  • It didn't work. I'm now searching in the direction of drivers for on-board intel graphics cards. – Zephram Apr 12 '17 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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