Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: HOWTO: Read UPnP Media Server with another computer using djmount

  1. #1
    Join Date
    Oct 2007
    Location
    Gnosjö, Swe
    Beans
    517
    Distro
    Ubuntu

    HOWTO: Read UPnP Media Server with another computer using djmount

    djmount is a program that will mount a media server to your system just like any other file system. It's perfect for small laptops on which you can't store music but still want to be able to play media like movies, pictures and music from (that's the exact reason why I battled, learned and shared this with you).

    That means, if you have one computer with a fairly large hard drive with a lot of media, that computer can act as a media server (don't worry, It won't render your computer inoperable). That way, all other computers in the local area network can access this computers media files through your network.

    First of all you need a good media server. If you don't have any good media server, you can try MythTV or as I would reccommend: MediaTomb (installing instructions can be found here)

    Enough rambling for now, let's get going.

    1) Download and install FUSE
    FUSE is required by djmount to function properly. To be exact, djmount is actually built upon FUSE but with a simpler interface.

    Download FUSE from here. Extract FUSE to some convenient location like your home folder. Open a terminal and navigate to where you extracted your archive (if you extracted them in your home folder, no change is needed). Navigation is done via the command cd which means change directory. cd .. (cd space period period) will take you to a higher level in the folder tree and cd directoryname will take you to the folder named directoryname. For seeing which files and folders are contained in the current location, type ls.

    Type cd fuse-2.7.3 and hit enter (or if you have another version, swap "2.7.3" to that version). Type ./configure. You'll see a lot if text rolling up the terminal by now. If you get errors at this stage, see footnote 1). When that text is done (and hopefully without errors) type sudo make (and enter your password... don't worry about not seeing character representation like stars or dots, it's designed that way) and more text will run up the terminal. When that text is done rolling up the screen (again hopefully without errors), type sudo make install.

    If these procedures succeeded, you have now installed FUSE.

    2) Downloading and installing djmount
    djmount is the actual program that will mount your media server on to your local computer. That means that it will link a directory of your choice to the media server's index which make the folder look like it's full of media files even though they're on a different computer.

    Download djmount here. Now we need to repeat what we did with FUSE. Extract your archive to a convenient location. Navigate to that location through the terminal. Type cd djmount-0.71 (or if you have a different version, change 0-71 to that version). Type ./confiure. Wait until it is done and type sudo make. Now wait until it's done again and type sudo make install.

    You have now installed djmount

    3) Using djmount
    First start up your media server. Then go to the terminal. Type modprobe -l -t the-directory-you-want-to-have-your-mediaserver-in fuse. Then type djmount the-directory-you-want-to-have-your-mediaserver-in.

    DONE! You can now navigate to the-directory-you-want-to-have-your-media-in either by terminal or with thunar/nautilus/konqueror (your file browser) and use the media from there.

    4) Autostart (optional)
    *Regular Ubuntu: Go to system => Preferences => Sessions, click add, type a name (like UPnP or MediaServer) in the name section, in the command section, enter sleep 20 && modprobe -l -t the-directory-you-want-to-have-your-media-in fuse && djmount the-directory-you-want-to-have-your-media-in, and optionally enter a comment in the comment section

    *EeeXubuntu: go to applications => settings => autostarted applications. Type a name (like UPnP or MediaServer) in the name section, in the command section, enter sleep 20 && modprobe -l -t the-directory-you-want-to-have-your-media-in fuse && djmount the-directory-you-want-to-have-your-media-in, and optionally enter a comment in the comment section.


    5a) Cleaning up
    The folders you extracted is no longer needed. They can't be deleted directly since you have fiddled around with them as something called root (one can say that it is an administrator). That makes root the owner and you are not allowed to edit or delete them. The easy way to fix this is to us the terminal where you put the previous commands and type sudo your file browser. On regular ubuntu (not kubuntu or xubuntu) that file browser is nautilus, and on xubuntu it is thunar, and on kubuntu it is konqueror. Now you are in the root browser and can delete the files easily. Your home folder is located in the home directory.


    5b) Alternative cleanup
    This can also be fixed by navigating in the terminal to the folder directly above the djmount folder and type sudo chown -R djmount-0.71. chown changes the ownership of an item. -R means recursive (i.e. the folder, all it's subfolders and files). sudo means "as root, do". If you have a different version, just change 0.71 to that version.
    Now the repeat procedure for the FUSE folder but change djmount-0.71 to fuse-2.7.3 (again if you have a different version, change 2.7.3 to that version).

    Happy watching/listening =)





    Footnotes
    1) You might encounter problems with your C compiler. It'll say something like "configure: error: C compiler cannot create executables
    See `config.log' for more details.
    ". If so, install the rather huge package build-essential from the synaptic package manager.

    2) If you find the password thingy difficult and would like to keep track of how many characters you've entered, just swap sudo for gksudo.

    3) The folder paths can easily be obtained by navigating to them in your file browser and pressing ctrl + l

    4) Most MediaServers work with sony's PlayStation 3, and so will MediaTomb to which I linked above.

    Credits
    Thank you:

    __________________________________________________ ________
    *Rob-e for solving the almost unsolvable autostart-problem
    __________________________________________________ ________

    *Fixman for the C compiler help
    *linuxowns@wordpress for the media server instructions.
    *joshsmith for helping dumb 'ol me with my fight against the Synaptic pkg mgr on my Eee when I didn't realize that the problem was that it tried to fetch the package from the CD

    Some credit goes to the slightly incomprehensible offical installing and using instructions which can be found here and here.
    Last edited by itix; June 2nd, 2008 at 06:44 PM.

  2. #2
    Join Date
    Mar 2006
    Beans
    194

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    sshfs+fuse can used to mount remote directory to local machine and play media file on it. I think the djmount method should have some difference feature but I don't know what is the difference between them.

  3. #3
    Join Date
    Oct 2007
    Location
    Gnosjö, Swe
    Beans
    517
    Distro
    Ubuntu

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    I don't either but this works wonderful for me
    It has the option of searching for playlists and showing only playlists which might make it easier for non library base media players to find and play music.

  4. #4
    Join Date
    Oct 2007
    Location
    Gnosjö, Swe
    Beans
    517
    Distro
    Ubuntu

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    idk what sshfs does, but don't you need to know the exact hostname and stuff to do that?
    A good media server creates folders called audio, video and picture like my mediatomb server. Those are quite easy to access...
    This is sort of the lazy mans method I think.

  5. #5
    Join Date
    Mar 2006
    Beans
    194

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    Quote Originally Posted by itix View Post
    I don't either but this works wonderful for me
    It has the option of searching for playlists and showing only playlists which might make it easier for non library base media players to find and play music.
    Using sshfs indeed need to know IP or hostname of machine on which media file is stored.

    So the djmount don't want client/player know the server IP/hostname because it use UPnP, is that right?
    Last edited by say2sky; May 4th, 2008 at 02:30 PM.

  6. #6
    Join Date
    Oct 2007
    Location
    Gnosjö, Swe
    Beans
    517
    Distro
    Ubuntu

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    That is probably the right way to interpret the differences. It doesn't require any root access and it doesn't need a login on a different host, but it's also restricted to the local network. You can't find a media server in your neighbors apartment unless you're on the same network.

    With your method, one might mount a folder to the local machine from the other side of the world if necessary.

  7. #7
    Join Date
    May 2008
    Beans
    5

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    I've got fuse and djmount working ok. Works a treat with Twonkyvision on my NSLU2 at home, there's just one thing that I'm struggling with and that's to get it to mount at boot.

    I've added a line to /etc/fstab and verified it with mount -av, but it just won't mount on boot.

    Was thinking that it was something to do with the way that mountall.sh in /etc/init.d works, but I've drew a blank.

    Any ideas - running 8.04 at the moment.

    Ta,

    TD.

  8. #8
    Join Date
    Oct 2007
    Location
    Gnosjö, Swe
    Beans
    517
    Distro
    Ubuntu

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    Yeah, thanx buddy, I have the same problem myself. I have been fighting for weeks now with all sorts of different methods. I have no idea why it won't work.

    I was going to extend this with a "lauch at startup"-part but I wanted to get it working first. I have tried all sorts of diffrenet things like modifying rc.local, editing the "official" startup-launcher of xfce4 and a desktop launcher which didn't work. It feels good that I'm not the only one with this problem (not to be mean or anything )

    Here is the thread i started on the subject: http://ubuntuforums.org/showthread.php?t=778901

  9. #9
    Join Date
    Apr 2007
    Location
    Wisconsin
    Beans
    83
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    hey, thanks for the tut, it worked nicely

    i think the problem youre having with mounting it on boot, is that the network isnt running and connected when you run the program, insted of putting 1 command in the command box, i just wrote a bash script... notice that it waits for 20 seconds first, and this works perfectly

    Code:
    #!/bin/bash
    
    sleep 20
    modprobe -l -t /home/rob/upnp fuse
    djmount /home/rob/upnp
    you could probobly use something like "sleep 20 && modprobe -l -t /home/rob/upnp fuse && djmount /home/rob/upnp

    let me know how it works
    Every time you boot to windows, a kitten dies.

    Desktop - Athlon II X4, Radon HD 5770, dual (crt) monitor 1800x1440 & 1600x1200

  10. #10
    Join Date
    Oct 2007
    Location
    Gnosjö, Swe
    Beans
    517
    Distro
    Ubuntu

    Re: HOWTO: Read UPnP Media Server with another computer using djmount

    Nice
    I'll add that to the original howto straight away.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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