Install oddities under Ubuntu 11.04

Help
GRO
2011-05-27
2013-05-30
  • GRO

    GRO - 2011-05-27

    Hi all,

    I'm having a few troubles getting MediaTomb running under Ubuntu 11.04 and in my attempts to fix it have put myself in a tangle.

    After an initial installation of MediaTomb I clicked on the MediaTomb icon that had been placed in the launcher which gave me a 'UI disabled: see your config file' error (even after making sure UI was set to 'yes' in the config file).

    I unistalled MediaTomb, made sure I had all the dependencies installed (done through synaptic) and reinstalled MediaTomb through the Software Centre.

    I tried to open MediaTomb using the icon (which was not placed in the launcher on this install) that was in my dash. Doing that gave me the error;

    "can't find /var/lib/mediatomb/mediatomb.html"

    I then ran mediatomb from terminal and attempted to open using the icon instead of copying and pasting the link from terminal…same error.

    I then copied and pasted the address into a browser, things were looking up, I saw the UI and added media to the database, so easy.

    I was able to find Mediatomb using a UPnP client on the network but could not see any of the directories

    I thought this may have meant that MediaTomb had stopped running

    I thought I'd try stopping the service by running /etc/init.d/mediatomb stop

    But was told the service was not running

    I then tried starting the service by running /etc/init.d/mediatomb start which failed.

    so I ran mediatomb from console again which gave me a new address.

    I opened this in a new browser and found that the media I had added wasn't on the database view. I then realised that I'd started a new server.

    Going back to the initial address I confirmed that media had been added to the original database. I checked the UPnP client again, which could see the server but none of the directories.

    I thought I tried a restart of the PC that was running the server but on entering the previous addresses asked me for a username and password, using the default one I could find in config.xml didn't do anything.

    I've now acccepted I have no idea wtf is going on. and need to learn more about setting it up and how to correctly run it.

    I've uninstalled MediaTomb again, run remove -purge mediatomb and deleted every file I could find that had the word mediatomb in it and am going to start from scratch.

    Before I do I wanted to make sure I'm going about things the right way and actually understand what I'm doing this time around.

    Is it ok to install MediaTomb from Software Centre, if so what's the deal with the icon that is (or isn't installed in the launcher) do I need to run mediatomb from terminal before it will work?

    The weird thing is that on the first installation launching MediaTomb using the icon generated the config.xml file that is created on first run. That didn't happen the second time.

    So I run mediatomb from terminal using mediatomb, is this the correct and only way needed to start mediatomb and do ignore the fact that running /etc/init.d/mediatomb start gave me a fail?

    With default installation settings will MediaTomb start on each boot of the PC? Or do I need to run mediatomb from terminal

    I'm little confused about daemon mode, when should I use this?

    Big thanks for making it through this wall of text, I'll greatly appreciate any assistance with getting this rectified and returning to sanity.

     
  • BT

    BT - 2011-05-27

    You did get yourself in a bit of a mess. :)

    Before you re-install make sure the '/etc/mediatomb' and '/var/lib/mediatomb' directories have been removed. You can also delete the '/etc/default/mediatomb' files if it exists. You should also end any MediaTomb processes that might be running with 'killall -9 mediatomb'.

    You can now install MediaTomb. It doesn't matter if you use the Software Center, Synaptic or the command line. Once installed, the daemon should start automatically. You can check by running 'ps aux | grep mediatomb' in a terminal. If it hasn't started make sure you have 'NO_START="no"' in '/etc/default/mediatomb' and then run '/etc/init.d/mediatomb restart'. If it still doesn't start, check '/var/log/mediatomb' for any errors.

    In daemon mode, MediaTomb is started in the background during boot as the 'mediatomb' user. This is the optimal way since MediaTomb will be started automatically every time you start your computer. When running MediaTomb this way, it will use the config.xml file in '/etc/mediatomb'.

    The alternative is to start MediaTomb manually as your user in a terminal, every time you log in. When running MediaTomb this way, it will use the config.xml file in '~/.mediatomb'. If you decide to run MediaTomb this way, you need to make sure that you have 'NO_START="yes"' in '/etc/default/mediatomb' to prevent the daemon from starting.

    It is very important that you edit the correct config.xml file, as this is the cause of many problems.

    With regard to the icon that appears in the menu, this should just point to '/var/lib/mediatomb/mediatomb.html'. This file is updated with the current ip and port when the daemon starts. It's possible for MediaTomb to use a different port or even ip, especially when restarting the daemon.

    This happens because the system hasn't released the currently used port in time, so MediaTomb selects the next available one. If your not aware that MediaTomb has changed ports, you will most likely be greeted with the MediaTomb log in page. The ip address can also change if you have multiple interfaces as MediaTomb just selects the first available one. Most users will only have one, so this is a problem that doesn't happen often.

    To avoid this, I set a static ip and port for MediaTomb to use. You can do this by adding '-ip <address> -port 49152' to the 'OPTIONS' variable in '/etc/mediatomb/default'. Then load of the MediaTomb interface url 'http://<address>:49152' and bookmark it. If you use DHCP then setting a static ip might not always work. In that case just set the port value.

    Hope this helps and that I didn't confuse you even further. :)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks