Ga naar inhoud


bas.t

Lid
  • Items

    130
  • Registratiedatum

  • Laatst bezocht

Berichten die geplaatst zijn door bas.t

  1. @wiggert:

     

    Hoe het kan weet ik niet, maar als ik de patches kopieer zoals ze hier op het forum staan, dan kom ik ook flink in de problemen.

    Dus dat zal een geruststelling voor je zijn, het ligt echt niet aan jou.

     

    Ik heb er wat aan gedaan:

     

    de dvb-mutex-patch staat hier: http://pastebin.com/raw.php?i=yDsYs7Fh

     

    en de dvb-frontend-patch staat hier: http://pastebin.com/raw.php?i=Ck45B4y0

     

    Ik heb ze getest en dat werkt dus wel. Verder lijkt het me zo dat hier een schone taak voor de webmaster van dit forum ligt :mad:

  2. Even voor de helderheid:

     

    De reden dat ik voor een hogere kernel versie kies dan de standaard 3.2 kernel is dat die standaard kernel met zekere regelmaat een update zal krijgen. Het is tenslotte ubuntu 12.04 LTS, en dat betekent dat we er nog vier jaar mee door kunnen. Ondenkbaar dus dat er geen updates zullen volgen.

     

    Die updates zijn op zich wel prachtig natuurlijk, maar we hebben een paar patches nodig. En die zullen dus worden overschreven. Gevolg: bij iedere update moet je dus opnieuw je kernel van patches voorzien en opnieuw compileren en bovendien de sasc-ng module opnieuw compileren.

     

    Mijn ervaring in de afgelopen jaren is dat dit een tijdje goed gaat, maar dan opeens niet meer. Dan hebben de Ubuntu devs weer wat nieuws verzonnen, of er is een stomme bug geintroduceerd die voorlopig niet gefixed word.

     

    Ik ga ervan uit dat als je een HTPC bouwt, dat je die dus ook als zodanig gebruikt. Dat maakt de noodzaak voor kernel updates miniem.

     

    Ik heb dus uiteindelijk voor de 3.5 kernel gekozen, die is uitontwikkeld en biedt ondersteuning voor bijna alles wat onder linux ondersteund wordt. Goed genoeg om nog vier jaar mee te kunnen, denk ik.

    Daar is dan wel weer een trucje voor nodig, omdat de 3.5 kernel ook in de backports zit, dus zal die ook weer worden overschreven. Het trucje bestaat er uit dat ik het systeem laat geloven dat er toch echt de allernieuwste 3.5 kernel op zit, door die kernel alls laatste nummers .999 mee te geven.

     

    Ik had voor de 3.7 kernel gekozen als die geschikt was, maar dat is hij nog niet. Er zit een probleem in met de kernel headers, die worden wel gecompileerd zoals het hoort, maar installeren ho maar. Nog niet geschikt dus. Op Debian heb ik hem al wel prima lopen, dus het zal niet lang duren voordat het op Ubuntu ook kan, ik heb alleen momenteel niet de moed om het uit te zoeken.

  3. Het beste wat je nu kunt doen is je kernel dir te deleten en begin overnieuw.

     

    Even aangenomen dat je voldoende ruimte hebt onder /usr/local/src

     

    sudo mkdir /usr/local/src/kernel
    
    sudo chown user.user /usr/local/src/kernel		 ## waarbij user je eigen username is
    
    cd /usr/local/src/kernel
    
    git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git && cd ubuntu-precise
    

     

    en van daaruit weer verder.

     

    Edit: oh ja, wel even opnieuw je patch bestanden in /usr/local/src/kernel zetten.

     

    En mijn advies: neem de 3.5 kernel, zoals ik een paar berichten terug heb beschreven.

  4. Vreemd, hier werkt het feilloos. Probeer gewoon even diet patchbestanden opnieuw aan te maken en

     

    git clean -xfd

     

    git checkout master

     

    git branch -D temp

     

     

    Kies anders voor de 3.5 versie

     

    Als dat allemaal niet helpt, kan het eventueel ook nog zijn dat er een fout in je git repo zit.

     

    In dat geval zit er niets anders op om de hele dir te deleten en van voren af aan te beginnen.

  5. @wiggert:

     

    wellicht een copy & paste error van de forumsoftware?

     

    de patch moet er zo uitzien:

     

    diff -Nur linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c
    --- linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c
    +++ linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c
    @@ -83,8 +83,11 @@ static int dvb_device_open(struct inode *inode, struct file *file)
    			file->f_op = old_fops;
    			goto fail;
    		}
    -		if(file->f_op->open)
    +		if(file->f_op->open) {
    +			mutex_unlock(&dvbdev_mutex);
    			err = file->f_op->open(inode,file);
    +			mutex_lock(&dvbdev_mutex);
    +		}
    		if (err) {
    			fops_put(file->f_op);
    			file->f_op = fops_get(old_fops);
    -- 
    
    

     

    En verder, als er zich iets voordoet dat ook voor anderen van belang kan zijn, post het dan hier, ipv eem pm.

  6. Als je dat liever wilt, dan kun je ook voor de 3.5 kernel kiezen.

    Daar is wel een extra stapje voor nodig, omdat ubuntu anders telkens je kernel wil updaten.

    En dat wil je niet want dan zijn je patches verdwenen en werk het niet (goed) meer.

     

    Dan wordt het dus:

     

    git checkout -b temp Ubuntu-lts-3.5.0-22.34
    
    
    sudo apt-get install devscripts -y
    
    rm debian.quantal/changelog
    
    dch -v 3.5.0-999.`date +%Y%m%d` --distribution precise --package linux --create -c debian.quantal/changelog Sasc-ng build: v3.5.0
    
    patch -p1 <  etc, etc.
    
    etc.....
    

  7. die 2e patch, die doe ik na de eerste patch in de zelfde directory neem ik aan? ik neem aan dat ik de kernel-dir in /etc/src/ zet voor de netheid?

     

    ja, patch in dezelfde dir en de kernel dir kan waar je maar wilt, als er maar genoeg ruimte is. Onder /etc ligt niet voor de hand, eerder onder /usr/local/src

     

    Het belangrijkste is dat je de ruimte hebt. (10 GB moet genoeg zijn)

    Overigens kun je als je gecompileerd en geinstalleerd hebt het hele zwikkie weer deleten als dat nodig is.

  8. 2e update:

     

    Als je de kernel aan het patchen bent, gebruik dan vooral ook onderstaande patch, zodat het toewijzen van de loopback adapters vlekkeloos loopt.

     

    Dus eerst het patch bestand aanmaken

     

     

    nano dvb-frontend-patch
    

     

    --- a/drivers/media/dvb/dvb-core/dvb_frontend.c
    +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
    @@ -604,6 +604,7 @@  static int dvb_frontend_thread(void *dat
    	enum dvbfe_algo algo;
    
    	bool re_tune = false;
    +	bool semheld = false;
    
    	dprintk("%s\n", __func__);
    
    @@ -627,6 +628,8 @@  restart:
    
    		if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) {
    			/* got signal or quitting */
    +			if (!down_interruptible (&fepriv->sem))
    +				semheld = true;
    			fepriv->exit = DVB_FE_NORMAL_EXIT;
    			break;
    		}
    @@ -742,6 +745,8 @@  restart:
    		fepriv->exit = DVB_FE_NO_EXIT;
    	mb();
    
    +	if (semheld)
    +		up(&fepriv->sem);
    	dvb_frontend_wakeup(fe);
    	return 0;
    }
    @@ -1804,16 +1809,20 @@  static int dvb_frontend_ioctl(struct fil
    
    	dprintk("%s (%d)\n", __func__, _IOC_NR(cmd));
    
    -	if (fepriv->exit != DVB_FE_NO_EXIT)
    +	if (down_interruptible (&fepriv->sem))
    +		return -ERESTARTSYS;
    +
    +	if (fepriv->exit != DVB_FE_NO_EXIT) {
    +		up(&fepriv->sem);
    		return -ENODEV;
    +	}
    
    	if ((file->f_flags & O_ACCMODE) == O_RDONLY &&
    	    (_IOC_DIR(cmd) != _IOC_READ || cmd == FE_GET_EVENT ||
    -	     cmd == FE_DISEQC_RECV_SLAVE_REPLY))
    +	     cmd == FE_DISEQC_RECV_SLAVE_REPLY)) {
    +		up(&fepriv->sem);
    		return -EPERM;
    -
    -	if (down_interruptible (&fepriv->sem))
    -		return -ERESTARTSYS;
    +	}
    
    	if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY))
    		err = dvb_frontend_ioctl_properties(file, cmd, parg);
    

     

     

    en vervolgens de patch toepassen

     

    patch -p1 < ../dvb-frontend-patch
    

  9. Uitgangspunt: een verse installatie van Ubuntu Precise 12.04 LTS, zonder desktop omgeving. Dus alleen 'basic server' en 'ssh server'.

     

    Voor een frontend heb je alleen de sectie 'Mythtv' t/m mythtv plugins nodig.

     

    Waarschijnlijk werkt het ook met Mythbuntu, maar daar steek ik mijn hand niet voor in het vuur.

     

    Alle commando's zijn vanaf een andere computer uitgevoerd via ssh.

     

    Aanbevolen hardware: een smargo smartreader+ en één of meerdere dvb-c tuners (ik heb vijf Satelco Easywatch dvb-c pci 'Basic Edition' kaarten, koop nooit de HD versie, die is hardwarematig identiek aan de basic edition, je betaalt alleen flink extra voor de windhoos driver)

     

    Kernel Compileren

     

    Dit is nodig omdat je een patch moet gebruiken om het goed samen te laten werken met sasc-ng. Bovendien kun je nu meer dan vier dvb-c adapters gebruiken als je dat wilt.

     

    Pakketjes:

     

    sudo apt-get install fakeroot bin86 build-essential crash kexec-tools makedumpfile kernel-wedge git-core \
    libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev libgtk2.0-dev flex bison -y
    

     

    sudo apt-get build-dep linux-image-`uname -r` -y
    

     

    Source Ophalen en Patchen

     

    mkdir kernel
    
    cd kernel
    
    nano dvb-mutex-patch
    

     

    en plak er het volgende in:

     

    diff -Nur linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c
    --- linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c
    +++ linux-2.6.38/drivers/media/dvb/dvb-core/dvbdev.c
    @@ -83,8 +83,11 @@ static int dvb_device_open(struct inode *inode, struct file *file)
    file->f_op = old_fops;
    goto fail;
    }
    - if(file->f_op->open)
    + if(file->f_op->open) {
    + mutex_unlock(&dvbdev_mutex);
    err = file->f_op->open(inode,file);
    + mutex_lock(&dvbdev_mutex);
    + }
    if (err) {
    fops_put(file->f_op);
    file->f_op = fops_get(old_fops);
    --
    

     

    git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git && cd ubuntu-precise
    

     

    git tag -l Ubuntu-lts-*	 ## Kies de laatste 3.4.x kernel (op 16 jan 2013 was dat Ubuntu-lts-3.4.0-5.11)
    
    git checkout -b temp Ubuntu-lts-3.4.0-5.11
    
    fakeroot debian/rules clean
    
    patch -p1 < ../dvb-mutex-patch
    
    git commit -a -m "DVB mutex patch for sasc-ng"
    

     

    Als je meer dan 4 adapters hebt dan moet je het volgende doen:

    Verander het maximaal toegestane aantal adapters. Voor elke echte adapter heb je er twee nodig,

    n.l één voor de kernel plus één voor sasc-ng

     

    In mijn situatie (vijf dvb adapters) ga ik dus van 8 naar 10.

     

    sed -i 's/DVB_MAX_ADAPTERS=8/DVB_MAX_ADAPTERS=10/' debian.quantal/config/config.common.ubuntu
    
    git commit -a -m "Add more dvb adapters"
    

     

    Build Voorbereiden

     

    chmod 755 -R debian/scripts
    
    debian/rules updateconfigs
    

     

    Build

     

    fakeroot debian/rules clean
    
    DEB_BUILD_OPTIONS=parallel=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-generic
    

     

    DEB_BUILD_OPTIONS=parallel=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-indep
    

     

    Install

     

    cd ..
    
    sudo dpkg -i *.deb
    
    sudo shutdown -r now
    

     

    Grub

     

    Als je, zoals ik, vijf tuners in je systeem hebt en voor al deze tuners het maximum van vijf gelijktijdige opnames instelt in MythTV, dan kom je tekort aan het standaard toegewezen 'vmalloc' van 120 MB

     

    Geen probleem, dat is eenvoudig te wijzigen. Open een terminal en doe:

     

    sudo sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="vmalloc=256MB"/' /etc/default/grub
    
    sudo update-grub
    

     

    Na de volgende herstart van je machine heb je geen probleem meer met 'vmalloc'

     

    Oscam

     

    Oscam moet de smargo smartreader+ kunnen aanspreken. Een aantal jaar terug verhinderde het pakket 'brltty' dit proces.

     

    Ik weet niet zeker of dit nog steeds zo is, maar ik heb de gewoonte om brltty voor de zekerheid te verwijderen.

     

    Als je braille nodig hebt, zul je tenslotte vast niet veel plezier aan MythTV beleven.

     

     

    De rest van deze copy&paste HOW-TO doe je het best als root.

     

    sudo su
    

     

    apt-get purge brltty -y
    

     

    Je draait Oscam uiteraard niet als root. Dus doe:

     

    adduser --system --group --shell /sbin/nologin --home /opt/oscam oscam
    
    usermod -a -G dialout oscam
    

     

    Nu even de source ophalen en configureren en compileren:

     

    apt-get install cmake dialog libssl-dev git-core build-essential -y
    
    mkdir -p /opt/oscam/src
    
    cd /opt/oscam/src
    
    git clone https://github.com/bas-t/oscam.git /opt/oscam/src/ && cd /opt/oscam/src/trunk
    
    ./config.sh	 ## je hoeft alleen maar naar beneden te scrollen naar 'save' en dan enter
    
    make
    
    cd /opt/oscam/src/trunk/Distribution/
    
    cp -f ./oscam-* /opt/oscam/oscam.bin
    
    mkdir -p /opt/oscam/etc/cw/
    
    touch /opt/oscam/oscam.log
    
    chown -R oscam.oscam /opt/oscam
    

     

    Oscam Systeem Configuratie

     

    Je hebt drie configuratie bestanden nodig in /opt/oscam/etc en één in /etc/init.d

     

    nano /opt/oscam/etc/oscam.conf
    

     

    Er zijn, zover ik weet, twee mogelijkheden: je zit in een ziggo 0604 gebied, of in een 0602 gebied.

     

    Afhankelijk daarvan zet je in [newcamd] port = 15050@0604:000000, of port = 15050@0602:000000

     

    [global]
    usrfile					 = /opt/oscam/oscamuser.log
    logfile					 = /opt/oscam/oscam.log
    cwlogdir					 = /opt/oscam/etc/cw
    disablelog				 = 0
    disableuserfile			 = 0
    usrfileflag				 = 0
    clienttimeout				 = 2000
    fallbacktimeout			 = 1500
    clientmaxidle				 = 120
    failbantime				 = 0
    bindwait					 = 120
    netprio					 = 0
    clientdyndns				 = 0
    resolvedelay				 = 2
    unlockparental			 = 0
    nice						 = -1
    serialreadertimeout		 = 1000
    maxlogsize				 = 10
    waitforcards				 = 1
    preferlocalcards			 = 1
    saveinithistory			 = 0
    readerrestartseconds		 = 5
    lb_mode					 = 0
    lb_save					 = 0
    lb_nbest_readers			 = 1
    lb_nfb_readers			 = 1
    lb_min_ecmcount			 = 5
    lb_max_ecmcount			 = 500
    lb_reopen_seconds			 = 900
    resolvegethostbyname		 = 0
    
    [monitor]
    port = 30000
    aulow = 120
    monlevel = 0
    
    [newcamd]
    port						 = 15050@0604:000000
    key						 = 0102030405060708091011121314
    allowed					 =
    keepalive					 = 1
    mgclient					 = 0
    
    [webif]
    httpport					 = 15080
    httpuser					 = username
    httppwd					 = password
    httprefresh				 = 0
    httpallowed				 = 127.0.0.1
    httphideidleclients		 = 0
    httpreadonly				 = 0
    

     

    nano /opt/oscam/etc/oscam.server
    

     

    Ook hier geldt: caid = 0604:0000 of caid = 0602:0000

     

    [reader]
    Label = Ziggo
    Device = /dev/ttyUSB0
    mhz = 600
    cardmhz = 600
    Protocol = mouse
    EMMCache = 1,3,2
    Group = 1
    caid = 0604:0000
    rsakey = 3C8633AAC0D367533DEC7BB2EEEDEB8CA3ADA52E58B99BB34672783277A1DAAC3B6106AD0909774E031B2A6E30195B437683AD0FC599B87D08CEA47BE1B6C76A
    boxkey = 1122334455667788
    fallback = 0
    

     

    nano /opt/oscam/etc/oscam.user
    

     

    Wederom 0604 of 0602 in ident en caid

     

    [account]
    user = mythtv
    pwd = mythtv
    uniq = 0
    group = 1
    ident = 0604:000000
    caid = 0604
    au = Ziggo
    

     

    nano /etc/init.d/oscam
    

     

    #! /bin/bash
    ### BEGIN INIT INFO
    # Provides:		 oscam
    # Required-Start: $local_fs $remote_fs $network
    # Required-Stop:	 $local_fs
    # Default-Start:	 2 3 4 5
    # Default-Stop:	 0 1 6
    # Short-Description: softcam
    # Description:	 A softcam		
    ### END INIT INFO
    # based on a basic debian skeleton startup script
    # START EDIT HERE #
    NCSNAME=oscam.bin	 # your oscam bin version
    NCSDIR="/opt/oscam"	 # your oscam binary directory full path (without trailing /).
    NCSCONF="/opt/oscam/etc/" # xml config full path
    NCSUSER=oscam		 # existing user that will run oscam daemon (you should NOT use root !).
    NCSNICE=10		 # set the newcs daemon priority -20 (most favorable scheduling) to 19 (least favorable).
    # END EDIT HERE #
    PATH=/usr/sbin:/usr/bin:/sbin:/bin # some unecessary default paths
    DESC="Oscam daemon"	 # dummy description
    NAME=oscam		 # dummy name
    DAEMON="$NCSDIR/$NCSNAME" # Daemon bin location
    DAEMON_ARGS="-b -c $NCSCONF"
    PIDFILE=/var/run/$NAME.pid # pid path
    LOG=/opt/oscam/$NAME.log	 # log path
    SCRIPTNAME=/etc/init.d/$NAME
    # Exit if the package is not installed
    if [ ! -x "$DAEMON" ]
    then
    echo "$DAEMON does not exist"
    exit 0
    fi
    # Define LSB log_* functions.
    # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
    . /lib/lsb/init-functions
    #
    # Function that starts the daemon/service
    #
    do_start()
    {
    # Return
    # 0 if daemon has been started
    # 1 if daemon was already running
    # 2 if daemon could not be started
    start-stop-daemon --start --quiet --chuid $NCSUSER --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
     || return 1
    
    start-stop-daemon --start --verbose --nicelevel $NCSNICE --make-pidfile --background \
    --chuid $NCSUSER --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS 2>&1 >> $LOG \
     || return 2
    # Add code here, if necessary, that waits for the process to be ready
    # to handle requests from services started subsequently which depend
    # on this one. As a last resort, sleep for some time.
    return $?
    }
    #
    # Function that stops the daemon/service
    #
    do_stop()
    {
    # Return
    # 0 if daemon has been stopped
    # 1 if daemon was already stopped
    # 2 if daemon could not be stopped
    # other if a failure occurred
    start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NCSNAME
    RETVAL="$?"
    [ "$RETVAL" = 2 ] && return 2
    # Wait for children to finish too if this is a daemon that forks
    # and if the daemon is only ever run from this initscript.
    # If the above conditions are not satisfied then add some other code
    # that waits for the process to drop all resources that could be
    # needed by services started subsequently. A last resort is to
    # sleep for some time.
    start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
    [ "$?" = 2 ] && return 2
    # Many daemons don't delete their pidfiles when they exit.
    rm -f $PIDFILE
    return "$RETVAL"
    }
    
    case "$1" in
    start)
    echo "Starting $DESC"
    do_start
    case "$?" in
     0) log_daemon_msg "Success"
    	 log_end_msg 0;;
     1) log_daemon_msg "Already running"
    	 log_end_msg 1;;
     2)	 log_daemon_msg "Failed"
    	 log_end_msg 2;;
    esac
    ;;
    stop)
    echo "Stopping $DESC"
    do_stop
    case "$?" in
     0|1) echo "Success" ;;
     2) echo "Failed !" ;;
    esac
    ;;
    restart)
    log_daemon_msg "Restarting $DESC"
    do_stop
    case "$?" in
     0|1)
     do_start
     case "$?" in
    	 0) log_end_msg 0 ;;
    	 1) log_end_msg 1 ;; # Old process is still running
    	 *) log_end_msg 1 ;; # Failed to start
     esac
     ;;
     *)
    	 # Failed to stop
     log_end_msg 1
     ;;
    esac
    ;;
    *)
    echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
    exit 3
    ;;
    esac
    exit 0
    

     

    Nu nog even /etc/init.d/oscam uitvoerbaar maken en zorgen dat het bij elke systeemstart wordt uitgevoerd:

     

    chmod 755 /etc/init.d/oscam
    
    update-rc.d oscam defaults
    
    /etc/init.d/oscam start
    

     

    SASC-NG

     

    Voor SASC-NG heb je alweer een paar pakketjes nodig:

     

    apt-get install libproc-processtable-perl libv4l-0 libv4l-dev -y
    

     

    Nu de gepatchte source ophalen, configureren, compileren en installeren:

     

    cd /usr/src
    
    rm -rf Sasc-ng
    
    git clone -b Sasc-ng-patched https://github.com/bas-t/Sasc-ng.git && cd Sasc-ng/sc/contrib/sasc-ng
    
    ./configure --compiletype=release
    
    make && make module
    
    rm -rf /lib/modules/`uname -r`/misc
    
    rm -f /usr/bin/sasc-ng
    
    rm -rf /usr/lib/sasc
    
    cp -f sasc-ng /usr/bin
    
    mkdir /usr/lib/sasc
    
    cp ./sc/PLUGINS/lib/* /usr/lib/sasc/
    
    mkdir /lib/modules/`uname -r`/misc
    
    /usr/bin/install dvbloopback.ko /lib/modules/`uname -r`/misc/
    
    depmod
    

     

    En de nodige linkjes op hun plaats zetten:

     

    ln -s /usr/lib/sasc/libsc-cardclient.a /usr/lib/libsc-cardclient.a
    ln -s /usr/lib/sasc/libsc-conax.a /usr/lib/libsc-conax.a
    ln -s /usr/lib/sasc/libsc-constcw.a /usr/lib/libsc-constcw.a
    ln -s /usr/lib/sasc/libsc-crytoworks.a /usr/lib/libsc-crytoworks.a
    ln -s /usr/lib/sasc/libsc-irdeto.a /usr/lib/libsc-irdeto.a
    ln -s /usr/lib/sasc/libsc-nagra.a /usr/lib/libsc-nagra.a
    ln -s /usr/lib/sasc/libsc-nds.a /usr/lib/libsc-nds.a
    ln -s /usr/lib/sasc/libsc-sc_conax.a /usr/lib/libsc-sc_conax.a
    ln -s /usr/lib/sasc/libsc-sc_cryptoworks.a /usr/lib/libsc-sc_cryptoworks.a
    ln -s /usr/lib/sasc/libsc-sc_irdeto.a /usr/lib/libsc-sc_irdeto.a
    ln -s /usr/lib/sasc/libsc-sc_nagra.a /usr/lib/libsc-sc_nagra.a
    ln -s /usr/lib/sasc/libsc-sc_seca.a /usr/lib/libsc-sc_seca.a
    ln -s /usr/lib/sasc/libsc-sc_viaccess.a /usr/lib/libsc-sc_viaccess.a
    ln -s /usr/lib/sasc/libsc-sc_videoguard2.a /usr/lib/libsc-sc_videoguard2.a
    ln -s /usr/lib/sasc/libsc-seca.a /usr/lib/libsc-seca.a
    ln -s /usr/lib/sasc/libsc-shl.a /usr/lib/libsc-shl.a
    ln -s /usr/lib/sasc/libscviaccess.a /usr/lib/libscviaccess.a
    ln -s /usr/lib/sasc/libvdr-sc.a /usr/lib/libvdr-sc.a
    

     

    SASC-NG Systeem Configuratie

     

    nano /etc/default/sascd
    

     

    				 # Number of real adapters installed in your system
    				 # Count starts at 0 (zero), so if you have 2, choose 1
    
    ADAPTERS="4"
    
    				 # Number of adapters dedicated to sasc-ng
    				 # Maximum is 4 because max 8 adapters are permitted in your system.
    				 # (4 real + 4 loopback) If you need more, recompile your kernel.
    				 # So if you have 2 adapters, you need to set "-j a:c -j b:d" in JOIN=" "
    
    NUMADAPTERS="5"
    
    				 # Number of seconds delay you need before (re)loading dvbloopback and other components.
    				 # On Debian Squeeze 2 or 3 should be fine.
    				 # On Ubuntu Precise however, 5 seems to be good to go.
    
    DELAY="3"
    
    				 # How nice we are. (must be positive or 0, we don't run as root
    				 # Setting it to a positive value makes sure that your system will be
    				 # accessible, even when things go wrong.
    
    NICE="3"
    
    				 # Run as <username>, don't run as root.
    				 # USER must be member of the video group in order to get access to adapters
    				 # Do: usermod -a -G video <username> to add USER to the video group.
    
    USER="mythtv"
    
    				 # Combine (some of) your real adapters with loopback adapters
    				 # Example: assuming you have 5 real adapters installed in your system
    				 # The first two of them are in use with Tvheadend or some other program
    				 # Number 3, 4 and 5 will be used by MythTV
    				 # Then you should set: -j 2:5 -j 3:6 -j 4:7
    
    JOIN="-j 0:5 -j 1:6 -j 2:7 -j 3:8 -j 4:9"
    
    				 # The directory in which you have placed the cam files needed
    				 # to communicate with Oscam or other cardserver
    
    CAMDIR="--cam-dir /etc/camfiles/"
    
    				 # Other options to pass to SASC-NG
    
    OPTS="--daemon --cam-budget --sid-allpid --sid-nocache --sid-filt 20 --buffer 16M"
    
    				 # Pid dir
    
    PIDDIR="/var/run/sasc"
    
    				 # Pid file
    
    PID="sasc-ng.pid"
    
    				 # Set this to 1 once you are done configuring.
    
    ENABLED="0"
    

     

    nano /etc/init.d/sascd
    

     

    #!/bin/bash
    ### BEGIN INIT INFO
    # Provides:		 sasc-ng
    # Required-Start: $all
    # Required-Stop:	 $local_fs
    # Default-Start:	 2 3 4 5
    # Default-Stop:	 0 1 6
    # Short-Description: Loopback dvb interface
    # Description:	 Sasc-ng provides a decrypted loopback interface on a real dvb interface.
    ### END INIT INFO
    
    # Author: Bas.t
    
    # If not enabled, die.
    test "$ENABLED" != "0" || exit 0
    
    # Include sascd defaults if available.
    test -f /etc/default/sascd && . /etc/default/sascd
    
    # If we have a hardware and/or BIOS problem, so the real adapters did not load correctly, die.
    if ! test -e /dev/dvb/adapter$ADAPTERS > /dev/null 2>&1; then
    echo -e "Can not load dvbloopback, your adapters did not initialise correct. \n"
    exit 1
    fi
    
    mkdir $PIDDIR > /dev/null 2>&1
    chown $USER.$USER $PIDDIR
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DESC=Descrambler
    PROG=SASC-NG
    DAEMON=/usr/bin/sasc-ng
    NAME=sascd
    MYTH="/etc/init.d/mythtv-backend"
    UPSTARTMYTH="mythtv-backend"
    
    # Gracefully exit if the package has been removed.
    test -x $DAEMON || exit 0
    
    # Define LSB log_* functions.
    . /lib/lsb/init-functions
    
    # Test if the dvbloopback module is loaded.
    DriverLoaded() {
    grep -qse dvbloopback /proc/modules
    }
    
    # Load dvbloopback
    LoadDriver() {
    echo -e ""
    echo -e "Loading dvbloopback driver module. \n"
    sleep $DELAY
    modprobe dvbloopback num_adapters=$NUMADAPTERS
    sleep $DELAY
    }
    
    # Unload dvbloopback
    UnloadDriver() {
    rmmod dvbloopback
    }
    
    # Load driver, start sasc-ng, start mythbackend
    d_start() {
     # Load dvbloopback
     if ! DriverLoaded; then
    	 LoadDriver
     fi
     if DriverLoaded; then
    	 echo -e "dvbloopback succesfully loaded. \n"
     else
    	 echo -e "Could not load dvbloopback driver module. \n"
    	 echo -e "Aborting ... \n"
    	 exit 1
     fi
    
     # Start SASC-NG
     if ! ps -C sasc-ng > /dev/null 2>&1; then
    	 echo -e "Starting $DESC: $PROG \n"
    	 su $USER -c "nice -n $NICE sasc-ng $JOIN $OPTS $CAMDIR --pidfile $PIDDIR/$PID &" > /dev/null 2>&1
    	 sleep $DELAY
    			 if ! ps -C sasc-ng > /dev/null 2>&1; then
    				 echo -e " $PROG did not start. \n"
    				 exit 1
    			 else
    				 echo -e "$PROG startup sequence completed. \n"
    			 fi
     else
    	 echo -e "$PROG is already running. \n"
     fi
    
     # If needed, wait for Mysql Server
     while : ; do
    	 [[ -f "/var/run/mysqld/mysqld.pid" ]] && break
    	 echo "Pausing 30 secs repeatedly until Mysql Server is up and running."
    	 sleep 30
     done
    
     # Start MythTV Backend. (or restart, if it is already running)
     if ! ps -C mythbackend > /dev/null 2>&1; then
    	 if ! [ -L $MYTH ]; then
    		 $MYTH start
    	 else
    		 service $UPSTARTMYTH start
    	 fi
     else
    	 sleep $DELAY
    	 if ! [ -L $MYTH ]; then
    		 $MYTH stop
    		 # Just in case it hangs:
    		 killall -9 mythbackend > /dev/null 2>&1
    		 sleep $DELAY
    		 $MYTH start
    	 else
    		 service $UPSTARTMYTH stop
    		 # Just in case it hangs:
    		 killall -9 mythbackend > /dev/null 2>&1
    		 sleep $DELAY
    		 service $UPSTARTMYTH start
    	 fi
     fi
     if ps -C mythbackend > /dev/null 2>&1; then
     echo -e ""
     echo -e "Sucessfully started $UPSTARTMYTH\n"
     fi
    }
    
    # Stop mythbackend, stop sasc-ng, unload driver
    d_stop() {
     # Stop MythTV
     echo -e ""
     if ! [ -L $MYTH ]; then
     $MYTH stop
     else
     service $UPSTARTMYTH stop
     fi
     # Just in case it hangs:
     killall -9 mythbackend > /dev/null 2>&1
     # Stop SASC-NG
     echo -e ""
     echo -e "Stopping $DESC: $PROG \n"
     killall -9 sasc-ng
     rm -f $PIDDIR/$PID
     sleep $DELAY
    
     # Unload dvbloopback
     if DriverLoaded; then
    	 echo -e "Unloading dvbloopback. \n"
    UnloadDriver
     fi
    }
    
    case "$1" in
    start)
     log_daemon_msg "Starting $PROG" "$DESC"
     d_start
     log_end_msg $?
     ;;
    stop)
     log_daemon_msg "Stopping $PROG" "$DESC"
     d_stop
     log_end_msg $?
     ;;
    restart|force-reload)
     log_daemon_msg "Restarting $PROG" "$DESC"
     d_stop
     d_start
     log_end_msg $?
     ;;
    *)
    	 echo "Usage: $NAME {start|stop|restart|force-reload}" >&2
    	 exit 1
    	 ;;
    esac
    
    exit 0
    

     

    Dit bestand moet uitvoerbaar zijn en bij elke systeemstart worden uitgevoerd.

     

    chmod 755 /etc/init.d/sascd
    
    update-rc.d sascd defaults
    

     

    En als laatste heb je nog een bestand nodig: /etc/camfiles/cardclient.conf

     

    Ook hier weer 0604 of 0602

     

    192.168.1.3 is het adres van mijn MythTV backend. Dit moet je aanpassen aan je eigen situatie.

     

    mkdir /etc/camfiles
    
    echo "newcamd:192.168.1.3:15050:1/0604/ffff:mythtv:mythtv:0102030405060708091011121314" > /etc/camfiles/cardclient.conf
    

     

    Nu moet de mythtv user worden aangemaakt.

     

    N.B.: Dit is niet nodig als je Mythbuntu gebruikt, dan bestaat die account al.

     

    adduser --shell /bin/bash --system --group mythtv
    
    usermod -a -G video mythtv
    
    usermod -a -G audio mythtv
    
    usermod -a -G dialout mythtv
    
    usermod -a -G cdrom mythtv
    

     

    chown mythtv.mythtv -R /etc/camfiles ## dit is nodig vanwege de ecm.cache. Deze moet beschrijfbaar zijn voor mythtv.
    

     

    Nu kun je er voor kiezen om de ubuntu pakketjes voor mythtv te gebruiken. In dat geval ben je klaar.

     

    Als je een fan van mythbuntu bent en graag je frontends up mythbuntu laat lopen, dan is het gebruik van die pakketjes wel aan te raden.

     

    Maar vergeet niet om /etc/init.d/sascd start te doen en dan pas mythtv-setup uit te voeren.

     

    Uiteraard moet je eerst /etc/default/sascd configureren.

     

    Ik doe het liever allemaal zelf en ga dus door met het volgende gedeelte.

     

    Mysql

     

    Je hebt een database nodig. Om later je database te onderhouden/manipuleren heb je ook phpmyadmin nodig

     

    (kies voor ''apache2'', als je wordt gevraagd)

     

    apt-get install mysql-server phpmyadmin -y
    

     

    Mysql Systeem Configuratie

     

    Standaard is er alleen toegang tot de database vanaf localhost, oftewel 127.0.0.1

     

    Dit is niet wenselijk, dus dat veranderen we even.

     

    sed -i 's/bind-address/# bind-address/' /etc/mysql/my.cnf
    

     

    Vervolgens:

     

    echo "[mysqld]" > /etc/mysql/conf.d/mythtv.cnf
    echo "bind-address=0.0.0.0" >> /etc/mysql/conf.d/mythtv.cnf
    echo "max_connections=100" >> /etc/mysql/conf.d/mythtv.cnf
    
    service mysql restart
    

     

    Mythconverg Database Maken

     

    Je hebt een initiele database nodig voordat je mythtv-setup kunt uitvoeren.

     

    mysql --user=root -p
    

     

    create database mythconverg;
    create user 'mythtv'@'%' identified by 'mythtv';
    create user 'mythtv'@'localhost' identified by 'mythtv';
    set password for 'mythtv'@'%' = password('mythtv');
    set password for 'mythtv'@'localhost' = password('mythtv');
    GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv";
    FLUSH PRIVILEGES;
    GRANT ALL ON mythconverg.* TO mythtv@'%' IDENTIFIED BY "mythtv";
    FLUSH PRIVILEGES;
    GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv";
    FLUSH PRIVILEGES;
    GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@'%' IDENTIFIED BY "mythtv";
    FLUSH PRIVILEGES;
    ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
    flush privileges;
    exit;
    

     

    Timezone info in Mysql laden

     

    mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql ##Je kunt de 'fouten' negeren.
    
    service mysql restart
    

     

    MythTV

     

    Voor het compileren van MythTV heb je een hele vracht aan pakketjes nodig, te beginnen met:

     

    apt-get build-dep mythtv -y
    

     

    Aanvullend:

     

    apt-get install autoconf automake autopoint autotools-dev cmake curl gdb libsdl-dev debhelper gawk gperf libao-dev libasound2-dev \
    libass-dev libavahi-client-dev libavahi-common-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libbluetooth-dev \
    libbluray-dev libboost-dev libboost-thread-dev libiso9660-dev libbz2-dev libcdio-dev libcec-dev libcrystalhd-dev libcurl4-gnutls-dev \
    libcwiid-dev libdbus-1-dev libenca-dev libflac-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev libglew1.6-dev \
    libglu1-mesa-dev libhal-dev libhal-storage-dev libjasper-dev libjack-jackd2-dev libjpeg-dev libltdl-dev liblzo2-dev libmad0-dev \
    libmicrohttpd-dev libmodplug-dev libmpcdec-dev libmpeg2-4-dev libmysqlclient-dev libnfs-dev libogg-dev libpcre3-dev libplist-dev \
    libpng12-dev libpostproc-dev libpulse-dev librtmp-dev libsamplerate-dev libshairport-dev libsmbclient-dev libsqlite3-dev libssl-dev \
    libswscale-dev libtinyxml-dev libtool libudev-dev libusb-dev libva-dev libvdpau-dev libvorbis-dev libvpx-dev libxinerama-dev libxmu-dev \
    libxrandr-dev libxt-dev libyajl-dev lsb-release nasm python-dev python-support unzip yasm zip zlib1g-dev libcap-dev swig fonts-droid \
    ttf-bitstream-vera ttf-dejavu ttf-dejavu-extra ttf-dustin ttf-tiresias git-core checkinstall python-mysqldb python-lxml python-urlgrabber \
    libclass-dbi-perl libdbd-mysql-perl libnet-upnp-perl libio-socket-inet6-perl libavahi-compat-libdnssd-dev xmltv-util ntp uuid-dev \
    libzmq-dev libqt4-sql-mysql -y
    

     

    Eerste Build Voorbereiden

     

    cd /usr/src
    
    rm -rf mythtv
    
    git clone https://github.com/MythTV/mythtv.git && cd mythtv
    
    git checkout fixes/0.26
    
    git remote add -f bas-t git://github.com/bas-t/mythtv.git
    

     

    Volgende Builds Voorbereiden

     

    Als er nadat je mythtv al hebt geinstalleerd wijzigingen in mythtv zijn, dan zul je wellicht een update willen uitvoeren. Of je wilt gewoon net even anders configureren.

     

    Zonde om dan weer helemaal de git clone te moeten uitvoeren zoals in de eerste build. In plaats daarvan de volgende commando's en vervolgens gewoon weer naar configureren.

     

    apt-get update && apt-get dist-upgrade -y
    
    cd /usr/src/mythtv
    
    git clean -xfd
    
    git checkout fixes/0.26
    
    git branch -D compile
    
    git pull
    

     

    Configureren

     

    git checkout -b compile
    

     

    Sinds kort zit er een commit in die bij mij een stotterend beeld op HD kanalen veroorzaakt.

    Die doe ik dus weg:

     

    git revert 3c8d88ac55 ##Als je van master compileert is dit git revert d34833f2ee
    

     

    Als je het zat bent om iedere mux handmatig te moeten tunen, dan kun je deze er bij nemen.

    Onderin het blad 'Videosource setup' (tijdens mythtv-setup) kun je dan je network-id invullen. (in Groningen is dat 9700)

    Daarna kan je naar kanalen scannen zoals het hoort, met de rest van de gegevens die je van ziggo kreeg.

     

    git cherry-pick 4d3ff242d9
    

     

    Irritant hè? Als je gepauzeerd hebt en weer verder wil duurt het een eeuwigheid voordat de OSD verdwijnt.

    Mis je mooi de belangrijkste ondertitels. Daar is wat aan te doen:

     

    git cherry-pick 8900962f38
    

     

    En nu verder naar de configuratie.

     

    git reset --hard HEAD
    
    cd mythtv
    

     

    ./configure --compile-type=profile --prefix=/usr --runprefix=/usr --enable-crystalhd --enable-lirc --enable-audio-alsa \
    --enable-audio-oss --enable-dvb --enable-ivtv --enable-firewire --enable-joystick-menu --enable-ffmpeg-pthreads \
    --enable-pic --enable-vaapi --perl-config-opts="INSTALLDIRS=vendor" --enable-libvpx --enable-libx264 --enable-libmp3lame \
    --enable-libfaac --enable-libxvid --enable-nonfree --enable-opengl-video --enable-runtime-cpudetect --enable-mmx \
    --enable-vdpau --enable-libfftw3 --enable-audio-jack --enable-sdl --enable-hdpvr --with-bindings=perl,python,php --disable-audio-pulse
    

     

    Compileren

     

    nice -n 19 make -j 2
    
    /etc/init.d/mythtv-backend stop
    
    killall -9 mythfrontend
    
    apt-get purge mythtv-progs -y && apt-get purge mythtv-plugins -y
    

     

    Installeren

     

    cd /usr/src/mythtv/mythtv && checkinstall -y --fstrans=no --pkgname=mythtv-progs \
    --pkgversion="`date +%Y%m%d`.`git rev-parse --short HEAD`"
    

     

    Mythtv Plugins

     

    apt-get install python-oauth libdate-manip-perl libxml-xpath-perl libxml-simple-perl libimage-size-perl \
    libdatetime-format-iso8601-perl libexif-dev dcraw libcdio-paranoia-dev libtag1-dev -y
    

     

    cd /usr/src/mythtv/mythplugins
    
    ./configure --prefix=/usr
    

     

    nice -n 19 make -j2
    

     

    checkinstall -y --fstrans=no --pkgname=mythtv-plugins --pkgversion="`date +%Y%m%d`.`git rev-parse --short HEAD`"
    

     

    MythTV Systeem Configuratie

     

    nano /etc/init.d/mythtv-backend
    

     

    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:		 mythtv-backend
    # Required-Start: $local_fs $remote_fs
    # Required-Stop:	 $local_fs $remote_fs
    # Should-Start:	 mysql
    # Should-Stop:	 mysql
    # Default-Start:	 2 3 4 5
    # Default-Stop:	 0 1 6
    # Short-Description: Start/Stop the MythTV server.
    ### END INIT INFO
    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
    DAEMON=/usr/bin/mythbackend
    NAME="mythbackend"
    DESC="MythTV server"
    test -x $DAEMON || exit 0
    . /lib/lsb/init-functions
    set -e
    
    USER=mythtv
    USER_HOME=$(grep ^$USER /etc/passwd | awk -F : '{print $6}')
    RUNDIR=/var/run/mythtv
    LOGDIR=/var/log/mythtv
    ARGS="--daemon --logpath $LOGDIR --pidfile $RUNDIR/$NAME.pid" ## 0.25 and later ##
    #ARGS="--daemon --logfile /var/log/mythtv/mythbackend.log --pidfile $RUNDIR/$NAME.pid"
    EXTRA_ARGS=""
    NICE=0
    
    if [ -f /etc/default/mythtv-backend ]; then
    . /etc/default/mythtv-backend
    fi
    
    ARGS="$ARGS $EXTRA_ARGS"
    mkdir -p $LOGDIR
    chown -R $USER $LOGDIR
    mkdir -p $RUNDIR
    chown -R $USER $RUNDIR
    unset DISPLAY
    unset SESSION_MANAGER
    
    case "$1" in
    start)
    if test -e $RUNDIR/$NAME.pid ; then
    echo "mythbackend already running, use restart instead."
    else
    		 test -f /etc/default/locale && . /etc/default/locale || true
    		 rm -f /var/log/mythtv/* > /dev/null 2>&1
    echo -n "Starting $DESC: $NAME "
    start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
    --chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
    echo "."
    fi
    ;;
    stop)
    echo -n "Stopping $DESC: $NAME "
    start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \
    --chuid $USER --exec $DAEMON -- $ARGS
    test -e $RUNDIR/$NAME.pid && rm $RUNDIR/$NAME.pid
    echo "."
    ;;
    restart|force-reload)
    echo -n "Restarting $DESC: $NAME "
    start-stop-daemon --stop --oknodo --pidfile $RUNDIR/$NAME.pid \
    		 --chuid $USER --exec $DAEMON -- $ARGS
    echo "."
    sleep 3
     test -f /etc/default/locale && . /etc/default/locale || true
    start-stop-daemon --start --pidfile $RUNDIR/$NAME.pid \
    --chuid $USER --nicelevel $NICE --exec $DAEMON -- $ARGS
    echo "."
    ;;
    reload)
    start-stop-daemon --stop --oknodo --signal HUP --pidfile \
    $RUNDIR/$NAME.pid --chuid $USER --exec $DAEMON -- $ARGS
    echo "."
    ;;
    *)
    N=/etc/init.d/$NAME
    echo "Usage: $N {start|stop|restart|force-reload}" >&2
    exit 1
    ;;
    esac
    
    exit 0
    

     

    Nu uitvoerbaar maken, update-rc.d is niet nodig, MythTV zal worden aangeroepen vanuit het SASC-NG opstart bestand.

     

    chmod 755 /etc/init.d/mythtv-backend
    

     

    MythTV Logrotatie

     

    TODO: Logrotatie

     

    Mythweb

     

    Mythweb zal bereikbaar zijn op:

    http://adres-van-je-server/mythweb

     

    cd /var/www
    
    rm -rf mythweb
    
    git clone -b fixes/0.26 https://github.com/MythTV/mythweb.git && cd mythweb
    
    chown www-data.www-data -R data
    
    chmod 775 data
    
    a2enmod rewrite
    a2enmod env
    a2enmod deflate
    a2enmod headers
    a2enmod auth_digest
    
    service apache2 restart
    

     

    Mythweb Systeem Configuratie

     

    nano /etc/apache2/conf.d/mythweb.conf
    

     

    #
    # Apache configuration directives for MythWeb. Please read INSTALL for setup
    # requirements and troubleshooting, along with the comments in this file.
    #
    ############################################################################
    # If you intend to use authentication for MythWeb (see below), you will
    # probably also want to uncomment the following rules, which disable
    # authentication for MythWeb's download URLs so you can properly stream
    # to media players that don't work with authenticated servers.
    #
    # <LocationMatch .*/pl/stream/[0-9]+/[0-9]+>
    #	 Allow from all
    # </LocationMatch>
    #
    # <LocationMatch .*/music/stream.php>
    #	 Allow from all
    # </LocationMatch>
    
    #
    # CHANGE THESE PATHS TO MATCH YOUR MYTHWEB INSTALLATION DIRECTORY! e.g.
    #
    # /var/www
    # /home/www/htdocs
    # /var/www/html/mythweb
    # /srv/www/htdocs/mythweb
    #
    
    <Directory "/var/www/mythweb/data">
     Options -All +FollowSymLinks +IncludesNoExec
    </Directory>
    <Directory "/var/www/mythweb" >
    Options FollowSymLinks
    DirectoryIndex mythweb.php
    ############################################################################
    # I *strongly* urge you to turn on authentication for MythWeb. It is disabled
    # by default because it requires you to set up your own password file. Please
    # see the man page for htdigest and then configure the following four directives
    # to suit your authentication needs.
    #
    # AuthType		 Digest
    # AuthName		 "MythTV"
    # AuthUserFile	 /var/www/htdigest
    # Require		 valid-user
    # BrowserMatch	 "MSIE"	 AuthDigestEnableQueryStringHack=On
    # Order			 allow,deny
    # Satisfy		 any
    #
    # * If you're running Apache earlier than 2.2, you will need to use
    # the AuthDigestFile command instead of AuthUserFile (3rd line above).
    #
    ############################################################################
    # Some special instructions for the MythWeb controller files
    #
     <Files mythweb.*>
     #
     # Use the following environment settings to tell MythWeb where you want it to
     # look to connect to the database, the name of the database to connect to, and
     # the authentication info to use to connect. The defaults will usually work
     # fine unless you've changed mythtv's mysql.txt file, or are running MythWeb on
     # a different server from your main backend. Make sure you have mod_env enabled.
     #
    	 setenv db_server	 "localhost"
    	 setenv db_name		 "mythconverg"
    	 setenv db_login		 "mythtv"
    	 setenv db_password	 "mythtv"
     #
     # By default, MythWeb uses the hostname program to look up the hostname of the
     # machine it runs on. If this reports incorrect data, or you run MythWeb on a
     # machine without the hostname program, set this to your current hostname.
     #
     # setenv hostname		 "my_mythbox"
     #
     # By default, php will always search the current directory for include files,
     # but if you wish to install these directories outside of the current path
     # (eg. for security reasons), set this variable to the directory that
     # contains the directories like languages and templates. eg.
     #
     # setenv include_path	 "/usr/share/mythweb"
     # If you want MythWeb to email php/database errors (and a backtrace) to you,
     # uncomment and set the email address below.
     #
     # setenv error_email	 "mythweb_errors@example.com"
     #
     # If your local file system is something other than UTF-8, set this variable
     # so that the music and video portions of MythWeb can provide proper links
     # to your downloadable files.
     #
     # setenv fs_encoding	 "ISO-8859-1"
     </Files>
    ############################################################################
    # The following settings relate to PHP config.
    #
     <Files *.php>
     # These settings are intended for apache 2.x. If your version of apache
     # doesn't support php_value, or things like memory_limit aren't working
     # as expected, then use these settings as examples for your own php.ini
     # files.
    	 php_value safe_mode					 0
    	 php_value register_globals			 0
    	 php_value magic_quotes_gpc			 0
    	 php_value file_uploads				 0
    	 php_value allow_url_fopen			 On
    	 php_value zlib.output_handler		 Off
    	 php_value output_handler			 NULL
     # If you have a large number of channels, you may need to increase
     # this value to prevent PHP from running out of memory during
     # searches. The default is 64M.
    	 php_value memory_limit				 64M
    #		 php_value memory_limit				 128M
    #		 php_value memory_limit				 256M
    #		 php_value memory_limit				 512M
     # If you have a large number of channels, php may timeout creating
     # complex pages, so you will need to increase the amount of time
     # php has to create the page. The default is 30 seconds.
    	 php_value max_execution_time 30
    #		 php_value max_execution_time 60
    #		 php_value max_execution_time 120
     # Note: php_flag does not work in older versions of php
    	 php_flag output_handler				 "NULL"
     </Files>
    ############################################################################
    # The settings below relate specifically to mod_rewrite and the rewrite
    # engine used to make the MythWeb user experience a little easier to deal
    # with by simplifying the URLs needed to access the various sections. Do
    # not touch these settings unless you really know what you're doing..
    #
    # Turn on the rewrite engine
     RewriteEngine on
    # If MythWeb is installed outside of the document root (eg. using Alias) then
    # you will need to set this directive to the base URL that MythWeb is visible
    # from externally. If you do not, the web server will return 'not found'.
    # RewriteBase /mythweb
    # Skip out early if we've already been through rewrites,
    # or if this is a /css/, /js/ or /cache/ directory request.
     RewriteRule ^(css|data|images|js|themes|skins|README|INSTALL|[a-z_]+\.(php|pl))(/|$)	 -	 [L]
    # Redirect /pl/ requests to the perl cgi handler.
     RewriteRule	 ^(pl(/.*)?)$		 mythweb.pl/$1			 [QSA,L]
    # Redirect most of the remaining URL requests to the main mythweb script.
    # It will then handle any requests given to it.
     RewriteRule	 ^(.+)$				 mythweb.php/$1			 [QSA,L]
    # If you're experiencing trouble with the previous two lines in your copy of
    # apache, you could instead use something like:
    # RewriteRule	 ^(pl(/.*)?)$		 mythweb.pl?PATH_INFO=/$1 [L,QSA]
    # RewriteRule	 ^(.+)$				 mythweb.php?PATH_INFO=/$1 [L,QSA]
    # Catch anything else that comes through and send it to mythweb.php with no parameters.
     RewriteRule	 ^(.*)$				 mythweb.php				 [QSA,L]
    ############################################################################
    # You really shouldn't need to edit anything below this line, so please
    # don't unless you know what you're doing.
    #
    # Allow .htaccess to override whatever it wants from the server config.
     AllowOverride All
    # Allow browsers to follow symlinks that point outside of the web document
    # tree. This is how we access music, videos, etc.
     Options		 FollowSymLinks
    # MythTV now uses the correct file suffix for mpeg files, so all .nuv files
    # should actually be NuppleVideo. However, apache probably doesn't know what
    # those are, so we should tell it.
     AddType video/nuppelvideo .nuv
    # Specify the MIME type for favicon.ico in case the server configuration
    # doesn't or in case the server configuration uses the IANA-approved MIME type
    # (image/vnd.microsoft.icon)--which most browsers won't recognize.
     AddType image/x-icon	 .ico
    # Enable mod_deflate. This works MUCH more reliably than PHP's built-in
    # gzip/Zlib compressors. It is disabled here because many distros seem not
    # to enable mod_deflate by default, but I strongly recommend that you
    # enable this section.
    #
    # BrowserMatch ^Mozilla/4 gzip-only-text/html
    # BrowserMatch ^Mozilla/4\.0[678] no-gzip
    # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    #
    # AddOutputFilterByType DEFLATE text/html
    # AddOutputFilterByType DEFLATE text/css
    # AddOutputFilterByType DEFLATE application/x-javascript
    # This is helpful for mod_deflate -- it prevents proxies from changing
    # the user agent to/from this server, which can prevent compression from
    # being enabled. It is disabled here because many distros seem not to
    # enable mod_headers by default, but I recommend that you enable it.
    #
    # Header append Vary User-Agent env=!dont-vary
    # Set up the perl handler so we can stream properly. Do not use mod_perl
    # because it has a tendency to hold onto child processes, which causes
    # problems if the browser closes on an in-progress stream.
    #
     <Files *.pl>
    	 SetHandler cgi-script
    	 Options +ExecCGI
     </Files>
    </Directory>
    

     

    service apache2 restart
    

     

    Mythtv Setup uitvoeren

     

    Nu je machine er klaar voor is, moet je nog 'mythtv-setup' uitvoeren.

     

    Als je een desktop omgeving hebt geinstalleerd, dan kun je dit rechtstreeks op je server uitvoeren.

     

    Als je dat niet hebt gedaan, dan heb je een bestandje nodig om via ssh mythtv-setup te kunnen uitvoeren.

     

    N.B.: Nu eerst /etc/init.d/sascd configureren !

     

    Het benodigde bestandje:

     

    mkdir /etc/X11/xinit
    
    echo "#!/bin/sh" > /etc/X11/xinit/xserverrc
    
    echo "exec /usr/bin/X -nolisten tcp "$@"" >> /etc/X11/xinit/xserverrc
    

     

    Vervolgens:

     

    /etc/init.d/sascd start
    

     

    Hij gaat hangen omdat mythtv-setup nog niet is uitgevoerd, dus beeindig met Ctrl+c

     

    mythtv heeft nog geen password en dat is wel nodig voor de volgende stap.

     

    passwd mythtv
    

     

    Nu uitloggen en inloggen:

     

    ssh -Y mythtv@<ip-adres-van-je-server>
    

     

    en mythtv-setup uitvoeren:

     

    mythtv-setup
    

×
×
  • Nieuwe aanmaken...