Kodi Community Forum

Full Version: Start xbmc with remote Ubuntu 11.10
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[solved!]

Hi,

My remote works when I start xbmc, but I also like to start xbmc itself with the remote (stopping is no problem). I assume you need to link a button to the action in a lirc config file. searched for a while but couldn't find the answer.

T_B_T

----
partly solved this one:

created a .lircrc file in my home dir

##XBMC

begin
remote = mceusb
button = KEY_HOME
prog = irexec
repeat = 0
config = /usr/bin/xbmc
end

added this script in /etc/init.d

irexec /home/T_B_T/.lircrc

seems to work but I will change the button, because it is used in xbmc as well and while using the button in xbmc it will start itself after you quit xbmc.

--------------------------

Still trying to figure something out.

I want to autostart the script and make it work in the background. I can start irexec /home/T_B_T/.lircrc from terminal, but when I exit it stops working.
Tried to add the & parameter after executing the script. It seemed to work in the background but didn't exept my input.

Edit: I did get this to work with the nohup command. Changed the script to nohup irexec /home/T_B_T/.lircrc &
not sure if this will work after rebooting (by placing it in /etc/init.d). Will test later this week.

Edit2: did some more research. Adding the script to init.d wasn't enough. The script needs to be executed on the correct run level and you need to link the file per run level.
http://www.debuntu.org/how-to-manage-ser...pdate-rc.d
so I did: sudo update-rc.d myscript defaults
and that added the symlinks to the runlevels

Unfortunately that didn't seem to work as well. Maybe I need to look at the priority. Myscript needs Lirc to be started. Lirc has S19 my script S20. I would assume that is OK, but hey... lets try S91 and reboot again.

Edit 3: no luck
Now trying this approach: http://www.liberiangeek.net/2011/09/auto...ntu-11-10/

Edit 4: finally! this worked.
I had already created an executable script tremote that contained:
nohup irexec /home/T_B_T/.lircrc &

I created a .desktop file in /usr/share/applications called tremote

[Desktop Entry]
Version=1.0
Name=tremote
GenericName=Media Center
Comment=start remote
Exec=/home/T_B_T/Install/tremote
Icon=xbmc
Terminal=false
Type=Application
Categories=AudioVideo;Video;Player;TV;

then copied this file to /etc/xdg/autostart
reboot and success!