I ssh to a remote host (without X forwarding).
In the shell created by sshd on the remote host, why can't I start a GUI program on the default $DISPLAY
$ eog
Unable to init server: Could not connect: Connection refused
(eog:31542): Gtk-WARNING **: 23:11:16.793: cannot open display:
$ echo "$DISPLAY"
$
while specifying explicitly $DISPLAY=:0
creates a window on the remote host?
$ DISPLAY=:0 eog
(eog:31546): dbind-WARNING **: 23:11:42.415: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Isn't :0
the default value of $DISPLAY
?
$DISPLAY
". Please useenv
command to check all your envs. – 炸鱼薯条德里克 Mar 15 '19 at 03:38