ubuntu 12.04无法登录

我使用的是Ubuntu 12.04。 我不能登入。 我进入grub菜单并转到root,删除我的/home/user/.Xauthority文件并更改我的密码。 我将/home/user/.profile移动到/home/user/profile ,重启,我可以登录(通过将.profile移动到其他名称来解决此问题)。

但如果我闲置并且Ubuntu显示屏幕保护程序,我无法登录。 我按下了Ctrl + Alt + F1并删除了/home/user/.Xauthority 。 我检查/home/user/.profile的存在,它不存在。 我无法从连接到盒子的键盘登录X. 我可以ssh -CXY到ubuntu框并登录没有任何问题。 有人可以帮我解决这个问题吗?

如何创建新的/home/user/.profile:

 # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022 # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi 

复制,粘贴,保存..