I am using a Amazon Linux 2 (a Fedora/Cent OS like distro) EC2 machine with the Deep Learning AMI (Amazon Linux 2) Version 30.1 AMI.
I want to use
gedit in the remote instance. But if I type in
xclip I get
Error: Can't open display: (null)
If I do
gedit filename I get
(gedit:6012): Gtk-WARNING **: 00:18:40.117: cannot open display:
I have already gone through the following links:
- xsel: Can't open display: (null)
And thus have,
- manually set the environment variable DISPLAY to
export DISPLAY=localhost:0When I do this I get
(gedit:6053): Gtk-WARNING **: 00:23:36.052: cannot open display: 127.0.0.1:0
- I have tried the
-Xis not an option cause of security, also
- I have added
ForwardX11 yesin the client side's
X11Forwarding yesin the server side's
Nothing works. Any directions?
I also watched this video which says that
DISPLAY should not be hardcoded. But my
DISPLAY is not set automatically. When I do a
echo $DISPLAY I get nothing.
So I did a
xauth list which gave me
ip-x-y-x.ec2.internal/unix:10 MIT-MAGIC-COOKIE-1 c84bcd904dd50f7776f667eca7a480f5
so I did
Still I get the same error.