Setting up the multimedia (BT, DLNA/uPnP, iTunes) bits in 8.0.3-RELEASE_MULTIMEDIA

Status
Not open for further replies.

TravisT

Patron
Joined
May 29, 2011
Messages
297
---------------------------------
Enabling Transmission at Boot
---------------------------------

Run the following commands as root:

Code:
mount -wu /
sed -i '' \
    -e 's/\(transmission_enable="\)NO"/\1YES"/' \
    -e 's/\(transmission_user="\)myuser/\1'`whoami`'\"/g' /etc/rc.conf
sed -i '' \
    -e 's/\(transmission_enable="\)NO"/\1YES"/' \
    -e 's/\(transmission_user="\)myuser/\1'`whoami`'\"/g' /conf/base/etc/rc.conf
mount -ru /


---------------------------------

I'm completely new to this, and I may be missing something. It seems that if you login as root when you do this, sed inserts your current user as the "transmission user" user (which is root). Wouldn't you want this to be the user you created with the home directory on "/mnt/tank/..."?

I've followed the tutorial, and my transmission service is running but I can't access the web gui. I'm assuming at this point that it is because it's reading the wrong settings.json file. If I run transmission-daemon -f as my added user, things work fine.
 

Stenull

Dabbler
Joined
Aug 22, 2011
Messages
45
I'm completely new to this, and I may be missing something. It seems that if you login as root when you do this, sed inserts your current user as the "transmission user" user (which is root). Wouldn't you want this to be the user you created with the home directory on "/mnt/tank/..."?

I've followed the tutorial, and my transmission service is running but I can't access the web gui. I'm assuming at this point that it is because it's reading the wrong settings.json file. If I run transmission-daemon -f as my added user, things work fine.

Read posts #33 to #36, it seems gcooper have mixed two approach to this.
 

TravisT

Patron
Joined
May 29, 2011
Messages
297
Got it. Thanks. The first time I read that I didn't completely understand the problem.

I'm real close to having this setup like I want it. Now I just need to figure out permissions on my watch directory. I'd like to be able to drop torrents into my watch directory from windows, and have transmission begin the downloads. Right now, the transmission user gets "permission denied" on any files created on the windows side of things. My windows users can modify files created by transmission. There's probably an easy fix for this that I'm overlooking.

My FreeNAS is integrated into windows AD.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Joe THANK YOU THANK YOU i reinstalled the latest build 8.0.3 multimedia and followed your steps and it works (only one issue maybe you can help: all my files show double files for each item).... also please if you can please make a step by step for iTunes and firefly PLEASE PLEASE... Thanks again for your help :smile:
Odd, when you set the dir_media= what did you set all of them for? You should have the directory listed only once. If you have a mix of audio, video, photo under one directory, just use dir_media=/mnt/pool/path to media. If you feel you got this correct, please post the minidlna.conf file here.

As for iTunes and FireFly, I don't use them so if I came up with a guide I honestly wouldn't be able to test them to see if I got it correct. I'll take a stab at it today if I get some time and you would have to tell me if it works properly.

-Joe
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Bit Torrent (Transmission) Instructions

I Don't use Bit Torrent at all but the service appears to run after this setup. If you see changes which need to be made, please post or PM me.

UPDATED INSTRUCTIONS: Toxxygen posted a new set of instructions. I don't want to remove these instructions just yet until I get confirmation the new instructions work as written by other users. Here is the link to those instructions and please give Toxxygen credit for the work. http://forums.freenas.org/showthrea...LEASE_MULTIMEDIA&p=22966&viewfull=1#post22966

Minimum Requirements: FreeNAS 8.0.4-MULTIMEDIA.

NOTE: pool = your pool name, change it, don't just cut and paste unless your pools name really is "pool".


1. Setup a user for this event, I will use 'user' as the user name, substitue your name to make things easier:
Username: user
Primary Group ID: wheel
Home Directory: /mnt/pool/home/user
Shell: csh
Full Name: user

2. SSH or use console for the remainder.

3. Log in as iTunes. You should be in the "/mnt/pool/home/user' directory.

4. Type 'echo $HOME' and verify the path is correct '/mnt/pool/home/user'. If not, go back and fix it.

5. Type (hit RETURN) after each line

Code:
mkdir -p "$HOME/.config/transmission-daemon"
mkdir -p "$HOME/transmission/incomplete"
mkdir -p "$HOME/transmission/complete"
cp /usr/local/etc/transmission/home/settings.json $HOME/.config/transmission-daemon/.


6. Lets edit a file
Code:
cd $HOME/.config/transmission-daemon
ee settings.json

Now locate and edit the following lines:
download-dir
incomplete-dir

change to:
"download-dir": "/mnt/peanuts/home/user/transmission/complete",
"incomplete-dir": "/mnt/peanuts/home/user/transmission/incomplete",

Press Escape and save the file.

------
Activation

