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.