如何在成功登录后停止Centos 7 Desktop返回登录屏幕?

时间:2015-04-27 04:02:29

标签: linux login centos centos7 gnome-3

所以我刚刚用桌面安装了Centos 7。在安装之后,我安装了我的开发环境以及何时连接我的Windows ssd,但被告知需要关闭而不是休眠。所以我重启了我的系统,启动进入windows,然后点击关机。之后,我登录了我的Centos 7系统,在成功输入密码后,它将启动登录过程,然后闪烁黑屏。很快,它将显示已启动的虚拟化守护程序,然后再次加载登录屏幕!

为什么这样做?我该如何解决?那我怎么能在将来避免这种情况呢?

感谢您的帮助!

5 个答案:

答案 0 :(得分:3)

在GRUB阶段中断启动并启动到运行级别1,AKA单用户模式。通过键入诸如“space”之类的字符来中断GRUB,然后通过键入“a”,通过“rhgb quiet”退回并附加“1”来附加到内核行。这将为您提供root shell而不是登录提示。 从那里,您可以在/ etc / environment中注释所有最近的条目,并重新启动您的服务器/ PC

答案 1 :(得分:1)

I faced the same problem on Centos 6.7 after yum update and fix with below steps.

I noticed that some commands not working on terminal which can be opened via CTRL+ALT+F4 on login screen.

-bash: startx: command not found

I have opened a file under /etc/profile.d with root privileges

nano /etc/profile.d/fix.sh

and added command to set missing definitions to PATH

export PATH=$PATH:/bin:/usr/local/bin:/usr/bin

After restart the OS, everything works fine.

答案 2 :(得分:0)

我最终重新安装了操作系统。但是,我最终得到了同样的问题。这是两部分错误。因此,在我的/ etc / environment文件中添加任何内容都会导致系统无法登录。此外,安装后,您需要sudo / etc / passwd,因为gnome-init-shell和gdm需要删除:/ sbin / nologin。我们必须采取额外步骤,这有点愚蠢。现在,如果你像我一样,安装了所有东西并且害怕重新安装,你可以放入启动盘/ usb并进入恢复模式。它将向您展示如何进入您的系统,并从那里,它只是使用vi来修复passwd。

答案 3 :(得分:0)

我的操作系统RedHat Enterprise Linux 7.4

在对Redhat 7.5进行yum更新(包括内核升级和一大堆其他更新)后,RedHat 7.5无法登录并退回/重定向回登录GUI /屏幕。

这对我有用:

  1. CTRL + ALT + F2
  2. 提升为sudo或root
  3. chown -R ram:ram / home / ram#< - 为有问题的用户递归更改$ HOME目录所有权。使用用户:与您相关的组合
  4. CTRL + ALT + F1 并再次尝试登录。 我能够登录。
  5. <强>解决方案:2 如果上述内容对您不起作用,您也可以undo last yum update

    yum history list
    yum history info id_number
    yum history undo id_number
    

    然后重新启动。

    如果您甚至无法通过组合键 CTRL + ALT + F2 boot into single user mode和尝试解决方案:2

    这适用于CentOS&amp; Fedora也是如此。

答案 4 :(得分:0)

我通过搜索发现了这个问题。事实证明,CentOS可能不喜欢其中带有句点的用户名。当我登录shell时,它说/home/first.last不存在。作为参考,我正在安装:http://central-7-0-x86-64.rocksclusters.org/roll-documentation/base/7.0/install-frontend-7.html