7. Now because you cannot execute the next command without being root, log in as SU and then move to the next step.

8. Type the following:
Code:
mount -wu /
cd /conf/base/etc
ee rc.conf


Locate transmission_enable="NO" and change it to "YES".
Locate transmission_user= and change to your user name.

Press Escape and save the file.

9. Now lets enable the current running files, similar to the previous step.
Type:
Code:
cd /etc
ee rc.conf


Locate transmission_enable="NO" and change it to "YES".
Locate transmission_user= and change to your user name.

Press Escape and save the file.

10. We must alter the boot restored transmission file to make it run properly.
Code:
cd /conf/base/etc/local/rc.d
ee transmission

Now you must change the values
: ${transmission_conf_dir="/mnt/pool/home/user/.config/transmission-daemon"
: ${transmission_download_dir="/mnt/pool/home/user/transmission/complete"

Press Escape and save the file.

10. We must alter the current transmission file to make it run properly.
Code:
cd /conf/base/etc/local/rc.d
ee transmission

Now you must change the values
: ${transmission_conf_dir="/mnt/pool/home/user/.config/transmission-daemon"
: ${transmission_download_dir="/mnt/pool/home/user/transmission/complete"

Press Escape and save the file.

11. Close the protected flash drive files, type
Code:
mount -ro /


-----
Testing

12. Type
Code:
service transmission start
and cross your fingers. You should see the service running. I don't use transmission so if someone could test to see how it functioned, I would appreciate some feedback.

13. If it all worked, type reboot and see if it still works.

There are other file settings you can make in settings.json. Here is a link which discusses some of them. https://trac.transmissionbt.com/wiki/EditConfigFiles

-Joe
 

worker

Cadet
Joined
Jan 16, 2012
Messages
1
Hello,
I tried the multimedia 8.0.3 x86 version. Specifically DLNA setup with mindlna

Couple of observation:

the
Code:
 mount -ro / 
did not work for me.
I had to use
Code:
 mount -o ro / 
to enable the read only back

Also, minidlna database cannot be created if the partition is NTFS for the minidlna database file
(I did not have a non NTFS partion -- so this was a problem)
The error appears to be in SQLite that says it cannot write there...
due to my setup of mostly ntfs disks for media content -- this presented a major problem for me
(this is a dual boot system that uses serviio on xp to server dlna)

when creating a new user as the original instruction was suggesting, I created it with a 'wheel' group
(although this was not probably needed). That user's home directory is where the minildna database was stored
 

awjs

Dabbler
Joined
Dec 20, 2011
Messages
16
Hi Joe, once again thanks for taking the time to do this guide for me..... as for the double files its my windows media player that's doing it, I have tried it from my PlayStation and all is good no double files so i think its good thanks.... I have ran into a issue on the 1st step and I know you will no how to fix it so here goes....

type 'echo $HOME' and verify the path is correct. If not, go back and fix it.
7. Type (hit RETURN after each line)
Code:

mkdir -p "$HOME/var/db/mt-daapd"

when I type this step this is what happens

Welcome to FreeNAS
[itunes@mynas] ~> ehco $HOME

CORRECT>echo $HOME (y|n|e|a)? yes
/mnt/raid/home/itunes
[itunes@mynas] ~> mkdir -p "$HOME/var/db/mt-daapd"
mkdir: /mnt/raid/home/itunes/var: Permission denied
[itunes@mynas] ~>

I cant go any more..

my users look like this

ID Username Group Home Shell Password Modify Remove
1001 nas nas /nonexistent /bin/csh
1002 itunes itunes /mnt/raid/home/itunes /bin/csh

I was trying to post pics but I cant seem to figure it out

Let me know if you need more info

Thanks

Andre

PS: figure out how to post pics

PS: can you also tell me what a su is?

do I just login as su and what pass do I use

Thanks
 

Attachments

  • itunes.jpg
    itunes.jpg
    87.9 KB · Views: 416
  • users.jpg
    users.jpg
    94.7 KB · Views: 382

awjs

Dabbler
Joined
Dec 20, 2011
Messages
16
Joe here is my minidlna.conf file let me know if you see anything wrong

Thanks

[Bport=8200
#GC: Look for everything (audio, pictures, video) in this directory.
media_dir=/mnt/raid
#GC: Just audio
media_dir=A,/mnt/raid/music
#GC: Just pictures
media_dir=P,/mnt/raid/pictures
#GC: Just video
media_dir=V,/mnt/raid/videos
#GC: might want to change this.
friendly_name=mynas
#GC: change this
db_dir=/mnt/raid/dlna/var/db/minidlna
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt
inotify=no
enable_tivo=no
strict_dlna=no
 

awjs

Dabbler
Joined
Dec 20, 2011
Messages
16
Ok I looked up SU and i guess its used to gain root access.... so because I got permission denied I tried to type SU and the pass, then I type ( mkdir -p "$HOME/var/db/mt-daapd" ) and it didnt give any errors.. SO i continued but then this is what happened

[itunes@mynas] ~> chown daapd "$HOME/var/db/mt-daapd"
chown: daapd: Invalid argument

??? what am I doing wrong

Thanks
 

awjs

Dabbler
Joined
Dec 20, 2011
Messages
16
Code:

mount -wu /
cp /conf/base/usr/local/etc/mt-daapd.conf $HOME/.

its says no such directory ???
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
@awjs

My iTunes account has wheel permission, maybe that is the difference?
 

awjs

Dabbler
Joined
Dec 20, 2011
Messages
16
@joeschmuck

K I will try to give my itunes account wheel perission and try again and let you know thanks
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
@awjs

There are other problems setting up iTunes, the paths were incorrect as far as I could tell so I made some corrections and it looks like FireFly must be installed. I am over my head here mainly because I don't use it. I'm sure someone else here who has gotten it to work can discuss it better than I. Sorry.
 

fka

Dabbler
Joined
Jan 9, 2012
Messages
15
What are the permissions for the volume/ drive pool you have pointed firelfy too?

I got it to work with my firefly user (in wheel group.) set as the owner(user) of the volume with read/write perms set for user. And owner(group) as wheel.
I'm sure it would also work with the firefly user not set as the owner of the volume but being in the wheel group, the volume owner(group) set to wheel and permissions set to read/write for 'group'.

volume group permissions are set to read only as default in the GUI !!

Don't forget to set perm recursively in GUI or use shell ...

EDIT - note firefly isn't working with iTunes 10.5.2 on OS X ..

D
 

mo100

Dabbler
Joined
Sep 24, 2011
Messages
12
First off I'd like to thank GCooper. Also many thanks to joeschmuck for translating GCoopers instruction :smile: I have miniDLNA working great. However, I do have one issue. When I place new movies onto the server it seems like miniDLNA doesn't notice. I have to stop the minidlna service and start it again to make sure it updates. Should miniDLNA be scanning the files when you place new ones on there? Had anyone else had this problem?
 

awjs

Dabbler
Joined
Dec 20, 2011
Messages
16
@awjs

There are other problems setting up iTunes, the paths were incorrect as far as I could tell so I made some corrections and it looks like FireFly must be installed. I am over my head here mainly because I don't use it. I'm sure someone else here who has gotten it to work can discuss it better than I. Sorry.

OK Joe no problem I understand, itunes isn't really a biggie right now you have been a big help with the most important which was streaming THANKS THANKS THANKS

I tried your new step and got a lot feather but I still have issues, have to go to bed for work, 2 morrow I will post pics of the issues and hopefully we can get more done THANKS again for the help....
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
First off I'd like to thank GCooper. Also many thanks to joeschmuck for translating GCoopers instruction :smile: I have miniDLNA working great. However, I do have one issue. When I place new movies onto the server it seems like miniDLNA doesn't notice. I have to stop the minidlna service and start it again to make sure it updates. Should miniDLNA be scanning the files when you place new ones on there? Had anyone else had this problem?
Minidlna is looking for inotify which signals a change occurred on the drives. FreeBSD doesn't have a routine that notifies the system when a change occurs which is why you are having that issue. Until a routine can be written to check for changes and toss a flag, minidlna will never see those changes and will not rescan for new media. So yes, you must restart minidlna. You can also set up a CRON job to restart minidlna periodically however I don't know how to do it and since I don't add content but maybe once a week, I just restart the service manually.

When the plug-ins are complete, hopefully something will be developed that will compensate but this is where we are today.
 

fka

Dabbler
Joined
Jan 9, 2012
Messages
15
Ok I looked up SU and i guess its used to gain root access.... so because I got permission denied I tried to type SU and the pass, then I type ( mkdir -p "$HOME/var/db/mt-daapd" ) and it didnt give any errors.. SO i continued but then this is what happened

[itunes@mynas] ~> chown daapd "$HOME/var/db/mt-daapd"
chown: daapd: Invalid argument

??? what am I doing wrong

Thanks

Hi awjs

this step is to set permissions for mt-daapd to your iTunes user. If your user is 'itunes' then command should be.
[itunes@mynas] ~> chown itunes "$HOME/var/db/mt-daapd"

a bit on su:

When you use 'su' you are switching your ssh login to root so $HOME is now referencing the home folder of your root user not iTunes user.
joe has got round this when logged in as root by using:

set HOME="/mnt/pool/home/iTunes"

If you miss this step out then (assuming the volume you are using is 'pool') when as root, the path to iTunes home folder will be

/mnt/pool/home/iTunes

So "$HOME/var/db/mt-daapd" would become "/mnt/pool/home/iTunes/var/db/mt-daapd"

Hope this helps.
D
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994

Skaven

Dabbler
Joined
Oct 25, 2011
Messages
31
Status
Not open for further replies.
Top