Ubuntu 14.04 gedit error cannot open display
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.
Related videos on Youtube
RyanP
Updated on September 18, 2022Comments
-
RyanP over 1 year
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 trygksudo gedit /etc/apache2/sites-available/000-default.conf
andsudo nano /etc/apache2/sites-available/000-default.conf
it gives me the same message (including when I type ingksudo nano
). What's the problem with this? -
RyanP almost 9 yearsit still gives me the same error message
-
RyanP almost 9 yearsanother problem is that with the "edit" command it says that I can't get access ot the file