[Bug 1083869] New: Starting vncserver changes existing xauthority
http://bugzilla.opensuse.org/show_bug.cgi?id=1083869 Bug ID: 1083869 Summary: Starting vncserver changes existing xauthority Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: X.Org Assignee: xorg-maintainer-bugs@forge.provo.novell.com Reporter: arvidjaar@gmail.com QA Contact: xorg-maintainer-bugs@forge.provo.novell.com Found By: --- Blocker: --- After starting vncserver in shell all commands fail to connect to X server due to modified xauth. bor@10:~> grep CPE_NAME /etc/os-release CPE_NAME="cpe:/o:opensuse:tumbleweed:20180301" bor@10:~> echo $DISPLAY :1 bor@10:~> echo $XAUTHORITY /run/user/1000/gdm/Xauthority bor@10:~> cp -p /run/user/1000/gdm/Xauthority . bor@10:~> xdpyinfo | head -5 name of display: :1 version number: 11.0 vendor string: The X.Org Foundation vendor release number: 11906000 X.Org version: 1.19.6 bor@10:~> vncserver Warning: 10:1 is taken because of /tmp/.X11-unix/X1 Remove this file if there is no X server 10:1 New '10:2 (bor)' desktop is 10:2 Starting applications specified in /home/bor/.vnc/xstartup Log file is /home/bor/.vnc/10:2.log bor@10:~> xdpyinfo | head -5 No protocol specified No protocol specified xdpyinfo: unable to open display ":1". bor@10:~> cmp -b Xauthority /run/user/1000/gdm/Xauthority Xauthority /run/user/1000/gdm/Xauthority differ: byte 8, line 1 is 12 ^J 1 ^A bor@10:~> XAUTHORITY=Xauthority xdpyinfo | head -5 name of display: :1 version number: 11.0 vendor string: The X.Org Foundation vendor release number: 11906000 X.Org version: 1.19.6 bor@10:~> rpm -q xorg-x11-Xvnc xorg-x11-Xvnc-1.8.0-8.1.x86_64 bor@10:~> ps -ef | grep Xvnc bor 2442 1883 0 18:44 pts/0 00:00:00 /usr/bin/Xvnc :2 -auth /run/user/1000/gdm/Xauthority -desktop 10:2 (bor) -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Speedo,/usr/share/fonts/Type1 -geometry 1024x768 -pn -rfbauth /home/bor/.vnc/passwd -rfbport 5902 -rfbwait 30000 bor@10:~> -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1083869 Stefan Dirsch <sndirsch@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msrb@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1083869 http://bugzilla.opensuse.org/show_bug.cgi?id=1083869#c1 Michal Srb <msrb@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |IN_PROGRESS CC| |arvidjaar@gmail.com Assignee|xorg-maintainer-bugs@forge. |msrb@suse.com |provo.novell.com | Flags| |needinfo?(arvidjaar@gmail.c | |om) --- Comment #1 from Michal Srb <msrb@suse.com> --- The vncserver command does change the current Xauthority file, but it should only add records for the new display number, not modify any existing ones. Can you please add the output of `xauth list` before and after running vncserver? You can delete part of the cookies if you want to keep them secret, but please leave enough to be recognizable which two are the same. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1083869 http://bugzilla.opensuse.org/show_bug.cgi?id=1083869#c2 Andrei Borzenkov <arvidjaar@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(arvidjaar@gmail.c | |om) | --- Comment #2 from Andrei Borzenkov <arvidjaar@gmail.com> --- (In reply to Michal Srb from comment #1) bor@10:~> xauth list 10/unix: MIT-MAGIC-COOKIE-1 28df6f0a6055ef7c2328b6cfc12f43c2 #ffff#3130#: MIT-MAGIC-COOKIE-1 28df6f0a6055ef7c2328b6cfc12f43c2 bor@10:~> vncserver Warning: 10:1 is taken because of /tmp/.X11-unix/X1 Remove this file if there is no X server 10:1 New '10:2 (bor)' desktop is 10:2 Starting applications specified in /home/bor/.vnc/xstartup Log file is /home/bor/.vnc/10:2.log bor@10:~> xauth list 10/unix:2 MIT-MAGIC-COOKIE-1 9f84db0fd6e874540d92ca4fc8ff1194 0.0.0.10:2 MIT-MAGIC-COOKIE-1 9f84db0fd6e874540d92ca4fc8ff1194 bor@10:~> -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1083869 http://bugzilla.opensuse.org/show_bug.cgi?id=1083869#c3 --- Comment #3 from Michal Srb <msrb@suse.com> --- Ok, I see the problem now. The vncserver command calls xauth to add the two extra entries ("10/unix:2" and "0.0.0.10:2"). The xauth command will merge these new entries with the old ones, removing doubles in the process. Normally it would not matter, because the vncserver entries have display number :2 and the real X server has display number :1 (in this case), so no doubles. However, for some reason GDM does not include the display number in its xauth entries. So those xauth entries would be used for every display number. During the merge those old entries are considered as being intended for the same display as the new ones and are replaced with them. I am not sure who is at fault yet, we could fix it by: * Changing GDM to include the display number. * Changing the merge policy in xauth. * Changing vncserver to create its own Xauthority file. Debugging more.. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com