docs/README-linux.md
changeset 9025 d09d4b578e77
parent 9023 276802355854
child 9106 d1d0a67ca6c8
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docs/README-linux.md	Tue Jul 29 08:04:15 2014 -0700
     1.3 @@ -0,0 +1,82 @@
     1.4 +Linux
     1.5 +================================================================================
     1.6 +
     1.7 +By default SDL will only link against glibc, the rest of the features will be
     1.8 +enabled dynamically at runtime depending on the available features on the target
     1.9 +system. So, for example if you built SDL with Xinerama support and the target
    1.10 +system does not have the Xinerama libraries installed, it will be disabled
    1.11 +at runtime, and you won't get a missing library error, at least with the 
    1.12 +default configuration parameters.
    1.13 +
    1.14 +
    1.15 +================================================================================
    1.16 +Build Dependencies
    1.17 +================================================================================
    1.18 +    
    1.19 +Ubuntu 13.04, all available features enabled:
    1.20 +
    1.21 +sudo apt-get install build-essential mercurial make cmake autoconf automake \
    1.22 +libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
    1.23 +libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
    1.24 +libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
    1.25 +libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev
    1.26 +
    1.27 +Ubuntu 14.04 can also add "libwayland-dev libmirclient-dev libxkbcommon-dev"
    1.28 +to that command line for Wayland and Mir support.
    1.29 +
    1.30 +NOTES:
    1.31 +- This includes all the audio targets except arts, because Ubuntu pulled the 
    1.32 +  artsc0-dev package, but in theory SDL still supports it.
    1.33 +- DirectFB isn't included because the configure script (currently) fails to find
    1.34 +  it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the 
    1.35 +  configure script to include DirectFB support. Send patches.  :)
    1.36 +
    1.37 +
    1.38 +================================================================================
    1.39 +Joystick does not work
    1.40 +================================================================================
    1.41 +
    1.42 +If you compiled or are using a version of SDL with udev support (and you should!)
    1.43 +there's a few issues that may cause SDL to fail to detect your joystick. To
    1.44 +debug this, start by installing the evtest utility. On Ubuntu/Debian:
    1.45 +
    1.46 +    sudo apt-get install evtest
    1.47 +    
    1.48 +Then run:
    1.49 +    
    1.50 +    sudo evtest
    1.51 +    
    1.52 +You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
    1.53 +Now run:
    1.54 +    
    1.55 +    cat /dev/input/event/XX
    1.56 +
    1.57 +If you get a permission error, you need to set a udev rule to change the mode of
    1.58 +your device (see below)    
    1.59 +    
    1.60 +Also, try:
    1.61 +    
    1.62 +    sudo udevadm info --query=all --name=input/eventXX
    1.63 +    
    1.64 +If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
    1.65 +you need to set up an udev rule to force this variable.
    1.66 +
    1.67 +A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks 
    1.68 +like:
    1.69 +    
    1.70 +   SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
    1.71 +   SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
    1.72 +   
    1.73 +You can set up similar rules for your device by changing the values listed in
    1.74 +idProduct and idVendor. To obtain these values, try:
    1.75 +    
    1.76 +    sudo udevadm info -a --name=input/eventXX | grep idVendor
    1.77 +    sudo udevadm info -a --name=input/eventXX | grep idProduct
    1.78 +    
    1.79 +If multiple values come up for each of these, the one you want is the first one of each.    
    1.80 +
    1.81 +On other systems which ship with an older udev (such as CentOS), you may need
    1.82 +to set up a rule such as:
    1.83 +    
    1.84 +    SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"
    1.85 +