[Solved] FAHControl doesn't work on Fedora 31: needs Python2
Posted: Sun Jan 05, 2020 11:45 pm
If run from a desktop environment, FAHControl silently fails during startup. If run from a bash prompt, it fails more informatively:
Python 2 and Python 3 are incompatible in several ways that are provoked by this script. Python 3 is the default Python in Fedora 31 -- that's what you get if you run /usr/bin/python. However, Python 2 is available as /usr/bin/python2 for backwards-compatibility. If I change the first line from
to
then FAHControl starts normally.
A cleaner solution -- which is what I've actually done -- is to take a copy of FAHControl into a directory that's both under my home directory and on my path, and to modify the copy.
Perhaps the developers could modify the shebang line in the next release, so that this workaround isn't necessary?
Code: Select all
[msl@localhost ~]$ FAHControl
File "/usr/bin/FAHControl", line 57
if sock.recv(1024).strip() == 'OK': print 'Ok'
^
SyntaxError: invalid syntax
[msl@localhost ~]$
Code: Select all
#!/usr/bin/python
Code: Select all
#!/usr/bin/python2
A cleaner solution -- which is what I've actually done -- is to take a copy of FAHControl into a directory that's both under my home directory and on my path, and to modify the copy.
Perhaps the developers could modify the shebang line in the next release, so that this workaround isn't necessary?