Accessing upnp server from ubuntu

I have a mediatomb server running on my desktop and use it to stream content to my ps3.

As I’ve got my laptop back today, I thought it would be useful if I could also connect to it from my laptop.

This task seemed not so trivial as I thought.

For some reason I was in the illusion that I could easily connect to it using either vlc for videos and any audio player for music.

That wasn’t the case.

Rhythmbox has a upnp plugin but you’ll have to install some lib’s from the repo and even then I couldn’t use it.

I could connect to the server using firefox (entering the address for the server), but that’s isn’t very useful.

The only decent option available for ubuntu is to mount the server as drive.

This can be done with a program called djmount and needs the fuse package to work.

I found a website that cleary stated the steps to do, but there where a few steps missing.

I’ll just “steal” the steps from there and add the ones that were missing.

note: all commands should be entered in the terminal. The terminal can be accessed from “applications -> accessories”.

If you want to copy/paste the code, press the “plain view” link for each code.

1. install build-essential

sudo apt-get install build-essential

2. install fuse

sudo apt-get install libfuse-dev

3. install dj mount

tar -zxvf djmount-0.71.tar.gz
cd djmount-0.71
sudo make install 

4. make a mount point in /media

cd /media
sudo mkdir upnp
sudo chmod 777 upnp

change upnp to the name you want to give the drive

5. load fuse and mount the filesystem

sudo modprobe fuse
sudo djmount -o allow_other /media/upnp

6. load fuse and mount the filesystem when you start the pc

Must be done with a little script.

7.  optional

Drag the folder(s) you often use to the side bar in nautilus so they show up under “places”.

  1. Thanks for your excellent copy/paste guide. Unfortunatly, the step 6 (autostarting) doesn’t work, at least under Ubuntu 8.04.

    Apparently, djmount must be run as root and ‘Sessions’ quotes the && markup.

    After some trial and error I could make djmount autostartup. The magic relies in setting the setuid bit and using a script to force the sleep.

    Feel free to update your post if relevant:

    Hopefully, there will be a debian package some day…

    • linuxowns
    • June 11th, 2008


    I noticed it didn’t work, I was thinking of putting a little script together but didn’t came around to it.

    I’ll use yours.

  2. Excellent guide. Thanks very much. I slightly modified it to create a debian package.
    In step 3 I used ‘checkinstall’ in stead of ‘sudo make install’. It will fail to install but gives you a easy to install ( and remove ) debian package.
    Also I put the ‘fuse’ module to automatically load by putting it in the /etc/modules file.
    I even took the tip from
    to put ‘djmount /media/UPnP fuse ro,allow_other 0 0’ in /etc/fstab

    So no script is needed.

  3. I noticed that the mountpoint didn’t get mounted after restarting so I wrote this patch.

    --- mountall-net-fs~ 2008-07-06 18:11:48.773790438 +0200
    +++ mountall-net-fs 2008-07-06 16:28:21.567909064 +0200
    @@ -75,6 +75,12 @@
    + fuse)
    + if [ "$DEV" = "djmount" ]
    + then
    + FSTYPE="fuse"
    + fi
    + ;;
    @@ -107,7 +113,7 @@
    if [ "$NETFS" ]
    - mount -a -t$NETFS
    + mount -a -t$NETFS

    This will patch /lib/init/mountall-net-fs and only mounts it when the device is of type djmount.

    Hope this helps.

    • linuxowns
    • July 6th, 2008


    I don’t actually use the upnp server on my laptop anymore (ssh is easier), but it might come in handy for other users.

    • Michael
    • July 20th, 2008

    Great Posting!
    I always hesitated to mount my upnp server with fuse and waited for a upnp client. Your guide showed me how easy it can be (under Ubuntu), and in fact, it worked like a charm.
    Thanks again!

    • linuxowns
    • July 20th, 2008

    No problem.

    • Mamir
    • October 28th, 2008

    Thanx alot for the post…I have installed djmount in my ubuntu pc but i am facing a problem that is my media server (mediatomb) is detected but for a short time and some times it play the file and some times it display the error that the file location has been changed or the file is deleted….(media server still running). It appears again after some time but again with limited life period…….
    thanx for ur consideration

    • linuxowns
    • October 28th, 2008

    If you are looking to stream media from and to ubuntu pc’s, setting up ssh is a lot easier.

    I have a guide on that too.

    I can’t help you with your problem, try asking in the djmount, mediatomb or ubuntu forums.

    • how about a link to your ssh for streaming media. i’m interested in checking out your method.

    • Darwin Survivor
    • March 15th, 2009

    I’m having a weird problem. When I mount the upnp server, it shows the two server (my home server and the test one on my laptop), but none of the shared items show up inside.
    When I run “sudo modprobe fuse” I get no output (assuming success)
    When I run “sudo djmount -o allow_other /media/upnp”, I get:
    ***output start***[I] Mount options = allow_other
    [I] Charset : successfully initialised charset=’UTF-8′
    ***output end***
    in blue text. (assuming success).

    The upnp folder has a .debug folder with stuff and a .status file inside each server’s directory. Unfortunately none of the files nor their respective folders show up.

    My upnp server (fuppes) is perfectly accessible using my PS3, so I know it’s not to blame.

    Any ideas?

    • Paul Campbell
    • April 28th, 2009

    I am getting the same problem, minus the .debug and .status folder.

    I followed all the instructions to a T, and I can see the folder which represents the connection Tversity. Tversity admits there is a connection from my machine to it. Yet all the shared folders (music,video, etc) are not show. They are all shown in my PS3.

    All details on my problem are exactly like the above comment. Grrr

    • Tyler
    • July 26th, 2009

    I followed these instructions and they worked fine except for two problems. When I opened my upnp folder it had subfolders for various media but nothing there, and it didn’t have any of the directories I normally see when I go in via samba. Secondly, on reboot, I can’t get fuse to run. when I type ‘modprobe fuse’ it responds with ‘FATAL: Module fuse not found.’. I’ve tried to remove it with synaptic and re-add it to no avail.
    I’m very new to ubuntu, so basic instructions would be appreciated – but I could really use any advice at all.

    • Pobman
    • December 28th, 2009

    Great post, worked first time on crunchbang 8.10

    I wanted to mention that this allows me to test my upnp server from my laptop which is far easier for testing than having to power up my ps3 to check content such as iso’s, mkv, m2ts and vobs etc which can be tricky in MediaTomb to configure.

    Well done!

  1. July 4th, 2008
    Trackback from : upnp
  2. July 14th, 2008
  3. November 3rd, 2008
  4. November 26th, 2008

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: