Our xstartup contains a few Python scripts, these should be converted to be compatible with Python 3 so we don't depend on Python 2 anymore. The Python files I found are: - tl-xstartup-desc - tl-run-xstartup-feedback
Tested with 4.12.1 client against Fedora 33 server-bundle containing these changes. Works good.
Crashes on RHEL7: > [cendio@lab-203 ~]$ touch test > [cendio@lab-203 ~]$ /opt/thinlinc/libexec/tl-run-xstartup-feedback test > File "/opt/thinlinc/libexec/tl-run-xstartup-feedback", line 115 > print ( "%s: warning: Unable to initialize GTK+" % sys . argv [ 0 ] , file = sys . stderr ) > ^ > SyntaxError: invalid syntax
Should work properly under Python 3 now.
The converted `tl-xstartup-desc` assumes that all files in /opt/thinlinc/etc/xstartup.d are textual scripts and not arbitrary binaries. Thus, if we symlink a binary into xstartup.d: > ln -s /bin/pwd /opt/thinlinc/etc/xstartup.d/00-pwd` We get the following stack trace in /var/opt/thinlinc/sessions/<user>/last/xinit.log: > Traceback (most recent call last): > File "/opt/thinlinc/libexec/tl-xstartup-desc", line 58, in <module> > ooo0oOoooOOO0 ( ) > File "/opt/thinlinc/libexec/tl-xstartup-desc", line 19, in ooo0oOoooOOO0 > if oOO0OoOoo000 . read ( 1 ) != '#' : > File "/usr/lib64/python3.4/codecs.py", line 319, in decode > (result, consumed) = self._buffer_decode(data, self.errors, final) > UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 40: invalid start byte > Running /opt/thinlinc/etc/xstartup.d/00-pwd > /home/<user> As you can see `pwd` still runs, but we get an ugly stack trace in the logs.
The traceback has now been fixed.
Tested on RHEL 8 with build 2101. ✓ Feedback in GUI. ✓ Descriptions are correctly displayed in log and GUI. ✓ Running without GTK+ prints the warnings (e.i. comment 6 is fixed). ✓ Symlinking a binary into xstartup.d as described in comment 9.