As a classroom for learning Unix/Linux, I'm using Microsoft's Ubuntu App in Windows 10. I want to run:
But I get the following:
Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused (gedit:27829): Gtk-WARNING **: cannot open display: :0.0
None of the following solutions have worked:
As per this page I tried
gksu geditand just get the final line of the above error, and I tried
sudo nanoand can edit the file (but isn't really a solution as I want to use gedit).
As per @WinEunuuchs2Unix's solution I downloaded VcXsrv, added
export DISPLAY=localhost:0.0to ~/.bashrc, installed ubuntu-desktop and yad and still get my original error when trying to open gedit.
As per this page I installed Xming and vim-gtk and tried
gviminstead of gedit and get:
E233: cannot open display
I followed this PC world tutorial probem-free up until
dbus-launch --exit-with-session ~/.xsession, which gives me:
/usr/bin/startxfce4: X server already running on display :0.0 xrdb: Connection refused xrdb: Can't open display ':0.0' xfce4-session: Cannot open display: . Type 'xfce4-session --help' for usage.
And now I don't know what else to try, so I'd love some help! I also hope this is a good question and apologize if I'm making a typical newbie error.