I am trying to use gedit to view .conf files in Ubuntu server 16.04.2. I can't seem to do it as you can see:
$ sudo gedit /etc/network/interfaces
[sudo] password for blue:
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:1430): Gtk-WARNING **: cannot open display: $ sudo gedit
I looked for duplicates or similar issues on this forum but it seems to point in using GUI, however I did try to use their workarounds but unfortunately I can't still use it. Anyway you can help me troubleshoot? I tried re-install but still no joy…
Best Answer
gedit is the official text editor of the GNOME desktop environment. Generally, in a server, there is no desktop environment installed or needed. Therefore, gedit can't start and display.
I suggest that you instead use nano.