On my ubuntu 14.04 remote server, when I try to start Mozilla Firefox 32.0 from terminal, it through error as follow:

$ firefox

(process:6397): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Error: cannot open display: :0.0

I have tried by changing display to 1, 10, 11, 99, however, no luck!

Banging my head from a week. Any help will be appreciable.

  • 2
    When you say remote server, are you connected via ssh? Yre you forwarding X? – Jan Sep 13 '14 at 20:15
  • Yes, I have ssh to my server. Over there I am trying to start firefox in a same way as I am doing on my local machine i.e. from terminal type firefox and hit ENTER – RAJ ... Sep 13 '14 at 20:24
  • @Jan Do I need to forward X? I am using watir & headless and watir opening firefox instance programmatically – RAJ ... Sep 13 '14 at 20:41
  • Never heard of watir but you need to forward X. – Jan Sep 13 '14 at 20:43
  • how can I do this @Jan? And why I need it only on remote machine. Local machine works without it – RAJ ... Sep 13 '14 at 20:44
up vote 4 down vote accepted

X11 forwarding needs to be enabled on both the client side and the server side.

On the client side, the -X (capital X) option to ssh enables X11 forwarding, and you can make this the default (for all connections or for a specific conection) with ForwardX11 yes in ~/.ssh/config.

On the server side, X11Forwarding yes must specified in /etc/ssh/sshd_config. Note that the default is no forwarding (some distributions turn it on in their default /etc/ssh/sshd_config), and that the user cannot override this setting.

The xauth program must be installed on the server side. If there are any X11 programs there, it's very likely that xauth will be there. In the unlikely case xauth was installed in a nonstandard location, it can be called through ~/.ssh/rc (on the server!).

Note that you do not need to set any environment variables on the server. DISPLAY and XAUTHORITY will automatically be set to their proper values. If you run ssh and DISPLAY is not set, it means ssh is not forwarding the X11 connection.

To confirm that ssh is forwarding X11, check for a line containing Requesting X11 forwarding in the ssh -v -X output. Note that the server won't reply either way.

Source

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.