WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline luca662

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

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

I guess the next one will tell you to read the book:

Offline Misalf

  • Sr. Member
  • ****
  • Posts: 298
Re: tce-load on startup?
« Reply #2 on: July 21, 2014, 05: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.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 6318
Re: tce-load on startup?
« Reply #3 on: July 21, 2014, 08: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: 163
    • YetI web site
Re: tce-load on startup?
« Reply #4 on: July 21, 2014, 10: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, 06:27:24 PM »
Thank you for all the help everyone, I opted to put my tce-load commands in .profile.

Online gerald_clark

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