WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to Autostart a program when TC loaded? (Solved)  (Read 4946 times)

Offline bauxit

  • Newbie
  • *
  • Posts: 3
How to Autostart a program when TC loaded? (Solved)
« 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
« Last Edit: July 17, 2010, 08:50:20 PM by bauxit »

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: How to Autostart a program when TC loaded?
« Reply #1 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
« Last Edit: July 16, 2010, 08:53:08 AM by Arslan S. »

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: How to Autostart a program when TC loaded?
« Reply #2 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).
« Last Edit: July 16, 2010, 09:03:00 AM by maro »

Offline bauxit

  • Newbie
  • *
  • Posts: 3
Re: How to Autostart a program when TC loaded?
« Reply #3 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to Autostart a program when TC loaded? (Solved)
« Reply #4 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 ;)
The only barriers that can stop you are the ones you create yourself.