X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

I need to start and stop Firefox remotely on a linux system by running a script

Posted

I want to run Firefox on linux system that will locally display some monitoring type information. The problem is, that the display is not physically accessible (i.e. no mouse) and so I have to start/stop Firefox remotely. I thing I know how to start it by "firefox -P...". The problem seems to be how to kill it cleanly. What I really need is a command line version of File->Exit mouse click. Any help welcomed

Additional System Details

Installed Plug-ins

  • Default Plug-in
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • Adobe PDF Plug-In For Firefox and Netscape
  • Office Plugin for Netscape Navigator
  • Shockwave Flash 10.0 r32
  • 4.0.50524.0
  • Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
  • RealPlayer(tm) LiveConnect-Enabled Plug-In
  • 6.0.12.1739
  • Java Plug-in 1.5.0_11 for Netscape Navigator (DLL Helper)
  • DRM Netscape Network Object
  • Npdsplay dll
  • DRM Store Netscape Plugin

Application

  • User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 GTB7.1 (.NET CLR 3.5.30729)

More Information

the-edmeister
  • Top 10 Contributor
  • Moderator
3199 solutions 24428 answers

https://developer.mozilla.org/en/Command_Line_Options

See Other options need to be documented near the bottom of that page.

Question owner

Hi, thanks for your prompt reply. However my real problem is not starting it but stopping it cleanly. I am forced to restart the display from time to time (once/per hour) because it is getting 'stuck' for some reason and the web page is out of my control. I tried simply killing the firefox process using kill command and then starting a new one but it works one or two times and then the next firefox process demands mouse communication. And that is not available. Also this has to work without any expert present as the display is in a public area.

ryanb 0 solutions 1 answers

it looks like firefox shuts down cleanly on SIGTERM, so if you just `pkill firefox`, that should do it.

if multiple instances are running and you only want to shut down one instance, you can use something like `pgrep -f [PROFILE] | xargs kill`.