6

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...

7

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.

sudo nano /etc/network/interfaces 
  • thanks for the tip! great help since I am using only the server and no GUI. – bluephoenix71 Jun 29 '17 at 21:29
  • If my answer has been helpful, please accept it: askubuntu.com/tour – chili555 Jun 29 '17 at 21:50

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.