How to connect via X11 Forwarding properly?

Hi everyone!

I need help connecting via SSH to a raspberry Pi running nextcloudpi. On the Pi I installed xfce4 +goodies, and want to remotely connect to the desktop. But it doesnt matter what I try, i can’t figure out how to to that properly.
Doing ssh -Y pi@myserver xfce4-session results in xfce mixing in as an underlay into GNOME on my laptop. So how can I acces this Pi without a monitor via SSH or VNC?

Thanks in Advance!

Not at all? Without a monitor plugged into the pi it is the common way to use ssh.

To understand X11 Forwarding correctly: It is made to forward an x-server to a client. If you use linux, then it will put the window on top and create a new layer.

The common way is to call a program from your pi, not the whole environment.

If you want to view the whole desktop, then use VNC or Anydesk for example.

Do you have some resources that actually work for VNC? Because when i try to VNC into the Pi, it just gives me a normal Terminal Window.
And yes, I tried just getting one window through SSH, that works for Thunar, it doesnt work for gparted. If I try “sudo gparted”, I get:
Unit tmp.mount does not exist, proceeding anyway.
X11 connection rejected because of wrong authentication.
(gpartedbin:4997): Gtk-WARNING **: 16:31:55.409: cannot open display: localhost:10.0

I also cant acces synaptic when I use sudo. And how do I start the graphic interface of timeshift?
I just cant find a comprehensive guide on these questions, but suggestions would be great!

Check the ~/.xinitrc file if there is a command like exec $(get_session) or exec xfce4.

Then you should be able to login in textmode and run startx to launch the DE via VNC.