0

I use Ubuntu 15.10 on my dell Ultrasmall optiplex 760 with a 19" dell display. My display supports a resolution of 1280x1024. But when I start ubuntu the resolution is 1024x768.

After long time googling i have found a solution to be able to force my resolution to 1280x1024 by using these commands in terminal:

sudo cvt 1280 1024 60
sudo xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
sudo xrandr --addmode VGA1 1280x1024_60.00

But when I restart Ubuntu I have to put these commands in the terminal again because the resolution doesn't stay at bootup.

I've found a lot of topics about this to make the resolution stay but none have worked for me because of missing files which I had to edit in order to make it stay at bootup.

Any help would be appreciated as I have been looking to solve this issue for almost a day.

Keep in mind I am a real noob, and therefore every step to take for a solution should be explained to me step by step.

Thanks.

TellMeWhy
  • 17,484

1 Answers1

0

You need to add the xrandr configurations to a startup file, so that you'll get your desired resolution upon reboot/startup:

  • Create a bash script, xrandr.sh for example, and place your xrandr commands into it:
#!/bin/bash
sudo xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
sudo xrandr --addmode VGA1 1280x1024_60.00
  • Make the script executable with chmod +x xrandr.sh

  • Search for "Startup Applications" in the dash, run it, and add the script as a startup application.

The commands will now run every time you log into your account.

NOTE: You don't use sudo when executing xrandr commands.

TellMeWhy
  • 17,484
  • Hi DevRobot ,do i create a bash script by creating a texfile and put after the name of the file .sh? What is chmod +x? do i have to type that plus name of the .sh file in the terminal? Sorry for all the questions , but because i saw what you are telling me to do already in a different topic, and tried that already, but failed because I must have been doing something wrong. I am a noob. Could you maybe explain step by step on how I have to proceed. thanks a lot. – Gianluca Mirci Nov 23 '15 at 19:43
  • @GianlucaMirci first comment - yes. second comment - the chmod +x makes the file executable. Include the .sh part in the command. – TellMeWhy Nov 23 '15 at 20:13
  • Hi DevRobot, that didnt work. I also notice than when i double click xrandr.sh file I created it should also set the resolution to 1280x1024 but it opens in a text document instead. So what I think is that that is the reason it doesnt work at startup. perhaps something is not right with the .sh file I created. I did put it a startup programs just like you said I also made it executable. – Gianluca Mirci Nov 24 '15 at 08:35
  • @GianlucaMirci are you using gnome or the default unity? – TellMeWhy Nov 24 '15 at 11:11
  • I am using unity. – Gianluca Mirci Nov 24 '15 at 12:25