Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I just got a server running with ubuntu on it for the first time, I connect with ssh. I am a mac user, learning ubuntu. The idea is to automate some tasks on the server. One of these tasks involves doing some tests with selenium through python. I need to get firefox to work in order to use the driver. I always get this error however:

root@gogokino:~# firefox "" &
(process:32286): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
Error: no display specified
[1]+  Exit 1                  firefox ""

I get a very similar error when I try to run selenium from python.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/", line 60, in __init__
    self.binary, timeout),
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/", line 47, in __init__
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/", line 61, in launch_browser
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/", line 100, in _wait_until_connectable
selenium.common.exceptions.WebDriverException: Message: "The browser appears to have exited before we could connect. The output was: \n(process:32301): Gtk-WARNING **: Locale not     supported by C library.\n\tUsing the fallback 'C' locale.\nError: no display specified\n" 

So there seems to be something wrong, something about there not being a C library and something about a locale. I thought C was standard in ubuntu? Is there a quick way to solve this problem?

share|improve this question
Did you install Firefox on a fresh server install? Firefox needs a display set to run and default server installs don't have one. Try running EXPORT DISPLAY=:0 before running firefox. – Seth Sep 8 '13 at 15:26
Bit of a noob here. root@server:~# EXPORT DISPLAY=:0 gives -bash: EXPORT: command not found – cantdutchthis Sep 8 '13 at 15:28
Hmm. You probably need a display server installed then (the server doesn't come with one, and firefox needs one). I'm working on the C library problem too. On my server I used sudo apt-get install lxde for a display server. – Seth Sep 8 '13 at 15:33
didnt help. im now trying to see if i can get it to work via a vnc. – cantdutchthis Sep 8 '13 at 16:38
After installing a display server, what is the error message now? Did you try exporting the display afterwards? – Seth Sep 8 '13 at 16:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.