Thursday, 15 July 2010
Tuesday, 13 July 2010
My XBMC customisations
sudo apt-get update
sudo apt-get install samba
sudo apt-get install unclutter
sudo apt-get install mysql-server
sudo apt-get install openjdk-6-jre
(for subsonic)
after installing xbmc library updater
cp /home/justcop/.xbmc/addons/script.libraryautoupdate/autoexec.py /home/justcop/.xbmc/userdata/autoexec.py
ls -l /dev/disk/by-uuid
to find id of storage disk
add to /etc/fstab
UUID=6886F8261C1EFA83 /mnt/Storage ntfs defaults 0 1
swap keys for ssh, remember for some reason this allows logging on as just the ip, cannot include the name, can then mount /mnt/Storage using script on desktop PC. See other post.
If xbmc won't load copy in only .xbmc file from home directory
sudo nano /etc/samba/smb.conf
[TV]
comment = TV
path = /mnt/Storage/TV
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Movies]
comment = Movies
path = /mnt/Storage/Movies
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Music]
comment = Music
path = /mnt/Storage/Music
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Photos]
comment = Photos
path = /mnt/Storage/Photos
inherit permissions = yes
read only = No
guest ok = Yes
[Music]
comment = Music
path = /mnt/Storage/Music
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Photos]
comment = Photos
path = /mnt/Storage/Photos
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Downloads]
comment = Downloads
path = /mnt/Storage/Downloads
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Thumbnails]
comment = Thumbnails
path = /home/justcop/.xbmc/userdata/Thumbnails
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
name resolve order=lmhosts host wins bcast
bind interfaces only = yes
append /etc/rc.local
echo "USB002" > /proc/acpi/wakeup
sudo mysql
CREATE USER 'justcop' IDENTIFIED BY 'justcop';
sudo apt-get install samba
sudo apt-get install unclutter
sudo apt-get install mysql-server
sudo apt-get install openjdk-6-jre
(for subsonic)
after installing xbmc library updater
cp /home/justcop/.xbmc/addons/script.libraryautoupdate/autoexec.py /home/justcop/.xbmc/userdata/autoexec.py
ls -l /dev/disk/by-uuid
to find id of storage disk
add to /etc/fstab
UUID=6886F8261C1EFA83 /mnt/Storage ntfs defaults 0 1
swap keys for ssh, remember for some reason this allows logging on as just the ip, cannot include the name, can then mount /mnt/Storage using script on desktop PC. See other post.
If xbmc won't load copy in only .xbmc file from home directory
sudo nano /etc/samba/smb.conf
[TV]
comment = TV
path = /mnt/Storage/TV
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Movies]
comment = Movies
path = /mnt/Storage/Movies
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Music]
comment = Music
path = /mnt/Storage/Music
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Photos]
comment = Photos
path = /mnt/Storage/Photos
inherit permissions = yes
read only = No
guest ok = Yes
[Music]
comment = Music
path = /mnt/Storage/Music
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Photos]
comment = Photos
path = /mnt/Storage/Photos
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Downloads]
comment = Downloads
path = /mnt/Storage/Downloads
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
[Thumbnails]
comment = Thumbnails
path = /home/justcop/.xbmc/userdata/Thumbnails
force user = justcop
inherit permissions = yes
read only = No
guest ok = Yes
name resolve order=lmhosts host wins bcast
bind interfaces only = yes
append /etc/rc.local
echo "USB002" > /proc/acpi/wakeup
sudo mysql
CREATE USER 'justcop' IDENTIFIED BY 'justcop';
CREATE database xbmc_video;
CREATE database xbmc_music;
GRANT ALL ON xbmc_music.* TO 'justcop';
GRANT ALL ON xbmc_video.* TO 'justcop';
ctrl+c
sudo nano /etc/mysql/my.cnf
comment out bind address
(update version)
sudo dpkg -i subsonic*
Creating a button to restart XBMC
After spending many hours on this, XBMC being wiped and starting again at least 3 times without ever remembering what I did last time I think it's finally time to share how I did this so it is written and I never forget.
First we update the sources and download the package which allows running of scripts from a remote button (lirc-x).
Next we ensure that this programme (irexec) runs as a daemon (in the background) as soon as we login to gnome by adding it to the .bash_login script
add the following code and save
next we make a file contaning the settings for which button and what to with it. I like to use the red button from the MSE remote to do this if you would like to use any other button just change 'red' below to the name of the button you want to choose (for non MSE remotes I have never used the so not sure if this will work, please research elsewhere)
add the following code and save
We have now said every time the red button is pressed to run the script restartXBMC.sh. Now we have to make this script.
add the following code and save
The first line kills XBMC and then waits 2 seconds. The last line starts it back up again
Next we must make the script executable
All done!
First we update the sources and download the package which allows running of scripts from a remote button (lirc-x).
sudo apt-get update
sudo apt-get install lirc-x
Next we ensure that this programme (irexec) runs as a daemon (in the background) as soon as we login to gnome by adding it to the .bash_login script
nano .bash_login
add the following code and save
irexec -dnext we make a file contaning the settings for which button and what to with it. I like to use the red button from the MSE remote to do this if you would like to use any other button just change 'red' below to the name of the button you want to choose (for non MSE remotes I have never used the so not sure if this will work, please research elsewhere)
nano .lircrcadd the following code and save
begin
prog = irexec
button = Red
config = ~/restartXBMC.sh
end
We have now said every time the red button is pressed to run the script restartXBMC.sh. Now we have to make this script.
nano restartXBMC.shadd the following code and save
#!/bin/bash
ps aux|grep -i justcop |grep -v grep|grep -i xbmc.bin|awk '{print $2}'|xargs kill -9
sleep 2
xinit /usr/bin/xbmc
exitThe first line kills XBMC and then waits 2 seconds. The last line starts it back up again
Next we must make the script executable
chmod +x ~/restartXBMC.shAll done!
Backing up Ubuntu
Ubuntu can be easily backed up using a programme called deja-dup. I recommend configuring deja-dup to backup the /home, /etc and /opt files. /etc should not be restored but it holds a bank of configuration files that may be useful if you need to refer back to them in a fresh setup.
Also create a cron script running daily to backup a list of installed packages using this command
When restoring a backup simply do
after you have readded sources from your sources.list and restored the /home folder
Also create a cron script running daily to backup a list of installed packages using this command
dpkg --get-selections > ~/package.selectionsWhen restoring a backup simply do
sudo dpkg --set-selections ~/package.selections && apt-get dselect-upgradeafter you have readded sources from your sources.list and restored the /home folder
Subscribe to:
Posts (Atom)