<br><br><b><i>"Mikkel L. Ellertson" <mikkel@infinity-ltd.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Barry Yu wrote:<br>> <br>> <br>> */Barry Yu <barryyu-cts@sbcglobal.net>/* wrote:<br>> <br>> <br>> <br>>     */Paul Lemmons <paul.lemmons@tmcaz.com>/* wrote:<br>> <br>>         ------- Original Message --------<br>>         Subject: Working script won't work in rc.local<br>>         From: Barry Yu<br>>         To: Fedora list<br>>         Date: 02/18/2008 09:10 AM<br>>          > My working script won't work at startup when I inserted it into<br>>          > rc.local - It works perfectly in terminal when I manually<br>>         execute it<br>>          > there. Am I putting my script in wrong place and how can I auto<br>>          > execute it when starting up F8?<br>>          > Thanks for helping<br>>      
    ><br>>         What is the first line of your script? Is it "#!/bin/bash"? Is<br>>         it marked<br>>         as executable? Is there more information you can give as to what is<br>>         happening?<br>>         -- <br>>         fedora-list mailing list<br>>         fedora-list@redhat.com<br>>         To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list<br>> <br>> <br>>     Here is my rc.local file, my script is the last line;<br>> <br>>     #!/bin/sh<br>>     #<br>>     # This script will be executed *after* all the other init scripts.<br>>     # You can put your own initialization stuff in here if you don't<br>>     # want to do the full Sys V style init stuff.<br>> <br>>     touch /var/lock/subsys/local<br>>     /home/Scripts/./dumon<br>>     -- <br>>     fedora-list mailing list<br>>     fedora-list@redhat.com<br>>     To unsubscribe:
 https://www.redhat.com/mailman/listinfo/fedora-list<br>> <br>> <br>> Below is the entire content of my script;<br>> <br>> xrandr --output VGA --auto --output TMDS-1 --auto --right-of VGA<br>> <br>It looks like xrandr requires connecting to an X server. When run <br>from rc.local, it does not have one. This is one of the things that <br>can cause scripts that work fine when you are logged in to fail when <br>run in startup scripts or cron jobs. Another thing to watch out for <br>is that the environment is not the same when running from the init <br>scripts or a cron job.<br><br>When you run the script from an xterm, DISPLAY is set, and you have <br>the proper authorization to connect to the X server.<br><br>Mikkel<br>-- <br><br>   Do not meddle in the affairs of dragons,<br>for thou art crunchy and taste good with Ketchup!<br><br>-- <br>fedora-list mailing list<br>fedora-list@redhat.com<br>To unsubscribe:
 https://www.redhat.com/mailman/listinfo/fedora-list</paul.lemmons@tmcaz.com></barryyu-cts@sbcglobal.net></blockquote>How can I achieve auto excute my dumon script when starting up F8?<br>Now I put my script in /usr/bin/domon, and modified the re.local file  like  below but still cannot execute the dumon script;<br><br>#!/bin/sh<br>#<br># This script will be executed *after* all the other init scripts.<br># You can put your own initialization stuff in here if you don't<br># want to do the full Sys V style init stuff.<br><br>touch /var/lock/subsys/local<br>/usr/bin/dumon<br> <br>