WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tce-load on startup?  (Read 7361 times)

Offline luca662

  • Newbie
  • *
  • Posts: 2
tce-load on startup?
« on: July 21, 2014, 05: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?

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: tce-load on startup?
« Reply #1 on: July 21, 2014, 06:05:57 PM »
/etc/sysconfig/tcedir/onboot.lst

I guess the next one will tell you to read the book:
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: tce-load on startup?
« Reply #2 on: July 21, 2014, 06: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.
Download a copy and keep it handy: Core book ;)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: tce-load on startup?
« Reply #3 on: July 21, 2014, 09:48:48 PM »
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

Offline theYinYeti

  • Full Member
  • ***
  • Posts: 177
    • YetI web site
Re: tce-load on startup?
« Reply #4 on: July 21, 2014, 11:56:49 PM »
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"... '

Offline luca662

  • Newbie
  • *
  • Posts: 2
Re: tce-load on startup?
« Reply #5 on: July 22, 2014, 07:27:24 PM »
Thank you for all the help everyone, I opted to put my tce-load commands in .profile.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tce-load on startup?
« Reply #6 on: July 22, 2014, 08: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.

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 360
    • Zendrael's home of projects
Re: tce-load on startup?
« Reply #7 on: July 24, 2014, 07: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!

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: tce-load on startup?
« Reply #8 on: July 24, 2014, 08: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.