I am using ubuntu mate 18.04 and I installed gedit in it alongside pluma (mate default text editor) so I can manage my text notes with gedit. I was also using this setup in ubuntu 16.04, ubuntu mate 16.04 and even in ubuntu mate 18.04 and it works really great. A few days ago I reinstalled my ubuntu mate, install gedit and some necessary plugins and now gedit is crashing in almost in all sessions. I used gedit to manage all my notes and journal entries but this problem is making it impossible. I removed and install gedit multiple time, check with and without plugins but nothing is working. Can anyone help?

update: when I launch this program in the terminal, it crashes after some time with the following error.

(gedit:26250): Gdk-ERROR **: 01:25:37.372: The program 'gedit' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadLength (poly request too large or internal Xlib length erro'.
  (Details: serial 2911131 error_code 16 request_code 18 (core protocol) minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap
  • 1
    catb.org/~esr/faqs/smart-questions.html We would love to help, but it is hard witout relavent information, or any information for that matter – j-money Feb 10 at 11:48
  • @j-money I sorry if this is a stupid question but can I ask which relevant information I need to provide, in order to get help – ShahMoeen Feb 10 at 12:12
  • can you launch it from a terminal? If so what is the terminal output when it crashes? – j-money Feb 10 at 12:22
  • Are these notes stored locally? I notice gedit often crashes if you edit notes on a remote server (e.g. over Samba or FTP) and don't save every few minutes, i.e. you don't keep the connection alive. – Jos Feb 10 at 12:50
  • 1
    The idea of trying another account is to eliminate something in your own directory causing the problem. Create a temporary account called "Guest", and try gedit there. Otherwise, rename ~/.config/gedit to ~/.config/gedit.HOLD, then retry gedit and see if it works. Report back. – heynnema Feb 11 at 1:58

From the comments...

We renamed ~/.config/gedit to ~/.config/gedit.HOLD, then retry gedit and see if it works. It worked. So something is wrong with this prefs folder. It's owned by root.

You probably started gedit in the terminal using sudo gedit, and you should be using sudo -H gedit. All GUI apps should be started this way from the terminal.

  • I am again facing the same issue. – ShahMoeen Feb 12 at 21:42
  • @ShahMoeen How did you start gedit? – heynnema Feb 12 at 21:49
  • from start menu – ShahMoeen 2 days ago
  • Did you put the original gedit config folder back, or did you leave the new one in place and delete the old folder? Have you added any gedit extensions? Is ~/.config owned by root, or your username? – heynnema 2 days ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.