解决方法——非root用户startx时报错

OS:redhat9
系统安装的时候只有X,没有kde之类的窗口桌面。
root登录后以非root用户startx时报:
PAM authentication failed, cannot start X server.
Perhaps you do not have console ownership?

解决方法:
touch /var/run/console/
比如 touch /var/run/console/oracle
请使用浏览器的分享功能分享到微信等