To fix this problem
Step 1- Download and Install this Windows X Server https://sourceforge.net/projects/vcxsrv/
Step 2- Open XLaunch
Step 3- Select " Full screen " option
Step 4- Choose " Start no client " option
Step 5- Simply do next and finish
Step 6- Open terminal and type :
export DISPLAY=0:0
gedit filename
In case your Linux machine is available with host name = 'hostname' and you'd want to ssh into the hostname and then open gedit
then execute the following commands:
- Enable
X11Forwarding
in the ssh server
[hostname] $ vim /etc/ssh/sshd_config
# and set X11Forwarding to yes
X11Forwarding yes
- Set the
DISPLAY
env in the client terminal and then ssl with -X
flag
export DISPLAY=0:0
ssh -X yourusername@hostname
[hostname] $ gedit filename
localhost
is NOT the same network interface as the HOST'slocalhost
– Bogle