WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Auto launch firefox on system boot  (Read 7800 times)

Offline prabhu duraisamy

  • Newbie
  • *
  • Posts: 1
Auto launch firefox on system boot
« on: December 07, 2009, 01:00:56 AM »
Hi,
I would like to know how can I auto launch firefox on system boot. I installed firefox 3.5. I can't launch firefox on startup.I created my startup script in /etc/init.d directory.

In which directory i will create my startup script.Whether init.d is the startup directory for tinycore.I need clear example for this???.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Auto launch firefox on system boot
« Reply #1 on: December 07, 2009, 01:24:31 AM »
I'd say that /etc/init.d is not meant to be used for starting GUI applications. It is meant to be used for daemons (e.g. cron, ssh, ...).

Since you require X11 to run before you can use firefox I'd suggest to enhance your own .xsession file (I guess it will be /home/tc/.xsession for the standard user).

Taking a cue from the other entries that are already there I'd suggest to add the following to the end of that file:
Code: [Select]
[ $(which firefox) ] && firefox &

How you make sure that this change "survives the next boot" depends on your mode of achiving persistence.

Offline bkwb

  • Newbie
  • *
  • Posts: 16
Re: Auto launch firefox on system boot
« Reply #2 on: May 08, 2010, 04:13:02 PM »
Hi,
I'm trying to make tiny core to be my default os for cloud computing and I wanted to start opera automatically when the system was started. so I did what you said but used opera instead of firefox but now my boottime goes from 35 seconds to 1 minute 30 so i might aswell install ubuntu.. -.-

what should i do to overcome this?

at startup tinycore does tell me 3 or 4 times that:
xauth: timeout in authority file /home/tc/.xauthority

Offline bkwb

  • Newbie
  • *
  • Posts: 16
Re: Auto launch firefox on system boot
« Reply #3 on: May 08, 2010, 05:15:41 PM »
I guess I could have spared myself the trouble..

I just now stumble up an article that says that you can auto launch file by making file in /home/tc/.X.d.
You can use the file that's there for wbar to use as a guide..

I hope future newbies like myself don't need to screw up their bootprocess for it now..

PS: the best way to find it out is to trial and error, btw If we knew what we were doing it wouldn't be called research -A. Einstein

Offline Starfire06

  • Newbie
  • *
  • Posts: 2
Re: Auto launch firefox on system boot
« Reply #4 on: May 22, 2010, 10:09:55 PM »
I've been all over the place looking to see how to do this and everyone keeps talking about  modifying the /home/tc/.xsession file. The only thing I find in tc is desktop dir.

I installed Tiny Core on my harddrive (this one will be a kiosk style for time-clock login) and the only app users will be able to run is Firefox.

I'm fairly new to this kind of thing and self-taught at everything so don't even know where to go.

If some-one knows what file to modify or add and where on hda1 I would appreciate it.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Auto launch firefox on system boot
« Reply #5 on: May 22, 2010, 10:31:14 PM »
Well, the advice to change the '.xsession' file is slightly outdated. Until TC 2.10 that was the way to go, but since TC 2.11 the '.xsession' file itself contains the code to utilize the '.X.d' directory.

Now I take it you are have difficulties to "see" '.xsession' and / or '.X.d': As you might know in *NIX file names starting with a dot character are hidden files (or directories, etc.). To list them you use the '-A' (or '-a') option for the ls command. Therefore if you use ls -lA ~/.xsession ~/.X.d you should be able to "see" them.

Furthermore I'd imagine that something along the lines of echo "firefox &" > ~/.X.d/firefox is what you are after to create such a startup file.

Offline Starfire06

  • Newbie
  • *
  • Posts: 2
Re: Auto launch firefox on system boot
« Reply #6 on: May 23, 2010, 12:51:00 PM »
That did the trick! Thank you so much. This thing has really been a learning experience.