2

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?

Zephram
  • 121

1 Answers1

0

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.