I have struggled for the last couple of hours trying to get this to run under a separate user as I do not use the 'pi' user myself. I have this set to autologin and start and have finally managed to get this to running how I wanted it to:
I assume you are logged in as your alternate user and in your home directory.
1) Copy the .xbmc dir and automount files into your own home directory
Code: Select all
sudo cp ../pi/.xbmc -R . && sudo cp ../pi.auto* .
2) Enter the following lines into your .bashrc (I only noticed myself but the case/esac helps to stop it from running when you ssh into your RPi)
Code: Select all
nano .bashrc
case "`tty`" in # XBMC - start only for tty1
*tty1) xbmc-ask;; # XBMC - start XBMC
esac # XBMC - end of case
3) Set your own user to automatically login. Comment out the 'pi' user and substitute with your own user following the -f switch.
Code: Select all
sudo nano /etc/inittab
#1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1 # XBMC_AUTOSTART
1:2345:respawn:/bin/login -f finalduty tty1 </dev/tty1 >/dev/tty1 2>&1
4) This was the step I got stuck with, auto login worked and XBMC would prompt properly, but mounting the images kept asking me for the sudo password. I eventually figured out that the pi user was using sudo without a password and added in my own line beneath it:
Code: Select all
sudo nano /etc/sudoers
pi ALL=(ALL) NOPASSWD: ALL
finalduty ALL=(ALL) NOPASSWD: ALL
This then allowed me to boot straight into XBMC without being prompted for anything. It also helped to get my keyboard working with it where it hadn't under the finalduty user previously.