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
.bashrc
file. Maybe there's a line that sets theDISPLAY
variable tolocalhost:0
.ll -thr .bashrc
found yesterday was edited, I don't remmember however. I comment out the lineexport DISPLAY=localhost:0
, returns normal, why not change your comment to an answer?