Bug 7508 - No PyGTK on Ubuntu 20.04
Summary: No PyGTK on Ubuntu 20.04
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Other (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.13.0
Assignee: William Sjöblom
URL:
Keywords:
Depends on:
Blocks: 7688 7692
  Show dependency treegraph
 
Reported: 2020-06-01 13:58 CEST by Pierre Ossman
Modified: 2021-04-22 14:37 CEST (History)
5 users (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2020-06-01 13:58:59 CEST
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.
Comment 3 Pierre Ossman cendio 2020-06-01 14:01:20 CEST
Also note bug 7492 which makes this much worse.
Comment 4 Samuel Mannehed cendio 2020-06-02 13:49:01 CEST
This problem does not affect all new distros, Fedora 32 for example has this package:

pygtk2-2.24.0-29.fc32.x86_64
Comment 5 Samuel Mannehed cendio 2020-06-02 13:56:04 CEST
A platform specific note has been added:

https://www.cendio.com/thinlinc/docs/platforms/ubuntu

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.
Comment 6 Pierre Ossman cendio 2020-06-29 09:40:30 CEST
Release is out and PSN has been updated.
Comment 7 Jens Maus 2020-08-05 16:59:56 CEST
I also hit this issue after updating to Ubuntu 20.04 but found the following solution:

https://askubuntu.com/questions/1235271/pygtk-not-available-on-focal-fossa-20-04

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!
Comment 10 Feng Ye 2021-04-13 03:03:03 CEST
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.
Comment 11 Steve Moulton 2021-04-13 15:20:57 CEST
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
Comment 12 Samuel Mannehed cendio 2021-04-14 10:31:53 CEST
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.

Stay tuned.
Comment 13 Jens Maus 2021-04-14 10:44:01 CEST
@Samuel, @Pierre
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!
Comment 14 Samuel Mannehed cendio 2021-04-19 13:04:58 CEST
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):

https://pygobject.readthedocs.io/en/latest/changelog.html

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
# Dependency:
$ 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.
Comment 15 Samuel Mannehed cendio 2021-04-19 13:15:10 CEST
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).
Comment 16 Samuel Mannehed cendio 2021-04-19 13:31:56 CEST
The GTK2 C API is available here, it might be useful when converting from Pygtk2 to PyGObject/GTK3:

https://developer.gnome.org/gtk2/stable/

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:

https://gitlab.gnome.org/GNOME/pygobject/-/tree/pygobject-3-20/docs

Once built, could we host it internally somehow? It doesn't seem to be available anywhere online.
Comment 17 Samuel Mannehed cendio 2021-04-19 13:48:47 CEST
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!).

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