Minidlna


#1

Hello! I am install minidlna (from repo ubuntu 16.04) but I cant edit a minidlna.conf file even with administrator rights (sudo nautilus and sudo nano). I want to write a new way to the store media files different from defult. How can I editing minidlna.conf file in the snap folder?


#2

if you installed minidlna-escoand (which is the only snap i could find with “minidlna” in the name), it seems to copy the minidlna.conf file to $SNAP_DATA on first start, so take a look at /var/snap/minidlna-escoand/current/ which is what $SNAP_DATA translates to …


#3

Thank you for responding! I corrected file by your way, it changed, but no changes in app, checked minidlna.conf on another way “/snap/minidlna-escoand /19” there is default setting. It seems necessary to correct the file way “/snap/minidlna-escoand /19” but in this folder the file can not be adjusted even with administrator rights.


#4

Did you stop and start the snap after editing the file (or reboot the machine) ? i doubt just editing it will have any effect if the process does not get restarted.


#5

Yes! I rebooted. I think conf file by the way /snap/minidlna-escoand/19/etc is main. It must be changed, but I cant, this minidlna.conf with default settings yet.


#6

the start-minidlna script in the snap clearly uses it from $SNAP_DATA:

$ cat /snap/minidlna-escoand/current/sbin/start-minidlna 
#!/bin/sh
DB_DIR=$(realpath -s $SNAP_DATA/../current/)
[ ! -f $SNAP_DATA/minidlna.conf ] && sed "s|^#db_dir=.*|db_dir=$DB_DIR|; s|^#log_dir=.*|log_dir=$SNAP_COMMON|" $SNAP/etc/minidlna.conf > $SNAP_DATA/minidlna.conf
minidlnad -f $SNAP_DATA/minidlna.conf -P $SNAP_COMMON/minidlna.pid "$@"

the line
minidlnad -f $SNAP_DATA/minidlna.conf

trranslates to minidlnad -f /var/snap/minidlna-escoand/current/minidlna.conf

the file from the readonly snap dir is only copied in place on first start so that there is a default file in $SNAP_DATA.

if the app doesnt start, take a look at the applications log at /var/snap/minidlna-escoand/common/minidlna.log it likely tells you whats wrong.


#7

It is easier to install another application and configure it in the usual way. Thank you very much!


#8

well, if you use minidlna in any other way you will also have to edit minidlna.conf and restart the app … (and if it doesnt start you will still have to read minidlna.log) the snap format doesnt make that worse or better in any way but indeed thats your choice, good luck with it :slight_smile:


#9

Minidlna starts, VLC sees it, after changing minidlna.conf (/var/snap/minidlna-escoand/19 ) with new way to media files chahges are not displayed in the VLC player. The second file is minidlna.conf (/snap/minidlna-escoand/19/etc) I cannot change even with admin rights. If after correct the first minidlna.conf no changes means need to change the second file, but the snap does not give it. I have DLNA is on a router, not a problem for me, but how other users of ubuntu 16.04 will be able to fully use minidlna - this is question :slight_smile:


#10

Well, you did not tell us what you are changing in the file …

Looking closer at the snap you would either have to copy your files into /var/snap/minidlna-escoand/current/ or serve them from somewhere underneath /media and connect the removable-media interface by using:

sudo snap connect minidlna-escoand:removable-media

It is a bit unfortunate that the snap developer did not add the home interface to this snap so you could point to ~/Music or ~/Videos perhaps i belive “escoand” is @Alejandro (Escobar), perhaps you can ask him to enable the home interface for this snap in the next version.