1

I followed this guide to try to connect to my Ubuntu 20.04 machine from my Windows machine; installed tightVNC, changed the xstartup file to show the default Gnome desktop. I start the server with vncserver -geometry 1920x1080 -depth 24.

When I try to connect with VNC viewer however, I see only a blank grey screen. The logs have this line:

/home/username/.vnc/xstartup: 2: def: not found

How can I fix this?

edit: I removed the def on line 2 of the xstartup file and that 'not found' message has gone from the logfile, but I still see a grey screen...

IronWaffleMan
  • 111
  • 1
  • 1
  • 4
  • https://askubuntu.com/questions/1086246/no-vnc-extension-on-display-1 helped me after accidentally installing tigervnc before tightvnc – Charles L. Apr 07 '23 at 00:50

1 Answers1

1

Please post your xstartup file so we can see what you've actually configured.

The guide is for configuring an Xfce4 desktop, so I am assuming that's what you meant until you include xstartup contents in post.

I added startxfce4 to the end as instructed here and works for me.

My xstartup file looks like this:

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
vncconfig -iconic &


# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

startxfce4
yestin
  • 11
  • 3