'ubuntu 16.04 set metadada failed gedit

Is any one could help me to stop this behavior of gedit in ubuntu 16.04 LTS.

I have upgraded 14.04 to 16.04 . Now i am trying to open the gedit from terminal by passing the command sudo gedit /etc/apt/sources.list but it is throwing an error stating that (gedit:2090): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

however, it is opening the file. when i am trying to save any modification then it is showing error after saving the file as (gedit:2090): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported

I am not getting why this is happening in 16.04 only it was not with the 14.04.

I tried to look for a solution but could not find any. Please if any one has any idea or solution regarding these issues please share your expertise.

Any help in this regard is appreciated.

Thank you,



Solution 1:[1]

You could try to use kate (a nice GUI editor) instead of gedit.

sudo apt-get update
sudo apt-get install kate
gksudo kate /path/file.txt

You can customize kate, and I think you will like it better than gedit.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pacholik