1

I did something related to ssh or display setting which I don't understand, now every time I restart the Lubuntu, terminal cannot open graphical application:

chen@jesuslovesme:~$ gedit
Unable to init server: Could not connect: Connection refused

(org.gnome.gedit:4921): Gtk-WARNING **: 08:52:41.435: cannot open display: localhost:0
chen@jesuslovesme:~$ echo $DISPLAY   
localhost:0

If I run

export DISPLAY=:0

the problems can temparely solved. Restart the computer return to the same problem

2
  • 1
    It would be great if you recalled what you did. If you followed an online tutorial, please edit your question and add a link to it. In the meantime, take a look at your .bashrc file. Maybe there's a line that sets the DISPLAY variable to localhost:0.
    – danzel
    Apr 3, 2020 at 7:22
  • thank you very much @danzel I ll -thr .bashrc found yesterday was edited, I don't remmember however. I comment out the line export DISPLAY=localhost:0, returns normal, why not change your comment to an answer? Apr 3, 2020 at 7:38

1 Answer 1

3

Thank to the comment above, solution is such

gedit ~/.bashrc

comment out

export DISPLAY=localhost:0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .