0

I'm trying to fix an apache2 error (see... Why is my Apache not working after upgrading to Ubuntu 14.04? to understand the error) but to do that I have to use gedit, now after installing gedit and using the command (shown in the link) sudo gedit /etc/apache2/sites-available/000-default.conf and I get this error... Gtk-WARNING **: cannot open display: Even if I try gksudo gedit /etc/apache2/sites-available/000-default.conf and sudo nano /etc/apache2/sites-available/000-default.conf it gives me the same message (including when I type in gksudo nano). What's the problem with this?

RyanP
  • 1

1 Answers1

1

You do not have to use gedit. Since you are on a server system, likely with only a terminal console available, you will need to either use X11 forwarding with ssh, or a terminal based editor.

To edit the file under sudo, just use sudo nano rather than gksudo. If you wish to forward your display, you can use ssh -X and then gksudo and gedit will work, but be somewhat slow, depending on your connection to the server.

dobey
  • 40,982