LinuxMCE Forums

General => Users => Topic started by: cesarscav on December 12, 2008, 04:25:21 PM

Title: Squeezeslave on MD
Post by: cesarscav on December 12, 2008, 04:25:21 PM
I was following this http://wiki.linuxmce.org/index.php/Squeezeslave_on_the_core (http://wiki.linuxmce.org/index.php/Squeezeslave_on_the_core) How to set up Squeezeslave on core
I'm wondering if it is possible to set up the second sound card on a DiskLess MD? (I'dont have more pci slots on m core but I have some in the Diskless MD.
If this is possible what should I change?

Thanks

Cesar
Title: Re: Squeezeslave on MD
Post by: eNoodle on December 12, 2008, 06:32:37 PM
Hi Cesar,

this HowTo is also working for MDs, just perform the steps on a MD and you're done. I had some problems with the amd64 version of squeezeslave, so I'm currently using squeezeslave-0.8-20-lnx26-alsa-i686. If you start squeezeslave from commandline, you will also see all supported audio devices. Best is to play with it from commandline and try to find the correct settings, when done adjust the start/stop script and it should work.

BTW, in some cases it is possible to have two or more squeezeslaves running using one soundcard (first output goes to front, second to rear, etc.). I have one soundcard which is used as main ouput using the digital output, and the analog front output is used for one squeezeslave. ;)

eNoodle
Title: Re: Squeezeslave on MD
Post by: cesarscav on December 12, 2008, 07:45:25 PM
Great!

I'll try it this week end.
I'll keep posting my results

Thanks a lot.


Cesar
Title: Re: Squeezeslave on MD
Post by: cesarscav on December 16, 2008, 05:32:27 PM
I'm a litlle stuck here I canot use sudo on the MD linuxmce password dont work in there.
is there an other password?
also I tried this
Quote
At your core do the following;

chroot /usr/pluto/diskless/NN passwd (****where NN is the moon device ID of the MD you want to change***)

The use the following line to ssh into the MD... where NN is the device ID entered above;

ssh root@moonNN

