Re: Working script won't work in rc.local

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





"Mikkel L. Ellertson" <mikkel@xxxxxxxxxxxxxxxx> wrote:
Barry Yu wrote:
>
>
> */Barry Yu /* wrote:
>
>
>
> */Paul Lemmons /* wrote:
>
> ------- Original Message --------
> Subject: Working script won't work in rc.local
> From: Barry Yu
> To: Fedora list
> Date: 02/18/2008 09:10 AM
> > My working script won't work at startup when I inserted it into
> > rc.local - It works perfectly in terminal when I manually
> execute it
> > there. Am I putting my script in wrong place and how can I auto
> > execute it when starting up F8?
> > Thanks for helping
> >
> What is the first line of your script? Is it "#!/bin/bash"? Is
> it marked
> as executable? Is there more information you can give as to what is
> happening?
> --
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
>
> Here is my rc.local file, my script is the last line;
>
> #!/bin/sh
> #
> # This script will be executed *after* all the other init scripts.
> # You can put your own initialization stuff in here if you don't
> # want to do the full Sys V style init stuff.
>
> touch /var/lock/subsys/local
> /home/Scripts/./dumon
> --
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
>
> Below is the entire content of my script;
>
> xrandr --output VGA --auto --output TMDS-1 --auto --right-of VGA
>
It looks like xrandr requires connecting to an X server. When run
from rc.local, it does not have one. This is one of the things that
can cause scripts that work fine when you are logged in to fail when
run in startup scripts or cron jobs. Another thing to watch out for
is that the environment is not the same when running from the init
scripts or a cron job.

When you run the script from an xterm, DISPLAY is set, and you have
the proper authorization to connect to the X server.

Mikkel
--

Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
How can I achieve auto excute my dumon script when starting up F8?
Now I put my script in /usr/bin/domon, and modified the re.local file  like  below but still cannot execute the dumon script;

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/usr/bin/dumon
 
-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux