Sunday, January 28, 2018

bash - Startup script Problem




I am new to Ubuntu.I want to run this script every time my system reboots.Is there a way to do that?Thanks in advance for help.



# !/bin/bash
#fix resolution problem
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 - hsync +vsync
xrandr --addmode VGA1 1440x900_60.00


First of all make your file executable by using this command :




chmod +x file_name


after you go to the file location



then add this line to



/etc/rc.local



here is the line:



/path/to/file/file_name


next time you restart your PC i think it will work well.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...