Cannot Get VNC To Show Desktop

So I’ve tried multiple things I’ve found in various threads here:

I’m trying to get VNC to work but keep getting a “Cannot Currently Show Desktop” Error over and over. Here’s what I’ve done so far:

Installed VNCServer from dietpi_software
I’ve tried adding :1 after the IP address on my VNC Viewer on my desktop, it returns a “refused connection” error.

I’ve tried to edit /DietPi/dietpi.txt as suggested in several threads but when I SSH in with root and do nano /Dietpi/dietpi.txt I get a “/DietPi does not exist” message.

The same thing happens if I SSH in with the DietPi user.

I’m at a complete loss here and any help would be appreciated.

I should note that everything else seems to be working no problem.

Hi,

pls can you give some more details on your system. What SBC, what DietPi version you are using.

Furthermore /DietPi did not exist anymore. Whole content was moved to /boot

Using a Raspberry Pi 4B

Linux DietPi 5.4.72-v7l+

why not using RealVNC?

Sorry should have specified, I did install RealVNC from dietpi_software and am trying to connect via VNCViewer from my Desktop. It connects but displays the “cannot currently show the desktop” error.

But I didn’t know about the depreciation of the DietPi directory. Now I’ve set hdmi_safe=1 in config.txt and its working.

Thanks so much!

do you have any other desktop environment installed? Or set to autostart? Let’s check which port is used by RealVNC.

ss -tulpn | grep LISTEN

Thanks I got it to work once I knew about the DietPi directory depreciated and those files moved into boot. Appreciate the help!

what did you changed now to get it working