In Linux, gedit encountered errors and solutions. Today, vimgdb was installed with various errors. Alas, especially this error, so I searched for it. Remember, you cannot make the same mistake in the future ~ Www.2cto.com gedit all kinds of errors I believe that people who come from the ubuntu Gnome desktop environment are familiar with gedit, but such a simple thing will also go wrong, the author only encountered the first problem, take the other ones just in case. However, we can see from these cases that it is not actually the error of Gedit, but the system error. Let the author analyze the meaning. Case 1: Symptoms: sudo gedit/boot/grub. cfg (gedit: 5943): Gtk-WARNING **: Attempting to store changes into '/root /. local/share/recently-used.xbel ', but failed: Create File'/root /. local/share/recently-used.xbel.FVTZ9V "failed: No file or directory (gedit: 5943): Gtk-WARNING **: Attempting to set the permissions of '/root /. local/share/recently-used.xbel ', but failed: There is no file or directory solution: sudo mkdir-p/root /. local/share/analysis: ubuntu is disabled by default. Root Account is used, so root has never logged on, so no/root /. the local/share/directory runs in ubuntu 11.04, so an error occurs. You only need to create this directory. Case 2: Symptom: sudo gedit has the following error: No protocol specified (gedit: 3062): Gtk-WARNING **: cannot open display: 0.0 resolution: Execute: sudo xhost + analysis: when su is used to run a program to another user and the program needs to be visually displayed, the following prompt may appear: invalid MIT-MAGIC-COOKIE-1 key (: 3825): Gtk-WARNING **: cannot open display :: 0.0 this is because Xserver does not allow other users' graphics to be displayed on the current screen by default. if you want other users' images to be displayed on the current screen, run the following command as the current login user, that is, the user before switching the identity. Case 3: Symptoms: Run gedit. Normal users do not encounter errors, but the following error occurs under su to root: (gedit: 6556): EggSMClient-WARNING **: failed to connect to the session manager: None of the authentication protocols specified are supported GLib-GIO: ERROR:/build/buildd/glib2.0-2.26.0/gio/gdbusconnection. c: 2270: initable_init: assertion failed: (connection-> initialization_error = NULL) solution: differentiate su and su-analysis: difference between su and su-command: su can only be switched to administrator user permissions, without the Administrator's login script and search path su -Not only can you switch to administrator permissions, but also use the administrator login script and search path instance: www.2cto.com $ pwd. However, if you change to su-, the result is as follows: $ pwd/home/Yewanth (current user directory) /home/Yewanth (current user directory) $ su # pwd (view path again) $ su-# pwd (view path again)/home/Yewanth (or the current user directory) /root (switch to the super user directory) Note: The specific situation is not clear, everyone is free.