Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: emninger on October 31, 2015, 06:35:22 AM

Title: Starting processes&daemons automatically
Post by: emninger on October 31, 2015, 06:35:22 AM
Related to how start processes automatically, looked into the FAQ and what i found there, for what i understand, that there should be scripts in
Code: [Select]
/usr/local/tce.installed.

Especially, i want conky and tor to be started on boot. Now, there is a script (for both one). But seem to me not starter but rather installer. Should i edit those scripts adding simply a line in the end like
Code: [Select]
conky -c $HOME/.conkyrc? (Is the '-c' needed? Starting from RunProgram in the wbar, conky is sufficient, it reads the .conkyrc in the home directory and not the conky.conf which came by default).

As for tor: Will tor look automatically to the $HOME/.tor/torrc?

Thanks al lot for your patience!
Title: Re: Starting processes&daemons automatically
Post by: Misalf on October 31, 2015, 06:48:29 AM
For Conky,  -c $HOME/.conkyrc  is not needed.
I start Conky from  ~/.X.d/60-conky 
Code: [Select]
conky -p 2 -d -b -o >/dev/null 2>&1 &
The file doesn't need a line break nor does it need to be executable as it's sourced from  ~/.xsession .
Title: Re: Starting processes&daemons automatically
Post by: Misalf on October 31, 2015, 06:52:17 AM
For things that don't need X, you can use  /opt/bootlocal.sh
Code: [Select]
sleep 1 && [ -e /usr/local/sbin/basic-firewall ] && /usr/local/sbin/basic-firewall noprompt >/dev/null 2>&1 &
Title: Re: Starting processes&daemons automatically
Post by: emninger on October 31, 2015, 07:43:12 AM
For Conky,  -c $HOME/.conkyrc  is not needed.
I start Conky from  ~/.X.d/60-conky 
Code: [Select]
conky -p 2 -d -b -o >/dev/null 2>&1 &
The file doesn't need a line break nor does it need to be executable as it's sourced from  ~/.xsession .

The '-o' is needed even if there is a window definition in the conkyrc? I start conky simply by conky  -d ...
Title: Re: Starting processes&daemons automatically
Post by: Misalf on October 31, 2015, 07:50:10 AM
No, sorry. Actually none of those are needed. I have own_window in my config, too.
-p can help sometimes though.
Title: Re: Starting processes&daemons automatically
Post by: emninger on October 31, 2015, 03:44:52 PM
Comes up to my mind: Since i use fluxbox, not flwm, could i set this processes in the fluxbox startup file as well?

Title: Re: Starting processes&daemons automatically
Post by: emninger on October 31, 2015, 03:47:47 PM
For things that don't need X, you can use  /opt/bootlocal.sh
Code: [Select]
sleep 1 && [ -e /usr/local/sbin/basic-firewall ] && /usr/local/sbin/basic-firewall noprompt >/dev/null 2>&1 &

Just out of curiousity and to learn something linuxwise: For what it's good the ">/dev/null 2>&1" part?
Title: Re: Starting processes&daemons automatically
Post by: Greg Erskine on October 31, 2015, 03:52:34 PM
Just out of curiousity and to learn something linuxwise: For what it's good the ">/dev/null 2>&1" part?

A quick search gave me 914,000 results  :D
Title: Re: Starting processes&daemons automatically
Post by: emninger on October 31, 2015, 07:14:17 PM
Got it  ;)
Title: Re: Starting processes&daemons automatically
Post by: Misalf on November 01, 2015, 12:07:25 AM
Quote
Comes up to my mind: Since i use fluxbox, not flwm, could i set this processes in the fluxbox startup file as well?
No, *box'es are getting started in a way where those WM specific startup/autostart scripts won't be used.
/opt/bootsync.sh ,  /opt/bootlocal.sh  and especially  ~/X.d/*  should be everything you need though. Also it's independent from the Window Manager in use. So you can try another WM without missing your auto-starting programs.
Title: Re: Starting processes&daemons automatically
Post by: emninger on November 01, 2015, 08:36:34 AM
Thanks!!!

And thanks for your patience - you're a good teacher! :D