Possible explanations:
1. If the TurboVNC session is using Display :1, then you're probably running into this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1673793
Basically, if WaylandEnable=false, GDM stomps on Display :1 when you log in locally. It doesn't bother to check whether anything else is currently using Display :1. Newer versions of GDM seem to care more about the abstract socket associated with the X display than the Unix domain socket under /tmp/.X11-unix. Thus, I am investigating whether TurboVNC can listen on an abstract socket, with the hope that this will prevent GDM from stomping on TurboVNC's display. https://github.com/TurboVNC/turbovnc/commit/f2a575f07623026e9212fd3f963695f2b79c270a, which I pushed earlier this week, makes TurboVNC's vncserver script check for an in-use abstract socket before declaring that a display number is available. This prevents TurboVNC from stomping on GDM if GDM is using Display :1 and /tmp/.X11-unix/X1 is accidentally deleted.
If that is the cause of the issue, then forcing the TurboVNC
session to use :2 (by passing :2 to /opt/TurboVNC/bin/vncserver)
is an effective workaround.
3. You may not have the dbus-x11 package installed. The TurboVNC
.deb packages now require dbus-x11 as a dependency, but that
change landed after the TurboVNC 3.1 release. If dbus-x11 is not
installed, then TurboVNC sessions will try to use the same D-Bus
session as local logins, so there will be conflicts such as what
you describe.
--
You received this message because you are subscribed to the Google Groups "TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbovnc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/22506e22-5e4f-455e-92fd-973019316e59n%40googlegroups.com.
If in fact the issue is #1, then you can work around it by passing '-listen local' to /opt/TurboVNC/bin/vncserver when starting the TurboVNC session. Apparently GDM will not stomp on the TurboVNC session's X display number if the TurboVNC session listens on the abstract Unix domain socket associated with its X display number. By default, TurboVNC only listens on the pathname Unix domain socket (under /tmp/.X11-unix) associated with its X display number, but passing '-listen local' to vncserver causes TurboVNC to listen on the abstract UDS as well.
There are apparently some security
concerns regarding abstract Unix domain sockets, so I'm
reluctant to enable this by default. I just wanted to document
it as a workaround.
As far as the screen saver not accepting your password, that may be due to this issue:
https://github.com/TurboVNC/turbovnc/issues/238
That is a known issue with GNOME and has
to do with the fact that GNOME doesn't fully support multiple
sessions. TurboVNC is able to work around most of the GNOME
issues by setting up an independent D-Bus instance for each
TurboVNC session, but there are a few lingering issues such as
this. TigerVNC, by contrast, punts on the issue and does not
support multiple simultaneous TigerVNC sessions (or a
simultaneous TigerVNC and local session) under the same user
account. That is, IMHO, an unnecessary overkill, because plenty
of window managers (MATE, Xfce, etc.) work perfectly fine with
multiple simultaneous sessions, and we are able to make GNOME
work well enough to be usable.
Dear DRC,
many thanks for your replies!
regarding 1): I am using :2 (because :1 seems to be used by Ubuntu; if I try to use :1, I get a crashed session dialog)
You should be able to work around that by using the latest
pre-release build
(https://turbovnc.org/DeveloperInfo/PreReleases), which avoids
using Display :1 if it detects that the abstract Unix domain
socket associated with Display :1 is in use, and passing -listen local to /opt/TurboVNC/bin/vncserver
(or setting $serverArgs = "-listen local";
in turbovncserver.conf), which causes the TurboVNC Server
to listen on an abstract Unix domain socket (thus preventing GDM
from stomping on TurboVNC's display.) With that configuration,
Display :1 will be chosen by either GDM or TurboVNC, depending on
which is started first. The other will choose Display :2. Note
that there are some articles out there that caution against the
security ramifications of abstract Unix domain sockets, but I
can't find any evidence that they are definitively less safe than
the world-readable pathname Unix domain sockets under /tmp/.X11-unix.
I am still investigating that and may decide to enable -listen local by default in a future
TurboVNC release, as Xorg does.
regarding 2): I have not changed $useVGL in /etc/turbovncserver.conf and I am not using -vglshall I try it?
No. Running the window manager with VirtualGL could have been
the cause of the problem, but it won't fix the problem.
regarding 3): dbus-x11 is installed
I see now that it was you who reported the issue caused by the lack of a dbus-x11 dependency, so I apologize for that noise.
regarding https://github.com/TurboVNC/turbovnc/issues/238:
loginctl unlock-session does not work for me.
You didn't read far enough. See:
https://github.com/TurboVNC/turbovnc/issues/238#issuecomment-739065121
-list local did not help unfortunately.
> I found a workaround: Use GNOME3 in the physical session and
GNOME-flashback (export TVNC_WM=2d)
> in the VNC session. Due to the two different session types, I
avoid the problem where an unlock
> of the VNC session also unlocks the physical session, so I do
not have to log out the physical session :)
I am still unable to reproduce the issue, and I can't imagine
why running the Flashback session would matter. Flashback just
puts a GNOME 2-style GUI on top of the GNOME 3 shell. It's
still GNOME 3 under the hood. I would love to figure out why
the issue is occurring on your system, because it might reveal a
deficiency in TurboVNC that needs to be addressed. Any chance
you could send me the TurboVNC Server log from a TurboVNC
session that was killed whenever you logged out of the local
session?
I still can't reproduce it. Does the issue occur only if the TurboVNC session is started from the local session? Does it also occur if the TurboVNC session is started independently, e.g. from an SSH session?
I'm suspicious because you said "the
physical/:0 GNOME3 session." On my system, a local GNOME
session uses :1 if WaylandEnable=false (which you said was the
case on your system.) That may indicate that something is
different about your system.
Also, please upgrade the server to the
latest 3.1.x pre-release build
(https://turbovnc.org/DeveloperInfo/PreReleases) so that we're
on the same page. That build automatically enables '-listen
local', so it shouldn't be necessary to specify Display :2
anymore.
DRC
--
You received this message because you are subscribed to the Google Groups "TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbovnc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/7d68208e-5946-4723-aa68-ad84fc5982d4n%40googlegroups.com.
I still can't reliably reproduce the issue
on my machine, but I am suspicious that it might have something
to do with the XAUTHORITY environment variable. In a local
session, XAUTHORITY is set to /run/user/501/gdm/Xauthority. If
XAUTHORITY is set, then vncserver instructs Xvnc to use that X
authority file, and it wouldn't surprise me if GDM does
something to that file when you log out. Can you try the
following when launching a TurboVNC session from the local
session?
unset XAUTHORITY
/opt/TurboVNC/bin/vncserver
That should simulate what happens in an SSH session. If that resolves the issue, then vncserver probably just needs to ignore XAUTHORITY.
This would also explain why you don't see
the problem with lightdm. lightdm sets XAUTHORITY to
~/.Xauthority, which is the traditional X authority location
that doesn't rely upon systemd.
--
You received this message because you are subscribed to the Google Groups "TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbovnc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/600fa4dd-be47-462b-83a8-1bccd5487ecan%40googlegroups.com.
On Jan 20, 2024, at 2:59 AM, Felix Natter <felix....@sidact.com> wrote:
--
You received this message because you are subscribed to the Google Groups "TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbovnc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/4b460df9-b5e4-41a1-80bf-62fb4dd0dd98n%40googlegroups.com.
<g3-gdm-vs-ssh-env.diff><g3-gdm-vs-lightdm.diff><g3-vs-mate-lightdm.diff>
To be clear, when I talked about starting
a session from SSH, I meant connecting directly to the system
using SSH, not doing 'ssh localhost' from the local session.
However, I'm not sure if that matters.
The value of XDG_SESSION_TYPE should
always be x11 in a TurboVNC session, so I suspect that you
recorded the environment variables too early. The only
difference that matters is the difference between the
environment variables inside of a TurboVNC session that fails
vs. a TurboVNC session that succeeds. Please record the
environment variables inside of the TurboVNC sessions and pipe
them through 'sort' before diffing them. It would also be more
meaningful to compare a failing vs. successful configuration
using the same window manager, i.e. the difference between
TurboVNC/GNOME sessions that succeed vs. fail and the difference
between TurboVNC/MATE sessions that succeed vs. fail.
--
You received this message because you are subscribed to the Google Groups "TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbovnc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/4b460df9-b5e4-41a1-80bf-62fb4dd0dd98n%40googlegroups.com.
The most relevant comparisons are g3_g3_gdm.envlog vs. mate_g3_lightdm.envlog and g3_mate_gdm.envlog vs. mate_mate_lightdm.envlog, since they compare the same window manager running in TurboVNC with an always-failing vs. an always-successful configuration.
Comparing g3_g3_gdm.envlog vs. mate_g3_lightdm.envlog, nothing really stands out except:
-
XAUTHORITY=/run/user/{uid}/gdm/Xauthority in the failing
configuration vs. XAUTHORITY=~/.Xauthority in the successful
configuration.
- XDG_CONFIG_DIRS and XDG_DATA_DIRS contain
/etc/xdg/xdg-ubuntu-xorg in the failing configuration vs.
/usr/share/ubuntu in the successful configuration.
- SYSTEMD_EXEC_PID is set in the failing configuration.
- SSH_AGENT_LAUNCHER is set in the failing configuration (but I
don't see how that could matter.)
- Some XDG_ display manager variables are set in the successful
configuration (but I don't see how that could matter.)
Comparing g3_mate_gdm.envlog vs. mate_mate_lightdm.envlog, nothing really stands out except:
- GNOME_SHELL_SESSION_MODE,
GNOME_TERMINAL_SCREEN, and GNOME_TERMINAL_SERVICE are set in the
failing configuration (but MATE doesn't use any of those.)
-
XAUTHORITY=/run/user/{uid}/gdm/Xauthority in the failing
configuration vs. XAUTHORITY=~/.Xauthority in the successful
configuration.
- XDG_CONFIG_DIRS and XDG_DATA_DIRS
contain /etc/xdg/xdg-ubuntu-xorg in the failing configuration.
- SYSTEMD_EXEC_PID is set in the
failing configuration.
- SSH_AGENT_LAUNCHER is set in the
failing configuration (but I don't see how that could matter.)
Comparing the sometimes-failing configuration (g3_mate_lightdm.envlog) vs. an equivalent always-successful configuration (mate_mate_lightdm.envlog), nothing really stands out except:
- GNOME_SHELL_SESSION_MODE, GNOME_TERMINAL_SCREEN, and GNOME_TERMINAL_SERVICE are set in the failing configuration (but MATE doesn't use any of those.)The next thing I would try is unsetting SYSTEMD_EXEC_PID before invoking /opt/TurboVNC/bin/vncserver. (Be sure to verify that it remains unset inside of the TurboVNC session.) If that doesn't change the situation, then try removing /etc/xdg/xdg-ubuntu-xorg from XDG_CONFIG_DIRS and XDG_DATA_DIRS (but I doubt that will matter.) Unfortunately, I have no other ideas.
DRC
--
You received this message because you are subscribed to the Google Groups "TurboVNC User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbovnc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/06e641ac-f8d8-42fc-b903-686b519f78e9n%40googlegroups.com.
Sounds good. I will revisit if I am ever
able to reproduce the issue.
To view this discussion on the web visit https://groups.google.com/d/msgid/turbovnc-users/94ab41f9-5cb0-48bb-b9bc-b31e15c7fb8an%40googlegroups.com.