How to set up a game controller in Linux

How to set up a game controller in Linux

Feral’s Linux games officially support Ubuntu 14.04.2 and SteamOS. The instructions below refer only to these distros, although they may work with others.

When it comes to playing with a gamepad on a Linux PC or Steam Machine, using an official Xbox 360 controller is the simplest option. Popular distros support Microsoft’s Xbox 360 wired controllers straight out the box, so all you need to do is plug in and play.

However, you can also use a wireless Xbox 360 controller and, for advanced users, set up your controller through the Terminal to precisely configure your controller. This guide tells you how to do both.

At the bottom of this guide, you’ll find a list of controllers that can be used with Feral’s Linux games.

For installation instructions for gamepads from Logitech, Sony, Thrustmaster and other manufacturers, please check Linux gaming forums.

Install a Logitech controller on Ubuntu

Install a PlayStation 3 controller on Linux

Install a generic USB controller on Linux

The easy way (BEGINNER)

Set up a wired Xbox 360 controller

  1. To set up a wired Xbox 360 controller, simply connect it to your computer via a USB port. That's it: you're good to go!

Set up a wireless Xbox 360 controller

To use a wireless Xbox 360 controller, you'll need the Xbox 360 Wireless Gaming Receiver for Windows.

  1. Plug the Wireless Gaming Receiver into a USB socket on your computer.
  2. Turn on your Xbox 360 controller by pressing the Xbox button.
  3. Press the button on the Wireless Gaming Receiver. The light will flash green, indicating that it's scanning for a controller to connect to.
  4. Press the connect button on the back of your Xbox 360 controller. This will pair your Xbox 360 controller with the Wireless Gaming Receiver. You only need to do this the first time you set up your controller.

    (Known issue: If you’re using a wireless Xbox 360 controller, the green connection LED will continue to flash even after pairing.)

  5. Your computer will recognize the wireless controller and you'll be good to go.

The other way (ADVANCED)

You can set up your Xbox 360 controller through the Terminal. This is a little trickier, but gives you more functionality: you'll be able to remap buttons, simulate mouse and keyboard actions, and change the controller's axes.

This method works with both wireless and wired Xbox 360 controllers, as well as a number of third-party Xbox 360 and XInput controllers.

  1. Use the Terminal to install the latest Xbox 360 driver and start the service.

    A service is a Linux app that operates in the background.

    Open the Terminal (Ctrl + Alt + T) and run:

    sudo apt-add-repository -y ppa:rael-gc/ubuntu-xboxdrv
    sudo apt-get update
    sudo apt-get install ubuntu-xboxdrv
    Terminal dialogue add repository Terminal dialogue update driver Terminal dialogue install xboxdrv

    Once the driver is installed, the service will start automatically, if you need to restart the service, open the Terminal and run:

    sudo service xboxdrv restart
    Terminal dialogue restart service
  2. You'll probably want to activate the Xbox 360 controller's force feedback function…

    Using the Terminal, navigate to the file /etc/default/xboxdrv/ and change:



    Terminal dialogue force feedback false Terminal dialogue force feedback true

    If you’re having trouble accessing the /etc/default folder it’s probably because you don’t have root access. To enable root access, run:

    sudo -H /bin/bash
    Terminal dialogue enable root access
  3. Now restart the service to apply your change:
    sudo service xboxdrv restart
  4. By default, the trigger function is mapped to the controller’s face buttons. To change this and activate the controller triggers, edit /etc/default/xboxdrv and change


    Terminal dialogue enable root access Terminal dialogue enable root access
  5. To change other settings, simply edit the /etc/default/xboxdrv file.

    You can see a full list of options here.

List of game controllers supported by Feral's Linux games.

Official Xbox Logitech Thrustmaster Sony PlayStation

In order to use your PlayStation DualShock 3 or DualShock 4 controller, you may need to press the PlayStation button in the centre of the controller after connecting the pad to your computer. This enables your computer to recognise the pad.