Not able to see the desktop but only the vncconfig window

89 views
Skip to first unread message

Hsu Jason

unread,
Feb 9, 2022, 8:54:38 AM2/9/22
to TigerVNC User Discussion/Support
I'm still learning Linux and first time use TigerVNC.  I created a VM on Hyper-V with ubuntu server 20.04 and installed ubuntu-gnome-desktop and tigervnc on port 5901 (-localhost no :1.) on it.  I can use $> startx to start GNOME desktop and see it successfully.  However, when I can only see the small grey window with 4 checkboxes like: Accept clipboard from viewers, etc... by use VNC Viwer, TigerVNC Viewer Java or MobaXterm.

Please advice about where I'm missing.

Here is my ~/.vnc/xstartup
#!/bin/sh
# Start Gnome 3 Desktop
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-launch --exit-with-session gnome-session &


And in vncserver@.service:
[Unit]
Description=VNC Server by TeknoTut
After=syslog.target network.target

[Service]
Type=forking
User=jason
Group=jason
WorkingDirectory=/home/jason
PIDFile=/home/jason/.vnc/%H:%i.pid

# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/usr/bin/vncserver -kill :%i > /dev/null 2>&1 || :
ExecStart=/usr/bin/vncserver -geometry 1600x900 -depth 24 -localhost no :%i
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

Reply all
Reply to author
Forward
0 new messages