gedit:7954 - no such file/folder error

Asked by werner

When I edit a file, e.g.:

cd /home/userid/.mozilla/firefox
sudo gedit profiles.ini

Make some changes and when saving I see these type of errors:

(gedit:7954): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

This is on a new install of Xubuntu 11.10, but my /home partition is coming from my previous install.

Is there a "profile" file for gedit which stores some settings with path from my old setup?

File is getting correctly saved, so error is not harmful but just annoying.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gedit Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

You don't use sudo for gedit. It doesn't setup the X session properly and you will corrupt your ICEauthority file.

As the file is in your home folder, you don't even need sudo or similar, you only need sudo if you need to edit a file or folder you would otherwise have no write access to, the data is in your home folder, so you have full access. Why are you using sudo?

Revision history for this message
werner (wbruhin) said :
#2

I don't see errors with regards to X session after I use gedit. Anyhow, so what editor should one use then, and please don't tell me vim or emacs:)

BTW, if I do sudo gedit /etc/fstab I can edit the fstab without problem and changes are registered in the fstab file (checked with e.g. leafpad) but I do get the above error.

gedit is nice/easy and it worked under my first install of Xubuntu 11.10, it works on this one too, only error I see is the above.

Revision history for this message
mycae (mycae) said :
#3

gedit is the right tool, just not sudo for launching gedit

For the firefox case, if it is your own user, you should not be editing as root, just open the file with "gedit", no need to escalate to admin privileges.

In the fstab case, you should use "gksudo gedit" to ensure that the x11 setup is properly initialised.

Revision history for this message
werner (wbruhin) said :
#4

Thanks for the gksudo tip.

However the error stays the same, i.e. I do:

gksudo gedit /etc/fstab

and on save I get this type of error:
(gedit:2113): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

Please note that the error has nothing to do with the file I am editing. I guess it is a gedit file which can't get updated as that path does not exist.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

It's only a warning so is ok to ignore.

Can you help with this problem?

Provide an answer of your own, or ask werner for more information if necessary.

To post a message you must log in.