个人工具
登录
查看“UbuntuHelp:DmrcErrors”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:DmrcErrors”的源代码
来自Ubuntu中文
←
UbuntuHelp:DmrcErrors
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/dmrcErrors}} {{Languages|UbuntuHelp:dmrcErrors}} == dmrcErrors == This page deals with .dmrc and $HOME permission error messages generated during session logins and how to correct the errors. == The Error Message == During a session log on, the following message is displayed. The user may continue to the Desktop after acknowledging the message. <pre><nowiki> 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. </nowiki></pre> https://help.ubuntu.com/community/dmrcErrors?action=AttachFile&do=get&target=dmrc_error.png == The Cause == 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 common cause of this error is 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. == The Fix == 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 '''bold''' are portions of the generated error message. <u>Replace all instances of ''username'' with your login name</u>. . Open a terminal: In Hardy, using the menus, go to "Applications, Accessories, Terminal" , or ALT-F2, type ''gnome-terminal'' in the window, tick 'Run in terminal' and click on "RUN" or From the login screen, select ''Options'' from the lower left corner of the screen. Select ''Failsafe Terminal'', enter your username and password, and enter the commands in this wiki into the terminal window that opens. . '''''User's .dmrc file should be owned by user:''''' <pre><nowiki> sudo chown username /home/username/.dmrc </nowiki></pre> Example for a user with a login of ''john'': <code><nowiki>sudo chown john /home/john/.dmrc</nowiki></code> . '''''and have 644 permissions:''''' <pre><nowiki> chmod 644 /home/username/.dmrc </nowiki></pre> Note: If you look at the actual ~/.dmrc permissions, you will see that the system defaults to "644". If you view the permissions after logging back in, you will find the system has changed the permissions to "600" ( <code><nowiki>-rw------</nowiki></code> ). You can substitute "600" in this command if you wish. . '''''User's $HOME directory must be owned by user:''''' <pre><nowiki> sudo chown username /home/username </nowiki></pre> Note: This command does 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. . '''''and must not be writable by others:''''' <pre><nowiki> chmod 755 /home/username </nowiki></pre> Other acceptable permissions include 750 or 700. note. <pre><nowiki> ls /home -l drwxr-xr-x 143 user user </nowiki></pre> is what you want to aim for. 'originally; I had something like drwxrwxrwxr user user I had set the permissions as 777 after reading about this i tried chmod 700 /home/username and logged out no problems but went to chmod 755 /home/username It's a pity that the .dmrc error message really is pretty useless as its rarely the real problem. . Log out and back in for the changes to take effect. Rebooting is not necessary. == The .dmrc File == The .dmrc is an initialization file which the system checks during session login. 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. . <pre><nowiki> [Desktop] Session=gnome Language=cs_CZ.UTF-8 </nowiki></pre> == Summary == 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 [[UbuntuHelp:LiveCD|LiveCD]] Desktop without modification. <u>Replace all instances of ''username'' with your login name</u>. . <pre><nowiki> sudo chown username:username /home/username/.dmrc chmod 644 /home/username/.dmrc sudo chown username:username /home/username chmod 755 /home/username </nowiki></pre> Log out of your current session and back in. Rebooting is not necessary but will accomplish the same thing. == See Also == * [[UbuntuHelp:dmrcErrors/../FilePermissions|FilePermissions]] == External Links == * [http://www.gnome.org/projects/gdm/docs/2.20/configuration.html Gnome Display Manager Reference Manual] Sections 6.1 & 6.3 * [http://ubuntuforums.org/showthread.php?t=976610 Ubuntu Forums discussion link] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:DmrcErrors
。