How to setup the vncserver for Redhat 17

1.install gnome:
yum groupinstall “Server with GUI”
if failed, you can remove the conflicted lib like:
yum remove grub2-common-1:2.02-0.65.el7_4.2.noarch
2.
yum install tigervnc-server
3.
cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service
4.
Edit /etc/systemd/system/vncserver@.service
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-tigervnc
5.
systemctl daemon-reload
6.
vncpasswd
7.vncserver
you will see /root/.vnc/xstartup.
8.xstartup
you will see /root/.vnc/xstartup. Edit xstartup as:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/etc/X11/xinit/xinitrc
unset vncserver -kill $DISPLAY
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &
9.
Start vncserver then launch vncview.

Notice:
We find there are some conflict between the anaconda3 with vncserver.
Mon Apr 30 14:48:00 2018
vncext: VNC extension running!
vncext: Listening for VNC connections on all interface(s), port 5912
vncext: created VNC server for screen 0

(imsettings-check:28470): IMSettings-WARNING **: Could not connect: Connection refused

(imsettings-check:28470): GLib-GIO-CRITICAL **: g_dbus_proxy_call_sync_internal: assertion ‘G_IS_DBUS_PROXY (proxy)’ failed
GLib-GIO-Message: Using the ‘memory’ GSettings backend. Your settings will not be saved or shared with other applications.

** (process:28385): WARNING **: Could not make bus activated clients aware of XDG_CURRENT_DESKTOP=GNOME environment variable: Could not connect: Connection refused

Solution - The root cause turned out to be a PATH setting in the user’s .bashrc file that pointed to an alternate version of dbus-daemon instead of the standard one in /bin. The culprit in my case was an installation of Anaconda Python in the user’s home directory. Setting PATH back to the defaults resolved the issue.

Add a comment before #export PATH="/root/anaconda3/bin:$PATH" then solve the black screen problem.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值