Some windows launched from main desktop open in localhost:1 VNC session

I’m running Tumbleweed (20200810 currently, though this has persisted through earlier dups). KDE is my main environment, but I have a vnc session on the machine for applications which I use both when I’m at the machine and when I’m remotely working. The vnc session is running xfce.

When I run gtk-specific apps from the KDE/Plasma panel’s Application Menu or gtk-specific windows from the same panel’s systray, these apps and windows launch inside the vnc session.

Example video here

Is there any way to intentionally control whether or not this happens? This is occasionally very inconvenient, and I feel that in some way it could pose potential security risks.

If I were to hazard a wild guess based only on your video, the reason why the app launched in your VNC session is because your Desktop focus was on the VNC session’s window. Maybe that shouldn’t happen, I’m must speculating on what I think could be a reasonable connection.

I suppose you could test this by modifying how focus is set in your VNC settings.

Also,
You might consider locally logging into your system with two accounts and switching between the two instead of remotely logging into one of your sessions. Or, logon to both your sessions remotely.
I’d expect that your system wouldn’t confuse the different sessions either way.

TSU

Package update indicator has

NotShowIn=GNOME;KDE;

so it should not be present in KDE at all. Educated guess - package update indicator runs in Xfce session. It registers status icon via session D-Bus interface org.kde.StatusNotifierWatcher. There is (normally) only one session bus with well known address and name org.kde.StatusNotifierWatcher name is owned by KDE system tray. So when PUI starts, it registers system tray icon in KDE system tray but of course it itself runs and opens its windows in Xfce session on display associated with it.

As a general comment - it became increasingly more difficult (up to impossible) to have multiple (GUI) user sessions in Linux. Initially systemd had vague concept of per-user and per-session scopes (scope is not used in strict systemd meaning here) but latest trend in desktop environment design makes them effectively the same. Your question is excellent example of problems associated with it.

As someone who needs to perform remote support on regular basis I hate it, but there is not much we can do here.