Launch firefox at startup

Solved
mayel -  
polbo Posted messages 1 Registration date   Status Member Last intervention   -
Hi,

I want to launch a script at startup on my machine (Fedora Core 4). The script simply calls /usr/bin/firefox to launch the Firefox application.
I just added a line in /etc/rc.d/rc.local:
/home/script.sh

I feel like my script is being read, but no browser opens at startup...

Any idea?
Thank you.
Configuration: Fedora Core 4

14 answers

  1. Zempachi Posted messages 7572 Status Contributor 906
     
    Is your script executable (chmod +x)?
    --
    intermittent of poetry Founding member of the FJH
    0
  2. lami20j Posted messages 21506 Registration date   Status Moderator, Security Contributor Last intervention   3 571
     
    Hello,

    I suppose you're using GNOME, so run
    gnome-session-properties 
    and choose the startup programs for your session.
    If you're using KDE, you can do
    ln -s /usr/bin/firefox $HOME/.kde/Autostart/firefox


    --
    lami20j
    0
  3. mayel
     
    Sorry, the YES was for the question about chmod.

    As for KDE and GNOME, that's not the core of my problem, to be honest. I took Firefox as an example.
    What I want is to be able to launch an application using my script (Firefox, Gimp, ...) at startup.
    0
  4. lami20j Posted messages 21506 Registration date   Status Moderator, Security Contributor Last intervention   3 571
     
    and this at startup.
    Well, precisely.
    Since it concerns graphical applications, do what I told you and you'll see that it will work.

    If you put the commands in rc.local, they will probably fail.

    --
    lami20j
    0
  5. mayel
     
    So there's no way to launch a graphical application at startup using rc.local...

    In your command: ln -s /usr/bin/firefox $HOME/.kde/Autostart/firefox
    What does $HOME refer to?
    0
  6. lami20j Posted messages 21506 Registration date   Status Moderator, Security Contributor Last intervention   3 571
     
    $HOME contains the user's home path

    instead of writing /home/yoggi, you can write $HOME or even ~
    yoggi@debian:~$ echo $HOME /home/yoggi yoggi@debian:~$ ls -al $HOME total 20 drwxr-xr-x 2 yoggi yoggi 4096 2007-10-16 18:25 . drwxr-xr-x 31 root root 4096 2007-10-16 18:25 .. -rw-r--r-- 1 yoggi yoggi 220 2007-10-16 18:25 .bash_logout -rw-r--r-- 1 yoggi yoggi 414 2007-10-16 18:25 .bash_profile -rw-r--r-- 1 yoggi yoggi 2227 2007-10-16 18:25 .bashrc yoggi@debian:~$ ls -al ~ total 20 drwxr-xr-x 2 yoggi yoggi 4096 2007-10-16 18:25 . drwxr-xr-x 31 root root 4096 2007-10-16 18:25 .. -rw-r--r-- 1 yoggi yoggi 220 2007-10-16 18:25 .bash_logout -rw-r--r-- 1 yoggi yoggi 414 2007-10-16 18:25 .bash_profile -rw-r--r-- 1 yoggi yoggi 2227 2007-10-16 18:25 .bashrc yoggi@debian:~$ 

    --
    lami20j
    0
  7. mayel
     
    As it is not possible to launch a graphical application via rc.local, I was thinking of launching a console at startup via my script. Then write in the console /usr/bin/firefox

    Is it possible to launch a console at startup?
    0
  8. lami20j Posted messages 21506 Registration date   Status Moderator, Security Contributor Last intervention   3 571
     
    echo '/usr/bin/firefox' >> $HOME/.bashrc source $HOME/.bashrc


    When you open a terminal, Firefox will launch
    --
    lami20j
    0
  9. mayel
     
    It seems like a not bad solution.
    However, when I can't find a .bashrc file under my $HOME (which is /root)
    0
  10. mayel
     
    It's good, I found it!
    Well, I'll give this a try.
    Thank you for your help.
    0
  11. mayel
     
    A last question: what is the purpose of the source line $HOME/.bashrc?
    0
  12. seb
     
    I installed Mozilla Firefox, it was working very well, and now it won't start anymore. It says there are issues with the profile directory, etc.
    0
  13. polbo Posted messages 1 Registration date   Status Member Last intervention  
     
    The simplest way with the mouse is to right-click on the Firefox icon, then the launcher window opens
    open system settings, choose startup applications, and add the command Firefox %u. That's how you make it open at startup; this procedure is valid for any other command.
    0