Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install firefox in Amazon Cloud (AWS EC2)?

I have an AWS account with all privileges. I wanted to install Firefox in the environment as my application will launch Firefox and run a few tests against the web application.

How do I install Firefox?

like image 647
Kathiresan Jeyapandian Avatar asked Oct 15 '15 14:10

Kathiresan Jeyapandian


2 Answers

Executing below commands solved the problem:

sudo apt-get install xvfb

sudo Xvfb :10 -ac

export DISPLAY=:10

sudo firefox
like image 123
Kathiresan Jeyapandian Avatar answered Nov 09 '22 09:11

Kathiresan Jeyapandian


You can install Xvfb (X virtual framebuffer, virtual Linux display system) and Firefox.

For Ubuntu server:

sudo apt-get install xvfb firefox

And then run your app via:

xvfb-run <your-app>

There are lot of tutorials how to run Firefox in headless mode. Just search for headless firefox ubuntu. One of good resource is: http://elementalselenium.com/tips/38-headless. In there, there are some options how to run your app under xvfb.

like image 21
Edward Samuel Avatar answered Nov 09 '22 09:11

Edward Samuel