Now you should be logged in as root ont eh MD and you can do whatever you need to :-)
and it didnt work.
I get linuxmce@dcerouter:/usr/local/bin$ sudo chroot /usr/pluto/diskless/68 passwd
[sudo] password for linuxmce:
chroot: cannot run command `passwd': Exec format error


Any idea

Thanks

Cesar
Title: Re: Squeezeslave on MD
Post by: tschak909 on December 16, 2008, 05:34:44 PM
/me is completely confused as to why the hell you would do this?

*shake-head*

-Thom
Title: Re: Squeezeslave on MD
Post by: cesarscav on December 16, 2008, 05:40:23 PM
I want to set up Squeezeslave on MD
I'm following this http://wiki.linuxmce.org/index.php/Squeezeslave_on_the_core (http://wiki.linuxmce.org/index.php/Squeezeslave_on_the_core)
eNoodle
said
Quotethis HowTo is also working for MDs, just perform the steps on a MD and you're done.

I need to copy the Squeezeslave file to /usr/local/bin and I need sudo to do this.
also to edit the /etc/rc.local
I'm getting this wrong?

Thanks
Cesar


Title: Re: Squeezeslave on MD
Post by: tschak909 on December 16, 2008, 05:46:01 PM
but _WHY_ ?!

-Thom
Title: Re: Squeezeslave on MD
Post by: cesarscav on December 16, 2008, 05:55:48 PM
I don't have more pci slots on my core to put an extra sound card and I have all free on my DL MD that is why I intended to add the Squeezeslave on the MD.

Cesar


Title: Re: Squeezeslave on MD
Post by: cesarscav on December 16, 2008, 06:19:27 PM
 I found a way to log in as root on MD It was on the wiki.
I'll keep posting my results.
thanks for your time

Cesar
Title: Re: Squeezeslave on MD
Post by: cesarscav on December 16, 2008, 08:40:55 PM
Finally I tried and it didn't work

I followed this http://wiki.linuxmce.org/index.php/Squeezeslave_on_the_core (http://wiki.linuxmce.org/index.php/Squeezeslave_on_the_core)
but not in the core in the MD

I log in as root on moon68
Downloaded the file extracted an copy it to /usr/local/bin

then I edited /etc/rc.local
it looks like this

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#/usr/local/bin/squeezeslave -m 00:00:00:00:00:01 -o 0 -s -r &
/usr/local/bin/squeezeslave -m 00:00:00:00:00:02 -o 1 -s -r &

exit 0

#/usr/local/bin/squeezeslave -m 00:00:00:00:00:01 -o 0 -s -r &
I commented this line because I have only one extra sound card the /dev/dsp1 is the one I want to use on the squeezeslave (it is a realtek)
Checked alsamixer to see if something was mute (noting was, so I just exited)
Went to webadmin added SqueezeBox Player on the room that I want this (the MD is on Master bedroom I selected Bedroom Other)

Created the file /etc/init.d/squeezeslave

Paste the script Make it executable
Modified the /etc/init.d/squeezeslave
it looks like this
#! /bin/sh
### BEGIN INIT INFO
# Provides:          squeezeslave
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: Initscript for squeezeslave
# Description:       This init script make it possible to start squeezeslave as a daemon
#                    It is placed in /etc/init.d.
### END INIT INFO

# Author: Magnus Nilsson <magnus@karabas.nu>
#


# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="Squeezeslave dameon"
NAME=squeezeslave-alsa
DAEMON=/usr/local/bin/squeezeslave-0.8-20/$NAME
DAEMON_ARGS="-o 1 -m 00:00:00:00:00:02 -r -s 192.168.80.1"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

This is just the beginning part
in this line DAEMON_ARGS="-o 1 -m 00:00:00:00:00:02 -r -s 192.168.80.3" Should I use the IP of the core or the MD?

When I execute this sudo default-rd.d /etc/init.d/squeezeslave default 50
it gave me an error
root@moon68:~# sudo default-rd.d /etc/init.d/squeezeslave default 50
sudo: default-rd.d: command not found
root@moon68:~#

Maybe I'm Doing something wrong here...
All other steps went good
If I Check with ps if squeezeslave  is running after reboot
I get this
root     30459  0.0  0.0   3904   592 pts/12   R+   14:36   0:00 grep squeezeslave
Any Ideas?

Thanks

Cesar


Title: Re: Squeezeslave on MD
Post by: tschak909 on December 16, 2008, 08:48:14 PM
default-rd.d should be default-rc.d

-Thom
Title: Re: Squeezeslave on MD
Post by: cesarscav on December 16, 2008, 09:03:31 PM
Same error
root@moon68:~# sudo default-rc.d /etc/init.d/squeezeslave default 50
-bash: default-rc.d: command not found
root@moon68:~#


Cesar
Title: Re: Squeezeslave on MD
Post by: Zaerc on December 17, 2008, 02:07:22 AM
Odd, I wonder where that command comes from, anyway try ln -s ../init.d/squeezeslave /etc/rc2.d/S50squeezeslave instead.  That should do just about the same thing.
Title: Re: Squeezeslave on MD
Post by: bulek on December 17, 2008, 08:05:25 AM
FYI,

I'm also spotting problems when auto starting squeezeslave, but didn't yet discover how to debug what is going on. It works ok, once it's started manually after boot...

Regards,

Bulek.
Title: Re: Squeezeslave on MD
Post by: sp00nhead on December 17, 2008, 11:41:56 AM
i used sudo update-rc.d <name> default to add the squeezeslave to my startup. not rebooted my bot in a while so cant say if works :)
Title: Re: Squeezeslave on MD
Post by: cesarscav on December 17, 2008, 05:44:24 PM
The command ln -s ../init.d/squeezeslave /etc/rc2.d/S50squeezeslave Worked, But I'm still unable to get it working.
Does some one had this working on a DL MD?

I have the impression that something is wrong here:

/etc/init.d/squeezeslave

#! /bin/sh
### BEGIN INIT INFO
# Provides:          squeezeslave
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      S 0 1 6
# Short-Description: Initscript for squeezeslave
# Description:       This init script make it possible to start squeezeslave as a daemon
#                    It is placed in /etc/init.d.
### END INIT INFO

# Author: Magnus Nilsson <magnus@karabas.nu>
#


# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="Squeezeslave dameon"
[glow=red,2,300]NAME=squeezeslave-alsa
DAEMON=/usr/local/bin/squeezeslave-0.8-20/$NAME
DAEMON_ARGS="-o 1 -m 00:00:00:00:00:02 -r -s 192.168.80.1"[/glow]
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME


Should I use the the IP of the core or the MDs

On the webadmin when you add a SqueezeBox Player what parameter should I use on Mac (I think is 00:00:00:00:00:02) IP Should be the MDs ? Is something else to use there.

Any idea?

Thanks

Cesar
Title: Re: Squeezeslave on MD
Post by: eNoodle on December 18, 2008, 11:42:16 AM
Hi Cesar,

you have to use the IP of the core (-s = server). You can define the MAC address for sueezeslave using "-m", you can use whatever you want, best is, if you start with 00:00:00:00:00:01 and increase this MAC address for every other squeezeslave. To use this player within LMCE add this as described in the wiki and use the MAC address you have used for the daemon. I don't know the url right now, but you can connect to slimserver on your dcerouter using a browser. If your squeezeslave has connected successfully you should see it in the "player" section. From within this section you should see if your squeezeslave is running, what is playing, etc.

eNoodle