解决Centos 7 VNC黑屏
生活随笔
收集整理的這篇文章主要介紹了
解决Centos 7 VNC黑屏
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
在配置Centos 7下VNC時發(fā)現(xiàn)root用戶可以正常登陸VNC桌面,而普通用戶VNC桌面黑屏,分析~/.vnc/xstarup 后發(fā)現(xiàn)是普通用戶沒有執(zhí)行/etc/X11/xinit/xinitrc的權(quán)限
#!/bin/shunset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS /etc/X11/xinit/xinitrc # Assume either Gnome or KDE will be started by default when installed # We want to kill the session automatically in this case when user logs out. In case you modify # /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should # be responsible to modify below code to avoid that your session will be automatically killed if [ -e /usr/bin/gnome-session -o -e /usr/bin/startkde ]; thenvncserver -kill $DISPLAY firoot權(quán)限依次執(zhí)行以下命令,給其他用戶對此文件的讀和執(zhí)行權(quán)限
#chmod 755 /etc/X11/xinit/xinitrc #chmod 755 /etc/X11/xinit/xinitrc-common這時用普通用戶權(quán)限執(zhí)行 /etc/X11/xinit/xinitrc,出現(xiàn)以下錯誤
yala@A-boat:~$ /etc/X11/xinit/xinitrc xrdb: Can't open display '' xmodmap: unable to open display ''(process:1367): dconf-CRITICAL **: 10:39:23.653: unable to create file '/run/user/1001/dconf/user': 權(quán)限不夠. dconf will not work properly.(process:1367): dconf-CRITICAL **: 10:39:23.654: unable to create file '/run/user/1001/dconf/user': 權(quán)限不夠. dconf will not work properly.我們把對應文件chown下
chown yala:yala /run/user/1001/dconf -R總結(jié)
以上是生活随笔為你收集整理的解决Centos 7 VNC黑屏的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Django Python MySQL
- 下一篇: CentOS7 编译安装LVS 互为主备