When I try to login into my Linux Gnome based desktop system, I get the following error from GDM :

gconf-sanity-check-2 exited with status 256

How do I fix this problem?

If you see an error about gconf-sanity-check-2, apply the following solutions (note you may need to apply all the solutions):

Fix #1: /tmp permission

You need to make sure /tmp permissions are with the sticky bit mode. An access-right flag on /tmp can be set as follows.
# ls -ld /tmp/
Sample outputs without sticky bit:

drwxr-xr-x 27 vivek users 12288 Jul 18 15:20 /tmp/

Set the correct permission and stick bit as follows (run it as root user):
# chown -R root:root /tmp
# chmod 1777 /tmp

Verify new permissions:
# ls -ld /tmp/
Sample outputs:

drwxrwxrwt 27 root root 12288 Jul 18 15:25 /tmp/

Fix #2: /home permission

Make sure /home has correct permission set. A typical set of permission looks as follows on /home
$ ls -ld /home/
Sample outputs:

drwxr-xr-x 4 root root 4096 May  5 16:29 /home/

If permisions are not as above set it as follows (run it as root user):
# chown root:root /home
# chmod 0755 /home

Try rebooting the system after applying above two solutions. If you still getting the message, empty the gdm home. Run it as root (this for gdm3):
# rm -rf /var/lib/gdm3/.*
For older gnome version (gdm 2) try:
# rm -rf /var/lib/gdm/.*

References:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 16 comments so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
16 comments… add one
  • Paul Sep 8, 2012 @ 3:52

    Thank you…. this procedure fixed my problem …

  • NormK Jan 10, 2013 @ 22:37

    I had a hard crash on a Centos 6 VM under VirtualBox.
    Fix #1 worked for me and also found that my .ICEAuthority file in /var/lib/gdm was corrupted. It was the most recent file that changed since the crash. So I moved it to .ICEAuthority.tmp and rebooted. Everything came up great and my desktop settings were intact. I also had the error about the gnome power manager failing so I ran:
    yum remove gnome-power-manager
    yum install gnome-power-manager

    Thanks!

  • Uriah Apr 19, 2013 @ 13:01

    Another problem is one of your directories under /etc/gconf may be missing some entries that are cached under /var/lib/gdm. The sanity check compares the settings under etc with the cached values, and if they are different will throw this error.

    Example: manually removing /etc/gconf/gconf.xml.mandatory folder will cause that exact error as well; especially if you had settings in this folder prior to the error.

    Running gconftool-2 to update/unapply the current config should help as well.

  • RedCent Nov 29, 2013 @ 14:00

    Thanks for the fixes. I was knockng out my RHEL with a rm -rf /tmp/. Because of your solution everything is fine without reinstallation.

  • vikranth Jun 18, 2014 @ 12:49

    Hello,

    While I was working with my oracle linux image (under virtual box). I changed permissions of root by mistake. (I typed chmod -R 777 / ).since then my imag is not opening and I’m unable to find a solution to fix it. Can you please help me.

    • Fela Aug 7, 2014 @ 9:18

      Please try and run this command # restorecon -v / (this should restore all the settings in the root). I hope it helps

  • Jogeshwar Aug 6, 2014 @ 19:11

    Run the below command to fix this.

    chmod -R 777 /var/lib/gdm
    chown -R gdm:gdm /var/lib/gdm

    • Fela Aug 19, 2014 @ 10:42

      I just typed the command below and all went well:

      restorecon -R /

  • Latif Dec 5, 2014 @ 6:36

    Thanks a lot, you saved my day……….:)

  • spensor26 May 16, 2015 @ 1:29

    After I petition my head drive and reboot the system I got the same message

  • Bill W Jun 1, 2015 @ 20:35

    I received the same error as well after logging into my graphical desktop, and found that my ~/.gconf had a different UID than the one displayed when running the ‘id’ command. I understand what caused the UID mismatch; changing my ~/.gconf using chown -R login_id ~/.gconf fixed it.

  • spensor26 Jan 10, 2016 @ 1:56

    Hi Guys,
    How can are install Eclipse Mars on Web logic, or fix it? it is so slow, very slow.

  • Dennis Apr 25, 2016 @ 15:05

    Thanks, this helped me!!

  • Saket Apr 26, 2016 @ 11:02

    Worked like a champ..Issues on /temp directory’s permissions.. :)

  • ila Jul 7, 2016 @ 6:19

    Thanks. this worked for me.

  • Keny Mar 1, 2017 @ 9:56

    Thank you! You save my life.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum