I think this is simpler and works all the time.
In terminal mode create a folder in /usr/bin, let's call it xbmc.sh
enter the following:
Code:
sudo gedit /usr/bin/xbmc.sh
while in the editor add the following lines:
Code:
#!/bin/bash
gksudo start service lirc restart
exec xbmc-standalone
exit 0
save the file and exit
then set the xbmc.sh file to execute with the following command:
Code:
sudo chmod +x xbmc.sh
Now we have to edit the sudoers file to allow execution of administrative tasks
without entering a pass word.
enter the vi editor with the following:
This editor does not use the mouse so you must naviate with the keyboard.
Change the last line from:
Code:
%admin ALL=(ALL) ALL
to:
Code:
%admin ALL=NOPASSWD: ALL
use control o to save the change and control x to exit
This operation will now allow you to execute administrative tasks without using
a password.
A safer option is to use the NOPASSWD option with just the service lirc restart
command instead of the %admin statement above. To do this create an alias in the sudoers file with the following:
then insert this:
Code:
Cmnd_Alias LIRC_CMD = service lirc restart
after the "#Cmnd alias specificaton" line.
and then insert this:
Code:
ALL ALL=(ALL) NOPASSWD: LIRC_CMD
after the "#User privilege specification" line.
Now in terminal mode you can test by entering:
If you are happy with the result place the xbmc.sh command in the autostart program list.
System>Preferences>Startup Applications
Or you can create a desktop icon that launches xbmc.sh from the desktop.
You should now be good to go. Lirc will start and then xbmc will start and you can use your remote.