0

I want to detect the existence of a (directory on a) USB drive (/media/pi/Music), wait for it to appear, then open it in the GUI. Using xdg-open /media/pi/Music in ~/.config/lxsession/LXDE-pi/autostart (putting in a crude sleep 3 before the command) opens it twice with the error message that it does not exist, but it obviously does. It would also be nice to be able to tell it what size to make the window.

0

Have some of the answer. findmnt /media/pi/Music returns nothing if not there and a list of info if it is. Can use this to detect the drive. Still have no solution to the xdg-open behaviour or a nice way to size the window.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.