Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: bauxit on July 16, 2010, 08:35:26 AM

Title: How to Autostart a program when TC loaded? (Solved)
Post by: bauxit on July 16, 2010, 08:35:26 AM
Hi!
I'm new on this forum.
I setup on my hard drive the latest TinyCore v2.11.6 and everythings. It works good!

But i can't autostart an internet browser. (Epiphany)
I've added this command to the end of /opt/bootlocal.sh:
exec epiphany

Nothing happened... Please help me - i want to autostart Epiphany browser when TC loaded.
Thank You very much!
ps: sorry for my english grammar - this isn't my language
Title: Re: How to Autostart a program when TC loaded?
Post by: Arslan S. on July 16, 2010, 08:44:33 AM
Code: [Select]
echo "[ -x /usr/local/bin/epiphany ] && /usr/local/bin/epiphany &" > ~/.X.d/epiphany
filetool.sh backup noprompt
sudo reboot
Title: Re: How to Autostart a program when TC loaded?
Post by: maro on July 16, 2010, 08:57:56 AM
I'm afraid that '/opt/bootlocal.sh' is not quite the right place for the start-up of an application that requires a running X server. The purpose of that file tends to be more for system-wide settings that I'd like to describe as "lower level infrastructure" (e.g. mounting of devices, specific network configuration, etc.).

Please try to create a new file in '~/.X.d' that contains the required start-up instruction (e.g. via echo 'epiphany &' > ~/.X.d/epiphany.sh, and don't forget to backup before you re-boot to test it).

PS: You should not be too concerned about the fact that English is not your first language. The same is the case for a lot of people in this forum here (myself included) and we tend to understand each other nevertheless. I believe your question was quite clear.



Edit: Sorry I only just saw now that Arslan gave you in principle the same answer, and suggested an even "better" command (as it is includes a check of the existence of the file that is to be executed).
Title: Re: How to Autostart a program when TC loaded?
Post by: bauxit on July 17, 2010, 08:49:34 PM
Thank you very much, it works great!
I'm a Linux newbie, sorry if I asked an evident question.
Title: Re: How to Autostart a program when TC loaded? (Solved)
Post by: curaga on July 18, 2010, 05:55:16 AM
Thank you very much, it works great!
I'm a Linux newbie, sorry if I asked an evident question.

It varies among distros, but it would have been in our FAQ ;)