When pygtk isn't available for Python 2 the profile chooser crashes: > Traceback (most recent call last): > File "/opt/thinlinc/libexec/tl-run-xstartup-feedback", line 11, in > <module> > import gtk > ImportError: No module named gtk In the case when only one profile is available, and the intro text shouldn't show, we don't need to display anything, and in this case we shouldn't need pygtk. This is a regression from commit r34241 for bug 7329, and has been broken since ThinLinc 4.10.1. Reproduced the bug on RHEL8 by removing pygtk2.
The same problem exists for tl-run-xstartup-feedback: > Traceback (most recent call last): > File "/opt/thinlinc/libexec/tl-run-xstartup-feedback", line 11, in <module> > import gtk > ImportError: No module named gtk
The issue with the crashes should be fixed now. However, before closing this bug we should probably write some automatic tests covering this. That should help make sure this isn't missed again in the future.
I've checked the code and unfortunately the current structure does not suit itself for easy automatic testing. The program has a lot of dependencies on external things, making it difficult to set up an environment where it can be unit tested. This is also an uncommon corner case (with a temporary peak right now as we migrate to Python 3), so I don't think it is appropriate to add it to our functional tests. What we can do though is add a packaging test that finds files that try to import PyGTK directly.
Can confirm this happens on RHEL 8: > Running /opt/thinlinc/etc/xstartup.d/20-tl-select-profile.sh (Choosing a profile) > Traceback (most recent call last): > File "/opt/thinlinc/libexec/tl-select-profile", line 12, in <module> > import gtk At which point the session just terminates. After an upgrade to a nightly build it properly continues with the first profile found, and the log is much nicer: > /opt/thinlinc/libexec/tl-run-xstartup-feedback: warning: Unable to import GTK module > /opt/thinlinc/libexec/tl-run-xstartup-feedback: warning: Won't present xstartup.d feedback > ... > Running /opt/thinlinc/etc/xstartup.d/20-tl-select-profile.sh (Choosing a profile) > /opt/thinlinc/libexec/tl-select-profile: warning: Unable to import GTK module > /opt/thinlinc/libexec/tl-select-profile: warning: Can't show introduction text > /opt/thinlinc/libexec/tl-select-profile: warning: Using first available profile as fallback Once I install PyGTK again the profile chooser seems to work just fine. However the startup feedback is broken: > Traceback (most recent call last): > File "/opt/thinlinc/libexec/tl-run-xstartup-feedback", line 124, in <module> > II111iiiiII ( ) > File "/opt/thinlinc/libexec/tl-run-xstartup-feedback", line 98, in II111iiiiII > O00o = tlgtk . gtk . Throbber ( )
However the startup feedback is broken: > Traceback (most recent call last): > File "/opt/thinlinc/libexec/tl-run-xstartup-feedback", line 124, in <module> > II111iiiiII ( ) > File "/opt/thinlinc/libexec/tl-run-xstartup-feedback", line 98, in II111iiiiII > O00o = tlgtk . gtk . Throbber ( ) Fixed in r35047
I can confirm that the startup feedback now works fine.