Ubuntu tips

Linux related discussion about netjukebox
Locked
User avatar
wbartels
netjukebox developer
Posts: 792
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Ubuntu tips

Post by wbartels » Sat Aug 06, 2011 11:48 am

Music player daemon: improve update speed
(Tested on: Ubuntu server 10.04, 12.04, 14.04 & 16.04)

For netjukebox there is no need to read the metadata.
By disabling reading metadata will improve the update speed.

Update /etc/mpd.conf with:

Code: Select all

metadata_to_use			"none" 



Music player daemon: SPDIF output
(Tested on: Ubuntu server 10.04, 12.04, 14.04 & 16.04)

With Ubuntu Server I had a hard time to get SPDIF output working.
Here is the solution I found on http://mpd.wikia.com/wiki/Alsa#ALSA_sel ... perfect.29.

Update /etc/mpd.conf with:

Code: Select all

audio_output {
        type                    "alsa"
        name                    "SPDIF"
        device                  "cards.pcm.iec958"
}
To find the right device name use:

Code: Select all

aplay -L
For more info read: http://alsa.opensrc.org/DigitalOut




Add USB auto-mount to Ubuntu server (for external USB/MP3 player)
(Tested on: Ubuntu server 10.04 & 12.04)
  • Install required package

    Code: Select all

    sudo apt-get install usbmount
  • Edit config file

    Code: Select all

    sudo nano /etc/usbmount/usbmount.conf
  • Changed this settings to only auto-mount USB storage with the vfat file system

    Code: Select all

    #FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"
    FILESYSTEMS="vfat"
  • Speed up, use at your own risk!

    Code: Select all

    #MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"
    MOUNTOPTIONS="noexec,nodev,noatime,nodiratime"
  • Only give user root and www-data full access.

    Code: Select all

    #FS_MOUNTOPTIONS=""
    FS_MOUNTOPTIONS="-fstype=vfat,gid=www-data,dmask=0007,fmask=0007"



netjukebox 6.20 and up uses the TCPDF library now PDFLib is NOT needed any more!
Install PHP PDFLib lite

The latest PDFlib Lite source code can be found at: http://www.pdflib.com/download/free-sof ... ib-lite-7/
In this example "http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz" is used.
  • change to root user

    Code: Select all

    sudo su
  • Install required packages

    Code: Select all

    apt-get install php5-dev php-pear build-essential
  • Download and extract PDFlib Lite source code

    Code: Select all

    wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz
    tar -xvzf PDFlib-Lite-7.0.5p3.tar.gz
    cd PDFlib-Lite-7.0.5p3
  • Compile PDFLib lite, when asked for "path to pdflib installation?" type: /usr/local

    Code: Select all

    ./configure
    make
    make install
    pecl install pdflib
  • Create pdflib.ini

    Code: Select all

    cd /etc/php5/mods-available
    touch pdflib.ini
    nano pdflib.ini
  • Copy and past:

    Code: Select all

    ; configuration for php GD module
    ; priority=20
    extension=pdf.so
  • Enabel loadable module:

    Code: Select all

    sudo php5enmod pdflib
  • Restart PHP

    Code: Select all

    service apache2 restart
    or
    service php5-fpm restart
  • exit root user

    Code: Select all

    exit

Locked