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';
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*

3 comments:

  1. or run media watchdog from login

    #!/bin/bash

    # Media folder watchdog script which triggers XBMCs library update function
    # on changes in the media folders. Change path to file with directories to watch below
    # prior of using the script!
    #
    # Requires:
    # - bash
    # - inotifywait
    # - xbmc-send
    # - a file containing a list of folders to watch
    #
    #
    # Author: Dome
    # Date: 2010-06-01


    # file containing a list of dirs to watch for changes
    # one directory per line!
    DIRSTOWATCH=/home/USERNAME/dirstowatch.lst

    # the XBMC host (normally localhost)
    XBMCHOST=localhost

    # The port opened to communicate with XBMC (default 9777, not 8080!)
    XBMCPORT=9777

    # optional: REGEX to identify music files for only updating music library if music was added/removed
    # leave blank to update music library everytime a file is added to any one of the watched folders
    MUSICMATCH=".*\.(mp3|ogg)"

    inotifywait -m -r --fromfile=$DIRSTOWATCH --format '%w%f' -e move -e create -e delete | while read line
    do
    # rsync spams with temp files starting with a dot, so exclude this files,
    # we don't want the script to be triggered for every temp file...
    if [[ $line =~ ^[^\.].* ]]; then
    if [[ $line =~ $MUSICMATCH ]]; then
    xbmc-send --host=$XBMCHOST --port=$XBMCPORT --action="UpdateLibrary(music)" 2>&1>/dev/null
    else
    xbmc-send --host=$XBMCHOST --port=$XBMCPORT --action="UpdateLibrary(video)" 2>&1>/dev/null
    fi
    if [ "x$MUSICMATCH" = "x" ]; then
    xbmc-send --host=$XBMCHOST --port=$XBMCPORT --action="UpdateLibrary(music)" 2>&1>/dev/null
    fi
    fi
    done

    ReplyDelete
  2. [Thumbnails]
    comment = Thumbnails
    path = /home/justcop/.xbmc/userdata/Thumbnails
    force user = justcop
    inherit permissions = yes
    read only = No
    guest ok = Yes

    ReplyDelete
  3. sudo apt-get install apache2

    sudo apt-get install php5

    sudo apt-get install libapache2-mod-php5

    sudo /etc/init.d/apache2 restart

    ReplyDelete