Hi,
I am using VNC on Windows for an Ubuntu 22.04 system. I encountered the same error, and doing SSH solved some problems but not all. This is because whenever I want to upload something, it opens the files select window in the host monitor and not in the VNC display. I can see Firefox in the VNC display, but not this file select window that pops up when I want to upload something.
I ran the following command to open firefox in VNC client and a virtual display. I have not connected any monitor to my ubuntu system after this error happened and the upload window still does not appear in VNC virtual display.
shivam157@ubuntu:~$ ssh -Y shivam157@ubuntu
shivam157@ubuntu:~$ export DISPLAY=:3.0
shivam157@ubuntu:~$ firefox &
Does anyone know how to fix this problem of the upload window popping up in the wrong display?