First let me inform you what versions of everything I am performing this on.
sudo rmmod ati_remote
If it says it can't remove it because it's in use then just ignore that and continue on with the tutorial. Now we need to make it so when we reboot the machine that module doesn't automagically load, this is done by editing a configuration file. Since this config is located within the /etc/ directory and is owned by root, we'll again need root privileges so we'll be using sudo but since we're opening a GUI (Graphical User Interface) application, we want to actually use 'gksudo'. This is the command (NOTE: gedit is the default GUI text editor for Ubuntu, if you're using Kubuntu it is kate I believe. I am using Mythbuntu so the GUI text editor is actually called mousepad for me. Replace the gedit command with whatever GUI text editor your distribution uses.
gksudo gedit /etc/modprobe.d/blacklist.conf
Once the file opens in your GUI text editor we're going to add the following text in red to the very bottom of the file
#to get ATI Remote Wonder working
The pound symbol is used for comments and isn't read as a configuration line. Save the file and close the text editor. Restart your computer ONLY if you previously couldn't remove the ati_remote module. When you restart it won't load this time because you blacklisted it. Now we need to install lirc which stands for 'Linux Infra-red Remote Control'. We again will do that from the terminal session and require sudo because installing software requires root privileges. Type in the following command:
sudo apt-get install lirc
Choose 'Y' if it asks you if you're sure you want to install the software. If lirc was already installed and you'd like to reconfigure it you would use the following command:
sudo dpkg-reconfigure lirc
It will bring up a debconf window. Debconf stands for debian configuration, most applications within Ubuntu are of the .deb extension and is the common package management tool used within Debian based Linux distributions. Within the debconf window using the up and down arrow keys, highlight the ATI/NVidia/X10 RF Remote (userspace) option and then click tab so that the '<Ok>' option is highlighted, then click the 'enter' key on your keyboard. The next window that appears is for a transmitter but we aren't transmitting anything so highlight 'None', click tab so that the '<Ok>' option is highlighted, then click the 'enter' key on your keyboard. If everything went ok lirc should have been installed and the proper config files should be in place. Now we just have to let XBMC know that we'll be using a remote instead of a keyboard to control it and that's done using a config file, Lircmap.xml which will need to be stored within your users .xbmc folder. To do this we don't need root privileges because we're writing the file within our own home directory which we have write access to. The tilde (~) is a short way of entering your users home directory, which is /home/yourusernamehere/, so the whole path is actually /home/yourusernamehere/.xbmc/userdata/. The command is as follows:
I uploaded my Lircmap.xml to pastebin, you can download the file from this link: Lircmap.xml
Note the 'L' is capital, that's important for the filename. So that button presses don't register twice I had to edit the advancedsettings.xml file located within my users home directory .xbmc/userdata/ and add the following lines. You may or may not already have an advancedsettings.xml file, if you don't have one just create it, if you already have one just add the single line for the remotedelay as you probably already have the top and bottom <advancedsettings> lines.
That should be it, fire up XBMC and your ATI Remote Wonder should now be working. If you want to know which button on the remote does what within XBMC just look at the Lircmap.xml file with a text editor. Example being the "back" command in XBMC is performed with the remote button 'c' as per the following in the Lircmap.xml file <back>c</back>.