You are here: Home » Topic » mt-daapd Automatic Startup Upon Ubuntu Startup [solved]

mt-daapd Automatic Startup Upon Ubuntu Startup [solved]

FireFly Media Server (formerly mt-daapd) Firefly Media Server Forums Firefly Media Server Setup Issues mt-daapd Automatic Startup Upon Ubuntu Startup [solved]

This topic contains 28 replies, has 3 voices, and was last updated by  onedotseven 12 years, 4 months ago.

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #998

    onedotseven
    Participant

    Hello,

    First I’m sorry if this has been already answered or if it’s a dumb question. I’m a newbie and couldn’t find an answer (or at least an easy one).

    I installed Firefly on my Ubuntu system. I think this was successful: if I type mt-daapd in a terminal session, Firefly starts up and I can then access my music collection in Rhythmbox, Banshee and even in iTunes on a Windows computer on the same network.

    Now I would love to not have to start Firefly with a command line every time I log in my computer… Is there a way for mt-daapd to be automatically launch upon Ubuntu start-up? I checked into the Services Startup options, but couldn’t find anything.

    Thanks for your help 🙂

    Oh, and thanks for such a great software! Next step will be to buy a shiny new SoundBridge 🙂

    #8501

    rpedde
    Participant

    @onedotseven wrote:

    I installed Firefly on my Ubuntu system. I think this was successful: if I type mt-daapd in a terminal session, Firefly starts up and I can then access my music collection in Rhythmbox, Banshee and even in iTunes on a Windows computer on the same network.

    How did you install it, from a tarball, or a package.

    If there is a file called “/etc/init.d/mt-daapd”, then you already have a startup script. As root, running “/etc/init.d/mt-daapd start” should start the server, and “/etc/init.d/mt-daapd stop” should stop the server.

    If so, then you can just do something like:


    [email protected]:~$ sudo update-rc.d mt-daapd defaults

    … or I should say, that’s how one would do it on debian. I can only assume it’s the same with ubuntu.

    If you don’t have a /etc/init.d/mt-daapd, then try saving this file as “mt-daapd” in /etc/init.d, and use the “update-rc.d” command above.

    That shold get you blindly running.

    For more info on how the startup system works, you can read here:

    http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit

    — Ron

    #8502

    onedotseven
    Participant

    Ron,

    Thank you for taking the time to help me.

    I installed Firefly (SVN 1463) from a Tarball. I should also have said that I use Ubuntu 6.10.

    So, I tried this command

    [email protected]:~$ sudo update-rc.d mt-daapd defaults

    It seemed to work (the output was “added to startup script” or something like that). I restarted Ubuntu but mt-daapd didn’t start automatically. And now, if I start it in the terminal, it doesn’t work either (I get no error message).

    Edit: I un-installed completely Firefly (including configuration files), re-installed and entered the same command: mt-daapd doesn’t automatically start upon Ubuntu startup, but can be started manually.

    I didn’t find any error or anything related to mt-daapd in the logs (but I’m really not an expert) and if I enter once again the command, it outputs: “System startup links for /etc/init.d/mt-daapd already exist.”

    Any ideas? 😕

    #8503

    rpedde
    Participant

    @onedotseven wrote:

    So, I tried this command

    [email protected]:~$ sudo update-rc.d mt-daapd defaults

    Is there actually a file in /etc/init.d called “mt-daapd”?

    If not, copy the file linked above as /etc/init.d/mt-daapd.

    That should probably do it.

    — Ron

    #8504

    fizze
    Participant

    I installed the latest mt-daapd on ubuntu too, and there seems to be some problem with the (new) startup stuff in 6.10. Its not System V anymore, but something different.

    Just blatantly edit /etc/rc.local and add the call to /etc/init.d/mt-daapd start to that file.

    There seems to be an issue with some packages that wont totally work under 6.10. avahi-daemon for instance, refuses to start for me. I do the same rc.local trick/hack/cheat, which works.

    #8505

    rpedde
    Participant

    @fizze wrote:

    I installed the latest mt-daapd on ubuntu too, and there seems to be some problem with the (new) startup stuff in 6.10. Its not System V anymore, but something different.

    Wow. I hadn’t noticed that. It uses upstart rather than sysvinit. Neat.

    I might have to play with that, as upstart looks pretty neat.

    – Ron

    #8506

    onedotseven
    Participant

    Is there actually a file in /etc/init.d called “mt-daapd”?

    Yes Ron, I have this file.

    Just blatantly edit /etc/rc.local and add the call to /etc/init.d/mt-daapd start to that file.

    I will try that as soon as I’m back home and will let you guys know.

    Thanks so much for the help!

    #8507

    onedotseven
    Participant

    OK, I tried that, with not much success unfortunately… 🙁

    Checking the log, the daemon seems to fire up. But I cannot see Firefly’s share in Rhythmbox or in Avahi Zeroconf Browser.

    Strange thing: I can access the web admin. It tells me that mt-daapd is running, but this isn’t the case for the “Bonjour Daemon”.

    When I try to start Firefly from the terminal, it crashes:

    mt-daapd[5142]: Rendezvous socket closed (daap server crashed?) Aborting.
    #8508

    rpedde
    Participant

    @onedotseven wrote:

    OK, I tried that, with not much success unfortunately… 🙁

    Checking the log, the daemon seems to fire up. But I cannot see Firefly’s share in Rhythmbox or in Avahi Zeroconf Browser.

    Strange thing: I can access the web admin. It tells me that mt-daapd is running, but this isn’t the case for the “Bonjour Daemon”.

    When I try to start Firefly from the terminal, it crashes:

    mt-daapd[5142]: Rendezvous socket closed (daap server crashed?) Aborting.

    When you compiled it, did you compile with “–enable-avahi”? That might help, as it uses avahi to announce itself. It might be that if you are running avahi it steps on the build-in mdns daemon.

    #8509

    onedotseven
    Participant

    OK, you’re going to start to hate me 🙂

    I did not compile with –enable-avahi. So I just tried, and I got this:


    checking for AVAHI_CFLAGS...
    checking for AVAHI_LIBS...
    configure: error: Package requirements ( avahi-client >= 0.6 ) were not met.
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively you may set the AVAHI_CFLAGS and AVAHI_LIBS environment variables
    to avoid the need to call pkg-config. See the pkg-config man page for
    more details.

    And that’s over my understanding. I’m really new to Linux, but I feel that this is more a Linux issue than Firefly issue. So I apologize for that, and I’m really thankful if you are still up to help me.

    (I don’t want to troll, but the installation was much easier on Windows :P)

    #8510

    rpedde
    Participant

    @onedotseven wrote:

    OK, you’re going to start to hate me 🙂

    I did not compile with –enable-avahi. So I just tried, and I got this:


    checking for AVAHI_CFLAGS...
    checking for AVAHI_LIBS...
    configure: error: Package requirements ( avahi-client >= 0.6 ) were not met.
    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively you may set the AVAHI_CFLAGS and AVAHI_LIBS environment variables
    to avoid the need to call pkg-config. See the pkg-config man page for
    more details.

    And that’s over my understanding. I’m really new to Linux, but I feel that this is more a Linux issue than Firefly issue. So I apologize for that, and I’m really thankful if you are still up to help me.

    (I don’t want to troll, but the installation was much easier on Windows :P)

    Oops, you’ll probably want avahi-devel, or avahi libs… Once I get the nightlies settled out again, I’ll work on binaries for edgy.

    — Ron

    #8511

    fizze
    Participant

    well, banshee and rhythmbox need the avahi-daemon to be able to support DAAP (client/server, both).

    Also, when you install the avahi-daemon, you probably have to hack up /etc/rc.local and add “avahi-daemon -D”.

    its a dirty hack, but thats how i’ve gotten it to work in my ubuntu 6.10.

    Oh, and inspite any further issues you might get:
    Link /bin/sh to /bin/bash 😉

    #8512

    onedotseven
    Participant

    So… I re-compiled, re-installed.

    I used the SVN 1489 Tarball. I didn’t forget to include –enable-avahi. I made sure that I had avahi-devel… I added mt-daapd to rc.local, with avahi-daemon.

    Firefly seems to work and startup upon Ubuntu startup. Yay!

    But… I can’t access my music with Rhythmbox. The strangest thing is that I can access it with iTunes on my Windows machine.

    Link /bin/sh to /bin/bash

    That means that I change “/bin/sh -e” to “/bin/bash” on the first line of the rc.local, right?

    It’s never-ending 🙂 Any idea?

    #8513

    fizze
    Participant

    regarding /bin/sh, no.

    Just do a

    sudo rm /bin/sh
    sudo ln -s /bin/sh /bin/bash

    There were some changes made to Ubuntu 6.10, one of which changed the default shell from bash to dash. so some scripts stopped working. This can be VERY tricky. Dash is supposedly faster, but breaks compatibility.
    Some compile / make scripts for instance, just dont work without doing the above step. If you want to reverse it, just do

    sudo rm /bin/sh
    sudo ln -s /bin/sh /bin/dash

    anytime 😉

    Do you have music sharing enabled in Rhtythmbox?
    To see any daaap/iTunes shares, use the “Zeroconf Service Discovery” applet (if you run gnome, its deffo there). That will list all services, like iTunes servers, and so on. It also depends on avahi-daemon. So just make sure that daemon is running.

    #8514

    onedotseven
    Participant

    Yes I have sharing enabled in Rhythmbox, yes I see the daap service on in avahi browser, yes avahi-daemon is running.

    @fizze wrote:

    Just do a

    sudo rm /bin/sh
    sudo ln -s /bin/sh /bin/bash

    Well, now Ubuntu won’t start. Saying something like sh cannot be found. I’m going to do some research in Ubuntu Forums.

    Sounds like, so far, 6.10 did more bad than good… Since I was kind of messing around with this system, I haven’t any critical data to lose doing a format / re-install (if that is the only solution). If I have to do that, I’ll probably wait for the Edgy binaries for Firefly before trying again.

    Too bad that there’s no walkthrough installation doc available for 6.10 (like this guy did for 6.06). It seems that a lot changed in the latest version of Ubuntu, and this is affecting how Firefly is to be installed and how it works. Too bad, because Ubuntu seems to be a successful Linux distro.

    I’m learning, but it’s a painful process! 🙂

Viewing 15 posts - 1 through 15 (of 29 total)

The forum ‘Setup Issues’ is closed to new topics and replies.