pcwii / usb-music

Mycroft.ai skill to automagically read music from a usb stick and play based on requests
GNU General Public License v3.0
9 stars 5 forks source link

New Picroft install cannot mount or monitor any drives or locations #9

Open martini1992 opened 2 years ago

martini1992 commented 2 years ago

I have a fresh install of Picroft and have installed this skill as recommended making sure all the dependencies were installed before hand from pip primarily and apt if not.

I am unable to get it to find any music to add to the library, and I think I have narrowed it down to anything requireing sudo or root permissions silently failing, although manually mounting a samba share to the appropriate folder and running "update local library" against that folder still fails to find any music.

the Mycroft software seems to be running as the pi user, I don't know if this hasn't always been the case?

martini1992 commented 2 years ago

Ok, sorted it.

Couple of things, firstly this error was caused by sudo requiring a password so editing file "/etc/sudoers.d/010_pi-nopasswd" comment out the line "pi ALL=(ALL) ALL" by adding a # infront of it and underneath enter "pi ALL=(ALL:ALL) NOPASSWD:ALL" (no quotes of course).

This is dangerous because it removes the need to enter a password to do sudo actions (there may be a better way around this)

Secondly, one of my paths had spaces in it, checking the code the paths aren't surrounded with " " when the command string is built so this could be fixed but just adding quotes in the settings fixed that.

I feel the first issue should be clearly explained in the README.md to save people thinking this skill is broken. The second one would be nice to see a code fix for.

martini1992 commented 2 years ago

Noticed the passworded sudo is a question in the initial Picroft setup, if anyone was wondering why it mattered... this is why.