Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old November 9th, 2008   #1
drs305
Ubuntu addict and loving it
 
Join Date: Jan 2007
Beans: 6,630
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 05:31 PM.. Reason: Added wiki link.
drs305 is offline   Reply With Quote
Old November 12th, 2008   #2
bodhi.zazen
Ubuntu Guru
 
bodhi.zazen's Avatar
 
Join Date: Apr 2006
Location: Montana
My beans are hidden!
Xubuntu Development Release
Send a message via Yahoo to bodhi.zazen
Re: Solving .dmrc and $HOME Permission Errors

Very nice post , this is obviously a FAQ.

Consider posting this information on the wiki
__________________
A person with ubuntu is open and available to others, affirming of others, does not feel threatened that others are able and good, for he or she has a proper self-assurance that comes from knowing that he or she belongs in a greater whole and is diminished when others are humiliated or diminished, when others are tortured or oppressed. ~ Archbishop Desmond Tutu, 1999

bodhi.zazen is offline   Reply With Quote
Old November 12th, 2008   #3
ajmorris
Fresh Brewed Ubuntu
 
ajmorris's Avatar
 
Join Date: Sep 2006
Location: Victoria, Australia
My beans are hidden!
Ubuntu Jaunty Jackalope (testing)
Send a message via AIM to ajmorris Send a message via MSN to ajmorris Send a message via Yahoo to ajmorris Send a message via Skype™ to ajmorris
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 real-time help, away from the hustle and bustle of #ubuntu? Check out the beginners team IRC focus group IRC channel, ##beginners-help on irc.freenode.net
BeginnersAreaTeam

Please mark your threads, where applicable, as solved
HOWTO 'thank' useful posts.
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

ajmorris is offline   Reply With Quote
Old November 16th, 2008   #4
kevdog
I Want My $2!!
 
kevdog's Avatar
 
Join Date: Mar 2007
Location: Denver, CO
Beans: 7,077
Ubuntu 8.10 Intrepid Ibex
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
kevdog is offline   Reply With Quote
Old November 17th, 2008   #5
hackerlife
Just Give Me the Beans!
 
Join Date: Aug 2008
Location: Seattle, Washington
Beans: 51
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!!)
hackerlife is offline   Reply With Quote
Old November 19th, 2008   #6
Melindrea
A Carafe of Ubuntu
 
Join Date: May 2008
Beans: 117
Ubuntu 8.04 Hardy Heron
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. =)
Melindrea is offline   Reply With Quote
Old January 14th, 2009   #7
dimbulb1024
A Carafe of Ubuntu
 
dimbulb1024's Avatar
 
Join Date: Feb 2007
Location: Denver, Colorado
Beans: 126
Ubuntu 9.04 Jaunty Jackalope
Send a message via AIM to dimbulb1024 Send a message via MSN to dimbulb1024 Send a message via Yahoo to dimbulb1024
Re: Solving .dmrc and $HOME Permission Errors

A big thanks to you drs305.

This took care of my error message.
__________________
Life wastes itself while we are preparing to live. - Ralph Waldo Emerson
LarsonsWorld - just another persons waste of time
Laptop Specs | Linux User # 442197 | Ubuntu User # 11956 | Ubuntu - My First Year
dimbulb1024 is offline   Reply With Quote

Bookmarks

Tags
.dmrc permission errors, solved thank you!

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:01 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry