I'm testing my website's frontend with karma, using google-chrome as main testing browser in Ubuntu.
The problem is that karma occasionally fails to launch chrome browser with Cannot start Chrome error message.
So when I try to launch google chrome with command line in the situation, Chrome throws an Gtk: cannot open display error message.
Although I bump into this error sometimes even when I use my Ubuntu machine directly, I get this error more frequently when I access my machine with PuTTY from another window machine at my company.
Maybe I can use PhantomJS as alternative testing browser, but I need exactly same testing environment as my production website will go through.
Gtk: cannot open display
Which means it can not find display attached with device so if you have connected display you can export its address.
Generally it will be 0.0
So your command will be like export DISPLAY=:0.0 if doesn't work try changing 0.0 to 0 then it can find the display.
may be this link will be helpful
https://askubuntu.com/questions/47642/how-to-start-a-gui-software-on-a-remote-linux-pc-via-ssh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With