Originally Posted by VikashKrChoudhary
(gedit:2326): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
Gedit tries to update the list of recently opened files and the file or any leading directories up to it do not exist. Instead of "fixing" this error I suggest you change your development habit and set up your personal repository using RCS, CVS, SVN, Mercurial, GIT or whatever else versioning system you fancy. Store changes there and only checkout and 'sudo cp' files to /var/www when you're certain it works. This way you don't have to run applications as root unnecessarily and can revert if something doesn't work.