Bug 7476 - User applications don't work if $XAUTHORITY is lost
Summary: User applications don't work if $XAUTHORITY is lost
Status: CLOSED WORKSFORME
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Agent (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.16.0
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-09 15:43 CET by Pierre Ossman
Modified: 2024-01-23 13:31 CET (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2020-03-09 15:43:42 CET
If the environment variable $XAUTHORITY is somehow lost then Xvnc will reject the X11 connection and applications will fail to function. This is a fairly rare condition, but happens sometimes with complex setups. And it does work locally so it should work in ThinLinc.

The reason it works locally is because modern distributions configure their X server to allow all connections from the same user:

> $ xhost
> access control enabled, only authorized clients can connect
> SI:localuser:ossman

Not so in ThinLinc:

> $ xhost
> access control enabled, only authorized clients can connect

And you can easily test the difference between local:

> $ XAUTHORITY= xdpyinfo
> name of display:    :0
> version number:    11.0
> vendor string:    Fedora Project
> ...

and in ThinLinc:

> $ XAUTHORITY= xdpyinfo
> No protocol specified
> xdpyinfo:  unable to open display ":10".
Comment 2 Frida Flodin cendio 2021-10-20 13:54:44 CEST
I think I stumbled upon the same problem but not in a very complex setup.

tl-4.13.0 server 
Ubuntu 20.04
gnome-session and gdm3 installed
Chromium 94.0.4606.81 snap


Trying to run chromium inside ThinLinc session I get:
> $ chromium
> No protocol specified
> [6761:6761:1020/112608.034506:ERROR:browser_main_loop.cc(1400)] Unable to open X display.

Running chromium locally works fine. And when I disable access control it also works fine inside the ThinLinc session:
> $ xhost + 
> access control disabled, clients can connect from any host
> $ chromium
Comment 4 Pierre Ossman cendio 2024-01-23 13:31:34 CET
This got fixed in bug 7788.

Note You need to log in before you can comment on or make changes to this bug.