I am trying to modify my /etc/hosts file according to pset7. It saves the changes but for only the current session. If I shut down the appliance and the VirtualBox and then start them again, the /etc/hosts does not contain any more my change. Restarting the appliance does not help - the warning disappears but the problem stays.

Here is the warning:

(gedit:13488): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

Is there a solution for this?

1 Answer 1


This problem can be solved by using another editor, nano for example. Then I do not get any warning.

It seems like the problem is in gedit when opening it from terminal as a root. It can be solved on Debian-based distros with gksu. I was not able to find any solution for Fedora.

I still cannot keep my changes in /etc/hosts. It appears that every time I run update50 the hosts file becomes rewritten to its default. Since, I take cs50x, I use appliance 19, which is not updating anymore. So, just do not update your appliance 19 and your /etc/hosts will keep your changes.

You must log in to answer this question.