You are not logged in.

#1 2009-09-22 16:32:22

clearloon
Member
Registered: 2009-01-07
Posts: 79

rc.local

I'm trying to run nvclock at boot and my rc.local looks like this:

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

/usr/bin/nvclock -f -F 30 &

It's not working and I can't figure out why - can you help?!

Offline

#2 2009-09-22 17:40:05

singral
Member
Registered: 2009-09-21
Posts: 27

Re: rc.local

as far as i know in rc.conf you can only add deamons to boot at start up and modules to load.
Normal apps you want to start at boot up you start when you log in and have separate config file depending on DE/WM you use.

Offline

#3 2009-09-22 18:39:55

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: rc.local

It should be perfectly allright what you are doing - try to debug it somewhat, ie

echo ":: Starting 'nvclock' ..."
if [ /usr/bin/nvclock -f -F 30 & ]; then echo ":: success!"; else echo ":: failure"; fi

Btw - I presume you have tried to run it from the command line and it works then?

Offline

#4 2009-09-22 18:51:52

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: rc.local

@singral
Not exactly.
You can run anything from rc.local (I use it to set some LEDs and run cronwhip once at startup, neither of which are daemons or modules). Generally though you will only run system apps though.

You're right though that normal/user apps are usually started with the DE's/WM's autostart configuration.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2009-09-22 19:51:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: rc.local

Does that nvclock command need to run as root?  If not you can use the following in your /etc/rc.local:

su username -c /usr/bin/nvclock -f -F 30 &

Last edited by graysky (2009-09-22 19:51:19)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2009-09-22 21:29:54

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: rc.local

Another problem might be that it needs to be run while X is running.

Offline

#7 2009-09-22 22:41:45

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: rc.local

bender02 wrote:

Another problem might be that it needs to be run while X is running.

To follow up on that, if nvclock is a graphical application (X-based), then you should start it in your DE's/WM's autostart file, not rc.local.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#8 2009-09-23 04:57:31

slightlystoopid
Member
Registered: 2009-09-10
Posts: 61

Re: rc.local

@singral
rc.conf != rc.local

if it is as graphical as it sounds, and you want it running regardless of DE/WM, you could probably put it in your ~/.xinitrc


One nation, under the corporatocracy, indivisible, with liberty for them.

Really, I can understand the Supreme Court's rulings. Afterall, corporations are people just like us, with love and feelings, hopes and dreams, and a limited lifespan to do it all in... oh wait, nevermind. I was thinking of same-sex marriage.

Offline

#9 2009-09-25 16:49:40

clearloon
Member
Registered: 2009-01-07
Posts: 79

Re: rc.local

Thanks for all the suggestions! Annoyingly, none of them have worked!

The command reduces the fan speed on my nvidia graphics card - I want to do it to reduce noise.

I would prefer that it ran for all users in all sessions, hence I'd like ti to run out of rc.local.

Driving me nuts!

Offline

#10 2009-09-25 17:28:06

derelict
Member
Registered: 2006-07-25
Posts: 81

Re: rc.local

You could try adding it to /etc/profile or to /usr/bin/*-session entries. Not the cleanest way, but if it works...

Offline

Board footer

Powered by FluxBB