Everything Python 2.x is heavily deprecated on Ubuntu 20.04, so they no longer ship PyGTK in any repo.
We should move to something newer, and probably add a platform specific not until then.
Also note bug 7492 which makes this much worse.
This problem does not affect all new distros, Fedora 32 for example has this package:
A platform specific note has been added:
Once a new release that includes the fix for bug 7492 is out we should modify the PSN with information about how ThinLinc is usable without PyGTK.
Release is out and PSN has been updated.
I also hit this issue after updating to Ubuntu 20.04 but found the following solution:
So IMHO you should better instruct your users to install the pygtk2 packages from the suggested PPA using the following procedure:
sudo add-apt-repository ppa:nrbrtx/python2-stuff
sudo apt-get install python-gtk2
And of course it would be IMHO better to finally update your profile chooser to python3 in future!
The workaround does not work.
It has been quite some time since ubuntu 20.04 (or linux mint 20) has been released, is there any discussion or at least the timeline that thinlinc is going to address the pygtk2 issue? Otherwise, the community might have to turn to other solution.
I confirm that this will be an increasingly difficult challenge for us. A discussion of plan so we can determine future direction would be very useful.
Steve Moulton - Systems Engineer
Architectures and Performance Group
Oak Ridge National Laboratory
We are in the midst of the huge Python 3 conversion project here, and it's too early to give any promises. But if all goes as planned we won't be requiring pygtk2 in the upcoming ThinLinc release, our hope is for the summer release to be entirely Python 2 free.
Thanks for the update and looking forward to see a python3 enabled ThinLinc soon!
However, please allow me to raise again my general concerns here, that all this would probably not have happened (not being able to install ThinLinc on Ubuntu 20.04 LTS in 2021!) if you at cendio would open source at least parts of your ThinLinc product line. Especially the ThinLinc Client, the python-driven chooser, etc. are components which IMHO do not justify keeping them closed source or released after having obfuscated the code. If the ThinLinc Client or python-driven chooser would be available, e.g. on GitHub, under an appropriate open source license, then the community around it would have done the job already in porting to Python3 and you would have official support for Ubuntu 20.04 already!
And unfortunately this isn't the first time that almost one year after an official Ubuntu LTS release, ThinLinc have to be manually patched by users to get it running, rather than seeing you releasing it officially for the new LTS version!
We've started looking at the specifics now. The logical replacement for pygtk2 is PyGObject. GObject dropped Python 2 support a few months ago in version 3.38.0 - (2020-09-12):
Since pygtk2 isn't available in Python3 we assume it would be best to move from pygtk2 to PyGObject _before_ moving from Python 2 to Python 3.
PyGObject for Python2 isn't available in the regular repos, but is provided by pip2:
$ wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
$ sudo python2 get-pip.py
$ sudo dnf install gobject-introspection-devel
$ python2 -m pip install pygobject
The steps above gave us PyGObject 3.36.1, and it seems to work fine in Python 2.7.
The latest versions of PyGObject lists Python 3.6 as the required version. PyGObject's decision seems to be based on the fact that older Python versions are EOL.
We will target Python 3.4 in ThinLinc for now, this could cause some problems if we try to mix old Python versions and new PyGObject versions.
The version of PyGObject provided on SLES12 (which uses Python 3.4) is 3.20.1, which is from 2016. We have tested PyGObject on SLES12 and it seems to work fine.
When porting from Pygtk2 to PyGObject we need to be careful not to use things from newer versions (newer than 3.20.1).
The GTK2 C API is available here, it might be useful when converting from Pygtk2 to PyGObject/GTK3:
It should be easy to map the C functions and properties to the Python equivalents.
The documentation for PyGObject 3.20.1 should be possible to build using this:
Once built, could we host it internally somehow? It doesn't seem to be available anywhere online.
We should try to keep an eye out for open bugs in the same area, some might get fixed along the way (on the buy!).