There are several ways to connect gmusicbrowser to the Linux infra-red control software (LIRC).  One method, which uses the irexec command, is described elsewhere in this forum.  It requires that a new process be started for each remote control button push, and can have response time limitations and is racy when more than one button is quickly pushed in succession.

Another method, which uses the irxevent command, does not have these problems.  Instead of feeding commands to gmusicbrowser through its command-line options, this method sends simulated keypresses directly to the application.

See http://www.lirc.org/ for documentation on LIRC, the .lircrc file format, and irxevent.

Here's a sample .lircrc file that implements basic control buttons:


begin
   prog = irxevent
   button = KEY_PLAYPAUSE
   config = Key ctrl-g CurrentWindow
end

begin
   prog = irxevent
   button = KEY_NEXT
   config = Key ctrl-x CurrentWindow
end

begin
        prog = irxevent
        button = KEY_PREVIOUS
        config = Key ctrl-z CurrentWindow
end

begin
prog = irxevent
button = KEY_STOP
config = Key ctrl-b CurrentWindow
end


This is the KeyBindings line that I added to my layout to translate the keypresses generated irxevent into gmusicbrowser commands:


KeyBindings     = c-g PlayPause c-b Stop c-x NextSong c-z PrevSong c-r Rewind(999999)