So I have two MCE remotes I used with windows and they both "work" in Linux with a bit of tweaking, but they work about 90% at this point in my tweaking. They worked about 60% out of the box, but it took a bit of diagnostics to get to 90%, I anticipate getting to 100% with more time (I've only been working this for a few days). You have to determine the driver situation with your remote, but I'll provide some of my notes on the current state of remote control of MC on Linux. After performing this process almost all the buttons work, I'm just working on a few fringe buttons and struggling with one "main" button.
The first step is determining whether the linux kernel recognizes your remote as a "keyboard." If so you're in luck and life will be relatively easy. Both my MCE's worked as "keyboards." The "easy" way to test this is to open MC in theater view and start pressing directional buttons, if the arrow keys work as expected, your remote is in the kernel and you're in luck. A more definitive test is to open a terminal and type "show-key." Then press remote buttons. If you see keycodes showing up, your remote is recognized as a keyboard.
If it's not recognized as a keyboard, you need to install and configure LIRC. The Arch wiki article on LIRC is excellent and I recommend it if you find you have a LIRC remote. I can't provide much advice on LIRC as both my remotes were "keyboards."
The next step (if you have a "keyboard" remote) is identifying keys that don't do what they're supposed to, and then remapping keys so that all your remote buttons work. Use "ir-keytable" to list your devices, and "ir-keytable -t" to find out what keycodes each button on your remote is sending (you may need to install the ir-keytable first). My advice is to redirect the output of "it-keytable -t" to a file, so you have them stored and can modify them. Once you have the list of scancodes from ir-keytable, use show-key to get keyboard codes of the keys you want to assign. Once you have file with the keycodes attached to the keys you want, you can remap the keys via script, but you need to re-run it every boot, so you can add it to your crontab or write a systemd service.
If you find that certain "standard" media keys (like stop) aren't working your desktop environment may be swallowing them to send to media players. The problem is that MC isn't MPRIS-compliant so the DE has nowhere to send the keypresses (as I understand it). You can edit your DE's hotkey settings to get it to ignore the keypresses and let them get to MC
Here are two links I found helpful in my quest
-
https://www.mythtv.org/wiki/Remote_Control-
http://atterer.org/mythtv-xmbc-remote-control-without-lircAnd here's my script I run on boot:
#!/bin/bash
ir-keytable --write /home/michael/keymap --device /dev/input/event5
NOTES:
The remote device name is found in the output of "ir-keytable" with no flags.
The file keymap referenced in the script is essentially just the output of ir-keytable -t appropriately modified and looks like this:
scancode 0x800f0400 = KEY_NUMERIC_0 (0x200)
scancode 0x800f0401 = KEY_NUMERIC_1 (0x201)
scancode 0x800f0402 = KEY_NUMERIC_2 (0x202)
scancode 0x800f0403 = KEY_NUMERIC_3 (0x203)
scancode 0x800f0404 = KEY_NUMERIC_4 (0x204)
scancode 0x800f0405 = KEY_NUMERIC_5 (0x205)
scancode 0x800f0406 = KEY_NUMERIC_6 (0x206)
scancode 0x800f0407 = KEY_NUMERIC_7 (0x207)
scancode 0x800f0408 = KEY_NUMERIC_8 (0x208)
scancode 0x800f0409 = KEY_NUMERIC_9 (0x209)
scancode 0x800f040a = KEY_DELETE (0x6f)
scancode 0x800f040b = KEY_ENTER (0x1c)
scancode 0x800f040c = KEY_SLEEP (0x8e)
scancode 0x800f040d = KEY_MEDIA (0xe2)
scancode 0x800f040e = KEY_MUTE (0x71)
scancode 0x800f040f = KEY_INFO (0x166)
scancode 0x800f0410 = KEY_VOLUMEUP (0x73)
scancode 0x800f0411 = KEY_VOLUMEDOWN (0x72)
scancode 0x800f0412 = KEY_CHANNELUP (0x192)
scancode 0x800f0413 = KEY_CHANNELDOWN (0x193)
scancode 0x800f0414 = KEY_FASTFORWARD (0xd0)
scancode 0x800f0415 = KEY_REWIND (0xa8)
scancode 0x800f0416 = KEY_PLAY (0xcf)
scancode 0x800f0417 = KEY_RECORD (0xa7)
scancode 0x800f0418 = KEY_SPACE (0x20)
scancode 0x800f0419 = KEY_STOP (0x80)
scancode 0x800f041a = KEY_NEXT (0x197)
scancode 0x800f041b = KEY_PREVIOUS (0x19c)
scancode 0x800f041c = KEY_NUMERIC_POUND (0x20b)
scancode 0x800f041d = KEY_NUMERIC_STAR (0x20a)
scancode 0x800f041e = KEY_UP (0x67)
scancode 0x800f041f = KEY_DOWN (0x6c)
scancode 0x800f0420 = KEY_LEFT (0x69)
scancode 0x800f0421 = KEY_RIGHT (0x6a)
scancode 0x800f0422 = KEY_ENTER (0x1c)
scancode 0x800f0423 = KEY_BACKSPACE (0x7f)
scancode 0x800f0424 = KEY_DVD (0x185)
scancode 0x800f0425 = KEY_TUNER (0x182)
scancode 0x800f0426 = KEY_EPG (0x16d)
scancode 0x800f0427 = KEY_ZOOM (0x174)
scancode 0x800f0432 = KEY_MODE (0x175)
scancode 0x800f0433 = KEY_PRESENTATION (0x1a9)
scancode 0x800f0434 = KEY_EJECTCD (0xa1)
scancode 0x800f043a = KEY_BRIGHTNESSUP (0xe1)
scancode 0x800f0446 = KEY_TV (0x179)
scancode 0x800f0447 = KEY_AUDIO (0x188)
scancode 0x800f0448 = KEY_PVR (0x16e)
scancode 0x800f0449 = KEY_CAMERA (0xd4)
scancode 0x800f044a = KEY_VIDEO (0x189)
scancode 0x800f044c = KEY_LANGUAGE (0x170)
scancode 0x800f044d = KEY_TITLE (0x171)
scancode 0x800f044e = KEY_PRINT (0xd2)
scancode 0x800f0450 = KEY_RADIO (0x181)
scancode 0x800f045a = KEY_SUBTITLE (0x172)
scancode 0x800f045b = KEY_RED (0x18e)
scancode 0x800f045c = KEY_GREEN (0x18f)
scancode 0x800f045d = KEY_YELLOW (0x190)
scancode 0x800f045e = KEY_BLUE (0x191)
scancode 0x800f0465 = KEY_POWER2 (0x164)
scancode 0x800f046e = KEY_PLAYPAUSE (0xa4)
scancode 0x800f046f = KEY_PLAYER (0x183)
scancode 0x800f0480 = KEY_BRIGHTNESSDOWN (0xe0)
scancode 0x800f0481 = KEY_PLAYPAUSE (0xa4)
The left entry is the remotes scancode, the right hand is the description and hex code for the emulated key.
I know that's a lot of text, but it goes fairly quick once you get going. I'll probably write a proper guide once I get my remotes to 100% (or if JRiver comes up with an easier integrated way!). The main limitation of this method is that a given button can only be mapped to a single keypress, but fortunately most JRiver UI functionality is also mapped to single keypresses (backspace for back, space for play/pause, etc.)