When I type gedit filename.c
:
Unable to init server: Could not connect: Connection refused
(gedit:76): Gtk-WARNING **: 17:57:16.278: cannot open display:
This is the error is displayed
and those numbers shown is random everytime I execute it,
when ls -l ~/.config/gedit
is entered
ls: cannot access '/home/blank/.config/gedit': No such file or directory
is displayed
how to fix this?
Best Answer
Most likely the problem is that
gedit
config files are owned by root. This happens when you runsudo gedit
in a terminal, that is wrong.You can fix it by running
That will set correct ownership for these files.
Next time if you really need to run
gedit
withsudo
(not recommended), do it this way: