[SOLVED] Sc-controller not starting in MATE 17.04, missing input.h

Using the steam-controller doesn't work in Ubuntu MATE 17.04 for me.

Terminal-Output starting sc-controller:

> morten@caladan:~$ sc-controller 
> Traceback (most recent call last):
>   File "/usr/bin/sc-controller", line 27, in <module>
>     from scc.gui.app import App
>   File "/usr/lib/python2.7/dist-packages/scc/gui/app.py", line 11, in <module>
>     from scc.gui.controller_widget import TRIGGERS, PADS, STICKS, GYROS, BUTTONS
>   File "/usr/lib/python2.7/dist-packages/scc/gui/controller_widget.py", line 15, in <module>
>     from scc.actions import Action, XYAction, MultiAction
>   File "/usr/lib/python2.7/dist-packages/scc/actions.py", line 14, in <module>
>     from scc.uinput import Keys, Axes, Rels
>   File "/usr/lib/python2.7/dist-packages/scc/uinput.py", line 38, in <module>
>     CHEAD = defines('/usr/include', 'linux/input.h')
>   File "/usr/lib/python2.7/dist-packages/scc/cheader.py", line 85, in defines
>     lexer = shlex.shlex(open(fname), posix=True)
> IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/usr/include/linux/input.h'

[Datei oder Verzeichnis nicht gefunden -> translates to "file or directory not found")

Apparently Ubuntu MATE has no files in the directory /usr/include/linux/
Having a Xubuntu 17.04 installation nearby i can confirm that there are many files in that dir.

Touching input.h:

morten@caladan:~$ sc-controller 
Traceback (most recent call last):
  File "/usr/bin/sc-controller", line 27, in <module>
    from scc.gui.app import App
  File "/usr/lib/python2.7/dist-packages/scc/gui/app.py", line 11, in <module>
    from scc.gui.controller_widget import TRIGGERS, PADS, STICKS, GYROS, BUTTONS
  File "/usr/lib/python2.7/dist-packages/scc/gui/controller_widget.py", line 15, in <module>
    from scc.actions import Action, XYAction, MultiAction
  File "/usr/lib/python2.7/dist-packages/scc/actions.py", line 14, in <module>
    from scc.uinput import Keys, Axes, Rels
  File "/usr/lib/python2.7/dist-packages/scc/uinput.py", line 56, in <module>
    Keys.KEY_ESC: 0x70029,
  File "/usr/lib/python2.7/dist-packages/scc/lib/enum.py", line 422, in __getattr__
    raise AttributeError(name)
AttributeError: KEY_ESC

It has to be a MATE thing as sc-controller works under Gnome, Xfce 17.04 and Linux Mint 18.2.
Is there a workaround? Or are simply some packages not installed?

Help is much appreciated,

Scytale

I found the solution by myself and the internet. New things learned :slight_smile:

Used apt-file for finding package containing input.h

morten@caladan:~$ apt-file search /usr/include/linux/input.h
linux-libc-dev: /usr/include/linux/input.h

installed package linux-libc-dev and sc-controller starts and runs without any further problems.

Is the package linux-libc-dev intentionally not installed although it seems like it is in the most ubuntu DEs?

1 Like

*-dev packages aren't usually installed by default I think. I've checked for this package in my Zesty VM and it's not installed.