Ubuntu 20.04 vnc no window 'decorations' to allow resize of apps

VNC'ing from mac to Ubuntu 20.04 server. Desktop is fine except I cannot resize app windows as they have no 'decorations'.

Is there a way to fix this?

~/.vnc/xstartup

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
startxfce4 &

vnc desktop screenshot


Solution 1:

The problem is due to a bug in the default xfwm4 package in Ubuntu. You need to upgrade xfwm4 to at least 4.14.5.

The easiest solution for me was to upgrade to xfce 4.16 following the guide on this website: https://ubuntuhandbook.org/index.php/2020/12/install-xfce-4-16-ubuntu-20-04-linux-mint-20/

Warning - this solution relies on adding PPA packages for testing purposes and are not official releases.

Steps are as follows:

sudo add-apt-repository ppa:xubuntu-dev/staging
sudo apt update; sudo apt upgrade

Solution 2:

I use xfce (xubuntu) and this fixes it, won't work for ubuntu unless you're using xfce, but I expect there is some equivalent.

xfwm4 --replace