I am currently working with a Raspberry Pi Model B running Raspbian. I have to display a web page on a screen using the uzbl-browser but this error is occurring:

gtk-launch uzbl-browser
** (gtk-launch:26369): WARNING **: Could not open X display
Unable to init server: Could not connect: Connection refused

(gtk-launch:26369): Gtk-WARNING **: cannot open display: :1
  • 1
    Are you using SSH to connect to the Pi? Commented Feb 21, 2017 at 8:39
  • yes i am using ssh, but i have tried using display as well. Commented Feb 21, 2017 at 8:52
  • When directly conected to the Pi is it running the graphical desktop or the command line? Commented Feb 21, 2017 at 8:56
  • its command line because i am using RASPBIAN JESSIE LITE. Commented Feb 21, 2017 at 8:59
  • 1
    You should answer your own question or if it is unlikely to help others (a typo or misconnection) delete your question. Commented Feb 21, 2017 at 22:38

1 Answer 1


The problem is I didn't install matchbox for the window manager and I had also not installed lightdm.

After that I set the display variable to export DISPLAY=:0 and it is now working.

  • If this is the solution to your problem, you should mark this as the answer (click the tick under the down arrow on the left)
    – Quintin B
    Commented Jul 1, 2018 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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