On my workstation at home, xlogout.d is not always executed. I've seen problems on multiple occasions, but this last time, I had one session active, started another one, then pressed Cancel at the profile selection dialog. In this case, it took many seconds until tl-session terminated. This turned out to be due to NFS timeouts: tl-xinit: cannot stat ../1.1481102364.ended/drives/e: Stale file handle tl-xinit: Could not remove ../1.1481102364.ended. Stray files may remain. This, in turn, is because tl-umount-localdrives was not executed since nothing at all in xlogout.d was executed. The last part of xinit.log is: Running /opt/thinlinc/etc/xstartup.d/12-tl-default-keyboard (Configuring default keyboard layout) Setting default keyboard layout to "us" Running /opt/thinlinc/etc/xstartup.d/20-tl-select-profile.sh (Choosing a profile) /opt/thinlinc/libexec/tl-select-profile: user aborted profile selection tl-xinit: client terminated and returned 0 XIO: fatal IO error 11 (Resursen tillfälligt otillgänglig) on X server ":2" after 2519 requests (2447 known processed) with 0 events remaining. tl-run-xstartup-feedback: Fatal IO error 11 (Resursen tillfälligt otillgänglig) on X server :2. tl-xinit: deleting ../1.1481103580.ended tl-xinit: deleting ../1.1481102364.ended tl-xinit: cannot stat ../1.1481102364.ended/drives/e: Stale file handle tl-xinit: Could not remove ../1.1481102364.ended. Stray files may remain. tl-xinit: deleting ../1.1480932617.ended tl-xinit: cannot stat ../1.1480932617.ended/drives/e: Stale file handle tl-xinit: Could not remove ../1.1480932617.ended. Stray files may remain. tl-xinit: Session terminated. Exiting.
Created attachment 763 [details] xinit.log when pressing cancel at profile selection
Investigated this some more. The problem is that xlogout.d is not executed if you press cancel in the profile selection dialog. This problem was not introduced in 4.7.0; it's been around a very long time. It could be argued that this is a desired behaviour, but in that case, it should probably be much clearer that scripts in xstartup.d with numbers < 20 are not executed if pressing cancel. (If I remember correctly, before tl-select-profile invocation was moved to xstartup.d, nothing in xstartup.d at all was executed upon cancel, which is somewhat more intuitive.
We need more info on the effects of this problem and how often it happens etc.
(In reply to comment #3) > We need more info on the effects of this problem and how often it happens etc. It happens every time, but the impact is low on a standard installation, which has: 00-tl-pulseaudio-env.sh 01-tl-kinit.sh 02-tl-dbus-launch.sh 11-tl-set-title 12-tl-default-keyboard 20-tl-select-profile.sh None of these files does anything that requires a cleanup, AFAICT. We could clarify the documentation, but I guess it's already technically correct: https://www.cendio.com/resources/docs/tag/configuration_customizing_user_session.html:' "When the commands run by tl-run-profile exits, xstartup.default runs the command tl-run-xlogout.d which runs scripts and commands located in the directory /opt/thinlinc/etc/xlogout.d." If you press cancel, tl-run-profile will not execute at all, which implies that xlogout.d is not executed. Perhaps good enough.