VNC on RHEL7 with default setting not showing GNOME

Latest response

I have used the VNC configurator tool available on https://access.redhat.com/labsinfo/vncconfig to setup the VNC. The setup went fine. When checking the server status, here is what I get

systemctl status vncserver@:1.service

â vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Wed 2017-11-01 18:30:50 CET; 14h ago
Process: 1985 ExecStop=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Process: 1342 ExecStart=/sbin/runuser -l blecha -c /usr/bin/vncserver %i -extension RANDR -geometry 1200x900 (code=exited, status=0/SUCCESS)
Process: 1318 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)

Nov 01 18:30:47 almatechpc10 systemd[1]: Starting Remote desktop service (VNC)...
Nov 01 18:30:50 almatechpc10 systemd[1]: Started Remote desktop service (VNC).

My xstartup script is the following:

!/bin/sh

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-launch --exit-with-session gnome-session &

When I try to access the remote server via RealVNCViewer or VNCViewer, a got a black screen with messages "accept clipboard from viewers", etc (see attached image .

It seems that the Xstart is not correct. I have tried the following xstartup:

!/bin/sh

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

exec /etc/X11/xinit/xinitrc &

which shows a least a desktop, but without any toolbar and background color.

Would it be possible to get the Xstartup file that is tuned for RHEL7 to display properly GNOME desktop, or any other instruction.

The vncconfig.sh I have used in appended.

Attachments

Responses