1Note that Debian and Ubuntu how have packages for libconcord and we recommend 2you use those instead of installing from source. If you prefer to install from 3source, see the instructions below. 4 5 6==== BASIC INSTALLATION ==== 7 80. INSTALL REQUIRED SOFTWARE 9 10You *MUST* install libusb and libzip. These libraries are in most 11distributions, so apt-get/yum/up2date/urpmi/etc. it. 12 13You also need hidapi which can be found at: https://github.com/signal11/hidapi 14It is important that you use git, as the last release (0.7.0) doesn't work. 15You'll want to build it as a shared library, which is basically just 16"./bootstrap && ./configure --prefix=/usr && make && sudo make install", 17tweaked to your taste. 18 19NOTE ON HIDAPI TO DISTRIBUTORS: If your distro doesn't distribute hidapi, for 20the next few releases we are still supporting building directly on libusb with 21the --enable-force-libusb-on-linux option to configure. However, the libusb 22developers are strongly encouraging libusb who talk to HID devices to move to 23hidapi, so it's probably a good time to package hidapi. Finally, if that 24doesn't work for you, you can drop in the appropriate hid.c file from the 25hidapi source into the libconcord, and tweak the Makefile.am to build it as 26part of libconcord. 27 28Also, if you are using 900/1000/1100 remotes, then dnsmasq is a requirement, 29as well as installing the udev support files for libconcord (see below). 30 31If you're compiling libconcord from source, you'll also need the development 32packages - usually libusb-dev or libusb-devel (and libzip-dev/libzip-devel), 33depending on your distribution. 34 351. BUILD LIBCONCORD 36 37 As a normal user... 38 A. ***IF**** You are building from git, run: 39 mkdir m4; autoreconf --install 40 B. Run "./configure" 41 C. Run "make" 42 43Various options, such as '--prefix' are available to the configure script to 44help you choose where software gets installed and how it is built. 45 462. INSTALL THE SOFTWARE 47 48As root, simply run "make install" 49 503. INSTALL UDEV/CONSOLEKIT/POLICYKIT SUPPORT (OPTIONAL) 51 52If you don't want to have to be root to use concordance (or any other 53libconcord frontend), you'll need to set up udev-acl, hal/consolekit, 54hal/policykit or old udev support. Here are your options: 55 56* UDEV-ACL SUPPORT (recommended) 57 58Most modern distributions should use the udev-acl support. udev versions since 59167, released on 2011-03-30, have the necessary support for this method to 60work. 61 62With this option, all locally logged-in users will be able to have access 63to the remote control, but remote users (such as those logged in via ssh or 64fast user switching) will not. This support does not depend on anything beyond 65a sufficiently recent version of udev itself. To use the udev-acl support, do: 66 67 make udev 68 sudo make install_udev 69 70* GENERIC-UDEV SUPPORT 71 72If you have a modern system, but your login manager doesn't support 73consolekit, (notably, 'xdm'), you'll need to use generic udev support. With 74this option, anyone in the group 'dialout' will have access to the remote 75control. To use this, do: 76 77 make generic_udev 78 sudo make install_generic_udev 79 80* HAL/POLICYKIT SUPPORT 81 82This is for people on older distributions that use HAL+PolicyKit. It will 83generate the appropriate HAL/PolicyKit files and install them in the right 84place for the console user to have access to the remote when it's plugged in. 85It will work only if your distribution has udev, HAL and PolicyKit of around 86the correct vintage - approximately, the versions that were current in early 872009 - correctly built to work with each other. 88 89To use hal/policykit support, you can do: 90 91 make policykit 92 sudo make install_policykit 93 94* HAL/CONSOLEKIT SUPPORT 95 96This will do much the same as the hal/policykit support does, only with 97consolekit instead. As with the hal/policykit support, it depends on having 98udev, HAL and ConsoleKit of an early 2009 vintage, correctly built to work 99together. 100 101* OLD_UDEV SUPPORT 102 103The safest option for old systems is the old generic udev support. Like 104"UDEV-GENERIC", this will allow anyone in the "dialout" group to read and 105write to harmony remote controls connected to the machine. However, it uses 106the syntax necessary for very old versions of udev. 107 108 make old_udev 109 sudo make install_old_udev 110 111If you are not sure which method to use, and your distribution came out since 112March 2011, try the udev-acl option first, as it provides the cleanest 113configuration and most transparent operation. If it does not work, you can try 114the hal/consolekit or hal/policykit options, but old-udev is the most likely 115to work. 116 117NOTE: 118By default udev files will install in /lib/udev. You can override this by setting 119the UDEVLIBDIR environment variable (as root): 120 121 UDEVLIBDIR=/etc/udev make install_udev 122 123The policykit/consolekit files will install in datarootdir which is a subset 124of prefix, meaning, by default /usr/local/share. This will not work, so if you 125are using the hal/policykit/console kit targets, you must run ./configure 126with: 127*either*: 128 --prefix=/usr 129*or*: 130 --sysconfigdir=/etc --datarootdir=/usr/share 131 132The first one will install binaries in /usr/bin and libraries in /usr/lib which 133may potentially conflict with files installed by your distribution. The later 134will leave everything in /usr/local except for the udev/policykit/consolekit 135files. 136 137 138==== ADDITIONAL NOTES ==== 139 140Because this software uses libusb, it does Direct IO. That means the library 141requires root priveleges to talk to the remote control, or the user 142must have the RAWIO capability. You can work around this with the optional 143step 3 above. 144 145In addition, libconcord attempts to unbind any in-kernel drivers that may 146bind to your remote. However, if it can't, you may need to unbind them manually. 147Check dmesg, if the hid driver attached to your Harmony follow the 148instructions here to unbind it: 149 http://lwn.net/Articles/143397/ 150 151 152vim:textwidth=78: 153