How to Make Linux Use an Xbox Controller

Written by cory lewis
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Make Linux Use an Xbox Controller
Configure your Xbox controller to your Ubuntu computer. (Jupiterimages/Brand X Pictures/Getty Images)

Linux is a basis for many operating systems that, unlike Windows and OSX, are free and highly customisable. Ubuntu, one of the more user-friendly Linux distributions, is one popular variant. Within Ubuntu, you can configure your very own Xbox 360 controller for use on your computer in just a few steps without the need for extra software.

Skill level:
Moderately Easy

Other People Are Reading

Things you need

  • Xbox 360 controller
  • USB adaptor (optional, for older model controllers)

Show MoreHide

Instructions

  1. 1

    Open the Menu bar and find "Terminal." Open it and type in the following:

    sudo apt-get install linux-headers-uname -r build-essential automake1.9

    Hit "Enter." This will compile and install necessary drivers and packages.

  2. 2

    Type in the following the in same Terminal window:

    sudo apt-get install jscalibrator libgii1 libjsw2

    Hit "Enter."

  3. 3

    Enter the following in Terminal:

    cd

    mkdir xpad

    Hit "Enter." This command will create a directory for the module that will allow you to use your controller in Ubuntu.

  4. 4

    Paste the following into Terminal:

    cd xpad

    wget "http://Xbox-linux.cvs.sourceforge.net/checkout/Xbox-linux/kernel-2.6/drivers/USB/input/xpad.c" "http://Xbox-linux.cvs.sourceforge.net/checkout/Xbox-linux/kernel-2.6/drivers/USB/input/xpad.h"

    Hit "Enter."

  5. 5

    Navigate to the Menu bar and find "Text Editor" or a similar program. Paste the following into the file:

    KERNEL_PATH?=/usr/src/linux-headers-$(shell uname -r)

    EXTRA_CFLAGS=-I$(shell pwd)

    obj-m:=xpad.o

    all:

        $(MAKE) modules -C $(KERNEL_PATH) SUBDIRS=$(shell pwd)
    

    install:

        cp -f xpad.ko /lib/modules/$(shell uname -r)/kernel/drivers/input/joystick
    

    Save the file and name it "Makefile."

  6. 6

    Enter the following into Terminal:

    make

    sudo make install

    sudo modprobe -r xpad

    sudo depmod -a

    sudo modprobe xpad

    Hit "Enter." This will compile the controller module. If an error message is displayed, please review the steps and make sure you did not miss anything.

  7. 7

    Connect your controller to your computer via USB. Open Terminal and type "dmesg" and hit "Enter." A description like "Xbox 360 Controller" should appear. If so, you are done.

Tips and warnings

  • This method is written for Ubuntu but should work in similar fashion for other Debian-based distributions.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.