Page 1 of 7 123 ... LastLast
Results 1 to 10 of 64

Thread: Solving .dmrc and $HOME Permission Errors

  1. #1
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Solving .dmrc and $HOME Permission Errors

    In a Rush? Go Directly to #5 for the Quick Fix ...

    1. The Error Message:
    • User's $Home/.dmrc file is being ignored. This prevents the default session and language from being saved. File should be owned by user and have 644 permissions. User's $Home directory must be owned by user and not writable by other users.

    2. What does it mean and how did it happen?
    During boot or session start, the system detected an error in the ownership and/or permissions of the $HOME folder or the .dmrc file. You will still be able to gain access to your user account and have administrative (sudo) rights if you are in the admin group.

    The most likely cause of this error was an inappropriate use of the 'chown' or 'chmod' command, possibly combined with the '-R' option. The '-R' switch adds the recursive option to a command, meaning that the command is executed not only on the specific file or folder, but all subfolders and files below it. Be very careful whenever applying the -R switch to a command. If you don't need it, don't use it.

    An example of a command that would cause this to occur would be "chmod -R 777 /home/username" since this would both make the user's home folder writable by others and change the permissions of the .dmrc file to "777". Neither of these is acceptable by the system.

    3. How do I fix it?

    The following commands will restore the ownership and permissions to those acceptable by the operating system. If you perform the commands in order, the use of 'sudo' is not required for the 'chmod' commands. If, for some reason, you are running the livecd (not necessary) and have booted to a root prompt, 'sudo' is not required for any command.

    Items in dark red require changing to your specifics (e.g your user name). Items in dark blue are portions of the generated error message.

    Open a terminal:
    Applications, Accessories, Terminal, or
    ALT-F2, type gnome-terminal in the window and hit "RUN" or
    If you are at the normal login prompt, select Options in the lower left corner, Failsafe Terminal and enter your username and password. Enter the commands from this guide in the terminal window that opens.

    User's .dmrc file should be owned by user:
    Code:
    sudo chown username /home/username/.dmrc
    Example for a user with a logon of 'john': sudo chown john /home/john/.dmrc


    and have 644 permissions:
    Code:
    chmod 644 /home/username/.dmrc
    Note 1: If you look at the actual .dmrc permissions, you will see that the system defaults to "644". If you take a look at the actual permission after logging back in, you will find the system has changed the permissions to "600" ( -rw------- ). You can substitute "600" in this command if you wish.

    User's $HOME directory must be owned by user. Read Notes 2 & 3 before executing this command:
    Code:
    sudo chown username /home/username
    Note 2: I did not use the recursive -R switch. While all folders and files within the $HOME folder normally are owned by the user, the only folder which needs to have the ownership changed to eliminate this error is the $HOME folder itself. You may run this command as "sudo chown -R username:username /home/username" if you want to ensure the entire contents of your home folder belong to you and your usergroup.
    Note 3: When this command is run you may get a message stating "unable to access /home/user/.gvfs.. This is not a problem and references the .gvfs is a virtual file system. The command should do what is necessary to fix the problem, but you can avoid this message by accomplishing these commands first.
    Code:
    umount /home/[username]/.gvfs
    rm -r /home/[username]/.gvfs
    and must not be writable by others:
    Code:
    chmod 755 /home/username
    Other acceptable permissions include 750 or 700.

    Log out and back in for the changes to take effect. Rebooting is not necessary.

    4. What is the .dmrc file?
    The .dmrc is an initialization file which the system checks during session logon. Specifically, gnome checks the file for any specific language or session information it hasn't located elsewhere. While often the file is blank except for the basic header data, it may contain a specific language to use at session startup. Below is an example. The plain text is the default entry, the bold text is what would be added to begin the session with a specific language.
    Code:
    [Desktop]
    Session=gnome
    Language=cs_CZ.UTF-8
    For more information on the .dmrc file, refer to the Gnome Display Manager Reference Manual, Configuration, Sections 6.1 and 6.3.

    5. Solution Summary: No Frills
    Depending on the problem, all of these steps may not be necessary. Running all of them will correct any of the issues addressed by the error message. They can be run in terminal in the current session or from the root prompt in recovery mode. If running from the root prompt, 'sudo' is not required. These commands will not work from the LiveCD desktop without modification .
    Code:
    sudo chown username /home/username/.dmrc
    chmod 644 /home/username/.dmrc
    sudo chown username /home/username 	# if you get a ".gvfs" error message, see Section 3, Note 3
    chmod 755 /home/username
    
    Log out of your current session and back in. 
    Rebooting is not necessary but will accomplish the same thing.
    For the last command, other acceptable permissions include 750 or 700.

    Since you came to the "Quick Fix" you probably didn't read the preceeding sections. If you are sure you want all the files in your home folder to belong to you (which is normal), you can reduce the commands to:
    Code:
    sudo chown -R username /home/username  # if you get a ".gvfs" error message, see Section 3, Note 3
    chmod 755 /home/username
    chmod 644 /home/username/.dmrc
    Log out of your current session and back in. 
    Rebooting is not necessary but will accomplish the same thing.
    6. More Info
    FilePermissions
    Gnome Display Manager Reference Manual
    dmrcErrors Same content in wiki formatting.
    Last edited by drs305; May 15th, 2009 at 10:31 PM. Reason: Added wiki link.
    GRUB2

    Retired.

  2. #2
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Solving .dmrc and $HOME Permission Errors

    Very nice post , this is obviously a FAQ.

    Consider posting this information on the wiki
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #3
    Join Date
    Sep 2006
    Location
    Victoria, Australia
    Beans
    Hidden!

    Re: Solving .dmrc and $HOME Permission Errors

    very nice tutorial You may like to consider adding the differences between sudo paramaters to the end though though, i.e. sudo -i and sudo -s so that errors like this, do not occur
    (obviously this is not the only reason it happens, but it is a big contributer)


    AJ
    Want to find out more about your ubuntu system? see HowTO Ubuntu System
    Want to know a little more about networking? see HOWTO Ubuntu Networking
    Looking for help with something on your ubuntu? see the tutorial of the week sticky


  4. #4
    Join Date
    Mar 2007
    Location
    Denver, CO
    Beans
    7,566
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Solving .dmrc and $HOME Permission Errors

    Congratulations on tutorial of the week. Can't say that I've ever run across this error, however well written guide. This from one tutorial of the week winner to the next

  5. #5
    Join Date
    Aug 2008
    Location
    Seattle, Washington
    Beans
    53
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Solving .dmrc and $HOME Permission Errors

    man, thanks so much!!!
    this was such a well made How-to, definately one of the best ive ever seen!
    i had this problem 'cuz i had to back up my /home (cuz hp wanted to reformat my hdd those bastards!!)

  6. #6
    Join Date
    May 2008
    Beans
    129
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Solving .dmrc and $HOME Permission Errors

    Thank you, thank you, thank you! (I don't know if it solved the problems yet - if not I'll come back and whine.) After reinstalling and backing up my home directory to another partition, I've been having that problem. Not really that much of an issue, but a bit annoying. It was on my "to-do" list. So, thank you very much for (hopefully) helping me fix it. =)

  7. #7
    Join Date
    Mar 2008
    Location
    Vancouver, BC
    Beans
    17
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Solving .dmrc and $HOME Permission Errors

    works great! Very nice tutorial.

  8. #8
    Join Date
    Dec 2007
    Location
    Columbus OH, USA
    Beans
    203
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Solving .dmrc and $HOME Permission Errors

    I ran into this after moving my home directory to a different partition, re-installing Ubuntu and then mounting the partition at my home folder location. Like everyone else, this worked for me. Thanks and cheers!

  9. #9
    Join Date
    Apr 2007
    Location
    Greeley, CO. USA
    Beans
    27
    Distro
    Ubuntu

    Re: Solving .dmrc and $HOME Permission Errors

    AWESOME! totally worked. & worked well. I used 750. I HUGE help to us at Lin-U-Over.com

  10. #10
    Join Date
    May 2008
    Location
    Galax, Va
    Beans
    41
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Solving .dmrc and $HOME Permission Errors

    I followed your directions to the letter and it fixed the login error message but caused another problem.

    After logout - login I got an error "Nautilis encountered an error" with some garbage about bonobo

    had to run

    "killall bonobo-activation-server"

    after another logout-login all is well

Page 1 of 7 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •