Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add firefox to system PATH on Linux instance at Amazon Web Service?

This is naive question but how does one add firefox to the system PATH on a Amazon Web Service Linux instance? I should clarify that I installed firefox to /home/firefox instead of /usr/bin. Thanks! I am currently getting the following error when I try to load the firefox webdriver (after importing selenium):

>>> driver = webdriver.Firefox()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 64, in __init__
    self.binary = capabilities.get("binary") or FirefoxBinary()
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 47, in __init__
    self._start_cmd = self._get_firefox_start_cmd()
  File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 163, in _get_firefox_start_cmd
    " Please specify the firefox binary location or install firefox")
RuntimeError: Could not find firefox in your system PATH. Please specify the firefox binary location or install firefox
like image 226
user26750 Avatar asked Oct 27 '25 08:10

user26750


1 Answers

Add the following to your ~/.profile:

export PATH="$PATH:/home/firefox"

Or to ~/.bashrc, or ~/.bash_profile, if the shell is Bash.

See Shell initialization files

like image 87
Ruslan Osmanov Avatar answered Oct 29 '25 23:10

Ruslan Osmanov