日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > centos >内容正文

centos

解决Centos 7 VNC黑屏

發(fā)布時間:2023/12/10 centos 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 解决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 fi

root權(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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。