Page 1 of 1

[Solved] FAHControl doesn't work on Fedora 31: needs Python2

Posted: Sun Jan 05, 2020 11:45 pm
by Markus_Laker
If run from a desktop environment, FAHControl silently fails during startup. If run from a bash prompt, it fails more informatively:

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 ~]$
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

Code: Select all

#!/usr/bin/python
to

Code: Select all

#!/usr/bin/python2
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?

Re: [Solved] FAHControl doesn't work on Fedora 31: needs Pyt

Posted: Mon Jan 20, 2020 5:11 pm
by Gleep
Thanks for sharing the solution for this. I installed FAH on Fedora 31 this weekend and I was scratching my head on why FAHControl was failing to start, then spotted this post.