I'm completely new to ubuntu and am trying to get a text editor to open in a gui window. I'm on ubuntu 18.04 using the windows subsystem of Windows 10. When I call gedit, I get the following:

arobiso@DESKTOP-B7KI33S:~$ gedit
Unable to init server: Could not connect: Connection refused

(gedit:14): Gtk-WARNING **: 11:54:49.594: cannot open display: localhost:0.0

I also tried to install sublime text 3. When I call it, I don't get any errors, but

arobiso@DESKTOP-B7KI33S:~$ subl

I'm using xming as an X Window System Server that my coworker help me set up. He also edited the .bashrc file to export the DISPLAY variable when starting the terminal as follows:

arobiso@DESKTOP-B7KI33S:~$ tail .bashrc
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
export DISPLAY=localhost:0.0
alias of30+='source $HOME/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc WM_LABEL_SIZE=64'
alias of5x='source $HOME/OpenFOAM/OpenFOAM-5.x/etc/bashrc WM_LABEL_SIZE=64 FOAMY_HEX_MESH=yes'

Something's obviously wrong with the display settings, but I have no idea where to go from here, and I couldn't find anything in my previous searches. Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.