How Can I Automatically Run Firefox On Ubuntu Server System Startup?

8,196

Solution 1

Judging from the comments to the original question, and you just want some sort of GUI, isn't vnc-server the obvious solution?

Solution 2

Well, you could add the line

/usr/bin/firefox &

to the file

/etc/rc.local

That's the literal answer. Whether that does anything useful, well....

Share:
8,196

Related videos on Youtube

darkAsPitch
Author by

darkAsPitch

I like pie.

Updated on September 17, 2022

Comments

  • darkAsPitch
    darkAsPitch over 1 year

    How do I automatically run Firefox on an Ubuntu Server inside the Amazon EC2 cloud as soon as the server starts up?

    I know how to create my own AMIs and all that jazz. I just need to know how to auto-start firefox.

    The Ubuntu Edition is 8.04 Hardy. The server environment is Amazon EC2.

    • Admin
      Admin about 14 years
      Didn't you ask the pretty much same question here? serverfault.com/questions/113300
    • Admin
      Admin about 14 years
      Yes, and it got plagued with confusion! My apologies, I am a native windows user, I didn't get the terminology correct.
    • Admin
      Admin about 14 years
      Justin asked a question on your original post that you didn't answer : what are you trying to accomplish ? Why do you want Firefox started automatically ? Chances are, there is a better and less complicated way of doing what you actually want than this one.
    • Admin
      Admin about 14 years
      re:defraagh, well then how could I automatically run a virtualbox machine or any other GUI related program on linux startup. Nevermind the fact that I said firefox.
    • Admin
      Admin about 14 years
      The question you should answer (or ask yourself) is where is your display (monitor, keyboard, mouse) that will be used by your graphical app.
    • Admin
      Admin about 14 years
      I have asked myself that question dtmilano, and all I know is that this is possible with a windows machine on ec2. It can create and run the GUI without being physically connected to the monitor.
    • Admin
      Admin about 14 years
      just because it's a virtual machine doesn't mean it doesn't have a console. lspci should tell you that one of the pieces of virtualized hardware is a generic video card.
    • Admin
      Admin about 14 years
      darkAsPitch: The point is that sure, you can run Firefox on startup. In fact, there's an answer below. The question is "Why? You're not at the terminal". Running Firefox (or any other client software) on the server would serve as much purpose as running said client software on any other computer on the internet, and in fact you might as well. If on the other hand, you're trying to execute a PHP script on the server, there are other ways of doing that. Which is why we want to know why you're trying to start Firefox.
    • Admin
      Admin about 14 years
      Do you mean like a kiosk type setup, where the only see you see is firefox? Or do you just want firefox to start as soon as the desktop loads?
  • PP.
    PP. about 14 years
    Or in .bash_profile if it is for a particular user upon log-in; might be useful to test whether the session supports X windows..
  • darkAsPitch
    darkAsPitch about 14 years
    Paul, do I not have to specify a user account as well? I tried this, rebooted, and still firefox only starts when I login via NX server, not on system boot.
  • darkAsPitch
    darkAsPitch about 14 years
    You are right, it will start if I actually connect to it graphically. I need the GUI/Gnome part of ubuntu to start whether I connect to it or not. This seems to be pretty tough on linux. It's easy as pie in windows - GUI starts up whether I am viewing it or not.
  • Matt Simmons
    Matt Simmons about 14 years
    You can script vncserver to launch upon start up...or cron it, or whatever you want.
  • egorgry
    egorgry about 14 years
    Sorry. I'm having a very hard time getting my head around what you're trying to accomplish. Do you want to export that display (firefox) out to another console.