Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What i want to do is get this custom screen resolution with xrandr to run at every boot so i don't have to enter it myself or copy and past it this is the code i want to run at every boot

cvt 800 600 60 && xrandr --newmode "800x600_60.00"   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync && xrandr --addmode TV1 800x600_60.00 && xrandr --output TV1 --mode 800x600_60.00

i don't really want to play around editing configure/files just a nice easy script that will execute after or during every boot.

share|improve this question

2 Answers 2

If you want it to execute before the login manager, just put it at the end of /etc/rc.local

share|improve this answer
    
I don't really know what i'm doing but i added my code to /etc/rc.local saved and rebooted and it did nothing. I re-looked at it and saw that it said this script does nothing In order to enable or disable this script just change the execution bits. So how would i do that –  Matt May 26 '13 at 16:29

You can try putting your commands in ~/.profile. This file is executed when you log in, so you should see the resolution change at that point.

I can't guarantee this method though, because I don't know if your system has other startup scripts in the home folder.

As for rc.local, it should be executable by default. If it isn't, you can sudo nautilus to browse as root, then right-click on the file and select "Properties". From here you can make the script executable so it will work. You can also use chmod, but I thought you would prefer this method.

One more tip: running cvt only gives you the data you need for xrandr. You can drop it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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