0

I have configured an Ubuntu server (16.04.1), with minimum dependencies, to be able to run Google Chrome on that server via the command line.

I installed: X11, Xvfb, xorg, and Google Chrome, but when I try to start Chrome, I receive the error message:

[ERROR:browser_main_loop.cc(265)] Gtk: cannot open display.

I could use any hint about what's wrong or steps that I can follow to start Chrome on a server.

2
  • Don't forget the 'Gtk libraries... Commented Dec 13, 2016 at 14:45
  • This Q/A may help. Commented Dec 13, 2016 at 15:03

2 Answers 2

2

You need to install and start a desktop environment then run Google Chrome within it. You can choose from any one really but if you want something lightweight like lxde.

sudo apt-get install lxde

Install that and then add exec startlxde, on its own line, to the end of the ~/.xsession file.

Finally run startx and then from within lxde run Google Chrome.

0

You must of course start a graphical session before starting Google Chrome; for example, startx. Then launch the browser from withing the graphical session.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.