Code:
sudo service lightdm restartI mapped the command to a button on my remote so I don't have to SSH in to the box everytime I get a black screen:
Find the name of the button you wish to use by typing
Code:
irwThen
Code:
sudo nano /home/<username>/.lircrcCode:
# Start XBMC
begin
prog = irexec
button = <name of the button you wish to use>
config = sudo /home/<username>/scripts/startXBMC.sh
endCode:
sudo nano /etc/rc.localCode:
#start IRexec
su -c '/usr/bin/irexec -d /home/<username>/.lircrc' -l xbmcCreate a file startXBMC.sh in /home/<username>/scripts/:
Code:
sudo nano /home/<username>/scripts/startXBMC.shCode:
#restart lightdm
sudo service lightdm restart
#restart xbmc
#killall -9 xbmc.binCode:
sudo chmod +x /home/<username>/scripts/startXBMC.shBecause the service lightdm restart command needs root access you need to start the script as sudo without having to type a password:
Code:
sudo visudoCode:
%admin ALL=(ALL) NOPASSWD:/home/<username>/scripts/startXBMC.shEdit:
If your username isn't part of the admin group it won't work. You can change '%admin' to '<username>' or:
Code:
adduser <username> adminCredits go to this post

Search
Help