Working script won't work in rc.local

Gordon Messmer yinyang at
Mon Feb 18 18:21:58 UTC 2008

Barry Yu wrote:
> Below is the entire content of my script;
> xrandr --output VGA --auto --output TMDS-1 --auto --right-of VGA

1: A shell script needs a shebang:

xrandr --output VGA --auto --output TMDS-1 --auto --right-of VGA

2: X won't even be running when rc.local runs, so you can't do anything 
with X tools there.

3: You can do this in the xorg.conf file.  You'll need to modify the 
"Device" section, and add one line for each of your monitors.  The 
format of the line is Option      "Monitor-<port name>" "<id>".  The 
port name is the one that the xrandr tool prints out, and the id is 
whatever you want.  You'll use that id in the "Monitor" sections to 
specify the xrandr options.  For example, my system has these three 
sections in xorg.conf:

Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        Option      "Monitor-VGA-0" "first"
        Option      "Monitor-DVI-0" "second"

Section "Monitor"
        Identifier  "first"

Section "Monitor"
        Identifier  "second"
        Option      "RightOf" "first"

More information about the fedora-list mailing list