I'm trying to run chromium-browser
on my raspberry pi remotely through SSH.
I want chromium-browser
to use the display of the raspberry pi (not the local display of my Windows machine).
Even when I run
arthur@raspberrypi:~ $ export DISPLAY=:0.0
arthur@raspberrypi:~ $ chromium-browser
or
arthur@raspberrypi:~ $ export DISPLAY=:0
arthur@raspberrypi:~ $ chromium-browser
I still get the same error :
(chromium-browser:1330): Gtk-WARNING **: cannot open display: :0.0
I'm using Putty, X11 forwarding is disabled both in sshd_config
and Putty settings.
This is meant to be a one-shot run. I do not want to control anything remotely after the browser is started. The ultimate goal is to be able to run chromium with an URL as parameter, so the page displays on the HDMI the raspberry is hooked up to. That's basically it, I don't want to control anything further than that.
Is there anything else I can try to launch chromium on the remote display ?
2 Answers 2
It appears the problem lies somewhere between the setup of X on the Pi and adding a new user to the Pi. The new user does not seem to have full access to the X server so can't launch GUI applications from the command line but can use su
to login as the pi
user and run the desired applications.
Not exactly an answer but more of a workaround, I'm afraid.
If the Pi is set up to auto-login as pi
and launch straight to the desktop then I think the pi
user's X client (the window manager?) has exclusive access to the display so it would make sense that a second user logging in would be unable to use the same display. If this is the case you could try logging pi
out of the desktop on the physical Pi and then running your command from the command line as the second user.
After desktop login, the xset
command works and does not throw
No protocol specified
xset: unable to open display ":0"
X11 forwarding is disabled
there's one problem, it needs to be ENABLED to work ... the other is, do you have an X server on the PC?X11
is a protocol - you have to have something on the PC that talksX11
- I'm assuming the PC isn't running Linuxssh