Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: luca662 on July 21, 2014, 08:59:46 PM

Title: tce-load on startup?
Post by: luca662 on July 21, 2014, 08:59:46 PM
Hey Everyone,

I was wondering if tce-load is able to be used on startup.

I've tried to put tce-load commands into /opt/bootlocal.sh, but it runs as root.

I've also tried "sudo -u tc tce-load", but I get an error. Is there a good way to launch load extensions on boot?
Title: Re: tce-load on startup?
Post by: Misalf on July 21, 2014, 09:05:57 PM
/etc/sysconfig/tcedir/onboot.lst

I guess the next one will tell you to read the book:
Title: Re: tce-load on startup?
Post by: Misalf on July 21, 2014, 09:32:30 PM
Or:
~/.X.d/*
For stuff that  can/have to  run after X has started.

One command (and line) per file is recommended I think.
Title: Re: tce-load on startup?
Post by: Juanito on July 22, 2014, 12:48:48 AM
Is there a good way to launch load extensions on boot?

If you want to load the extensions on boot use the apps gui to set the desired extensions "onboot".

If you want to execute something from an extension that does not require X windows (eg the cups daemon), add the command to /opt/bootlocal.sh.

If you want to execute something from an extension that does require X windows (eg conky), create a file containing the command in ~/.X.d
Title: Re: tce-load on startup?
Post by: theYinYeti on July 22, 2014, 02:56:49 AM
FYI, when you are root (eg: on boot), no need to use sudo, which depends on a config file, that may, or may not, be available at this stage of starting the system.
Just use su:
su - tc -c 'command -with "parameter 1" "parameter 2"... '
Title: Re: tce-load on startup?
Post by: luca662 on July 22, 2014, 10:27:24 PM
Thank you for all the help everyone, I opted to put my tce-load commands in .profile.
Title: Re: tce-load on startup?
Post by: gerald_clark on July 22, 2014, 11:55:55 PM
That is not the correct place.
When you have problems with things not working correctly, don't expect us to help troubleshoot it.
Title: Re: tce-load on startup?
Post by: Zendrael on July 24, 2014, 10:23:58 PM
Hi Luca662

To get the best of Core fr your needs, please read the book (link at the top of the main page).

 ;)

Thanks!
Title: Re: tce-load on startup?
Post by: gerald_clark on July 24, 2014, 11:28:35 PM
3 Problems with your solution:
Boot code 'base' will not skip extension loading.
Boot code 'norestore' will not load extensions as expected.
Extensions will try to load on each login, not just at boot.