Bug 8167 - ThinLinc's Xauthority is placed in an unusual location
Summary: ThinLinc's Xauthority is placed in an unusual location
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Server (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: MediumPrio
Assignee: Bugzilla mail exporter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-08 15:49 CEST by Linn
Modified: 2023-06-13 13:19 CEST (History)
0 users

See Also:
Acceptance Criteria:
* The script that sets SI:localuser:<username> to xhost should be removed


Attachments

Description Linn cendio 2023-06-08 15:49:20 CEST
Our Xauthority file is current located in /var/opt/thinlinc/sessions/<user>/, which does not seem to be a standard location for Xauthority to be located.

On both Ubuntu and Fedora, Xauthority is located in $XDG_RUNTIME_DIR, which equals to directory /run/user/<uid>/ on those dists. As a consequence, display managers like GDM and Mutter place their Xauthority files in /run/user/<uid>/.

Through bug 7788, we found out that snap applications do not open in ThinLinc out of box, since snap only seem to look for the Xauthority file in a limited number of locations [1]. Since we do not conform to the norm here, there might be other future programs that have the same issue as snap.

1: https://github.com/snapcore/snapd/blob/20ebeee0abcf15cb9e22badc9ab8426a5bb975d9/cmd/snap-confine/mount-support.c#L943

Note that bug 7788 added a (somewhat temporary) solution to the snap issue by setting SI:localuser:<username> when starting the ThinLinc session. This bug instead aims to solve the issue in a more futureproof way, by placing our files in a more expected location.
Comment 1 Linn cendio 2023-06-08 16:04:51 CEST
Some things to take into consideration when doing this bug:

1) More examples for $XDG_RUNTIME_DIR and Xauthority locations should be considered. A starting point could be looking at different dists and desktop environments to see if there is any common standard location for these.


2) Not everything in /var/opt/thinlinc/sessions/<user>/ should necessarily be moved, if the files do not fit in the new location.

   E.g., if /run/user/<uid>/ turns out to be an alternative, directory /run/ in itself has some best practices to be followed. One example is that the files in /run/ should be relatively small, meaning that xinit.log should not be placed in that directory.

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