Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9

Hybrid View

  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    21

    Start MusicIP at boot on Ubuntu

    I've installed MusicIP on my Ubuntu 9.04 Squeezecenter system following the instructions in the wiki. Everything works fine except for the fact that MusicIP won't start on boot. For instance, if after boot I check port 10002, there is nothing there. If I enter "/etc/init.d/mmserver start" and then point my browser to 10002, I get the MusicIP interface. And then if I restart squeezecenter, everything works fine. But without entering the start command, MusicIP won't start at all. It's not even the case that the server is running but SC doesn't recognize it; it just won't start (and I've used BUM to change the start order, but again, it is a matter of not starting at all).

    I think the problem might be related to the fact that starting mmserver requires a password. For instance, if I enter "/etc/init.d/mmserver start" (notice I don't enter sudo) it still asks for a password. I'm wondering whether (a) this is normal behavior (b) if not, is this what is preventing mmserver from starting correctly at boot and (c) how to fix this (whether the password is causing the problem or not).

    Any advice would be appreciated, as the MusicIP/SC system works great otherwise.

  2. #2
    Hi there - I don't know if this is the solution to your problem or not..but when I upgraded from 8.10 to 9.04 my mmserver script, which was pretty much the one from here (and the default that came with MusicIP):

    http://wiki.slimdevices.com/index.ph..._SqueezeCenter

    stopped working, and had the same behavior that you describe.


    To make it work I found a solution on the MusicIP forums...but looks like they are dead now.

    Essentially, I had to place a "nohup" in front of both "su"'s.

    so that it looks like:

    Code:
    #! /bin/sh
    # NON-PRIVIELEGED USER TO RUN MUSICMAGICSERVER.
    USER=
    # PATH TO THE MUSICMAGICMIXERSERVER 
    export MUSICHOME=
    case $1 in
        start)
            nohup su - $USER -c $MUSICHOME"MusicMagicServer start  & > /dev/null" 
            echo "Running MusicMagicServer"
            exit
            ;;
        stop)
            nohup su - $USER -c $MUSICHOME"MusicMagicServer stop  & > /dev/null" 
            echo "Stopped MusicMagicServer"
            exit
            ;;
        *)
            echo "Usage: /etc/rc.d/init.d/mmserver { start | stop }"
            exit
            ;;
    esac
    then everything magically worked.
    Obviously you still need to configure your USER and MUSICHOME (like it says in the wiki..) -- but I'm guessing you already got that far.

    hope this helps!
    -arm
    PS: anyone know what's up with MusicIP? I love (and bought!) the Mixer...hoping not to see it disappear!

  3. #3
    Junior Member
    Join Date
    Aug 2008
    Posts
    21
    Thanks for the suggestion. I tried it, but it didn't work. After running the /etc/init.d/mmserver start command, it didn't ask for a password. Instead I got:

    nohup: ignoring input and appending output to '/home/<my username>/nohup.out'

    The server was not started.

    I looked in nohup.out and there was just one line that said "su: must be run from a terminal"

    As for MusicIP itself, I think they might be dead. Before the forums disappeared, there was a thread about how they hadn't been updating things in a while and how the main developer had left. If I remember correctly, they may have sold the tech to some other company, which may or may not develop it.

  4. #4
    Senior Member
    Join Date
    Mar 2008
    Location
    Netherlands
    Posts
    752
    i'm running debian, which is quite identical to ubuntu and i solved this issue by adding a line to the /etc/rc.local file. the line is:

    /etc/init.d/mmserver start

    if you don't have this file on your system you can create one, mine looks like:

    #!/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.

    /etc/init.d/mmserver start

    exit 0

  5. #5
    Junior Member
    Join Date
    Aug 2008
    Posts
    21
    Thanks, I'll try that, though I'm thinking that it might not solve the problem. Even just running "/etc/init.d/mmserver start" from the command line asks for a password, but I think it should not (though anyone who knows better than I do, please correct me if I'm wrong). So I think that if I could get the script to run without asking for the password, it would run at startup as I have it set up. But thanks for the suggestion, I'll give it a try.

  6. #6
    that just jogged my memory, hopefully in a good way :-)

    In your current Ubuntu setup, can you actually run the "su" command from the command line and login as root? I remember when I first set up my ubuntu box they had disabled root logins through "su" and expected "sudo" instead. I re-enabled root logins like this:

    http://www.debianadmin.com/enable-an...-password.html

    For what it's worth, if I "su" to root and run /etc/init.d/mmserver start, it does NOT ask me for a password. It DOES say "nohup: ignoring input and appending output to `nohup.out'", though...but it starts the mmserver just fine. Trying it as a non-privileged user, however, fails to start it.

    -arm

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •