sup /g/
I need a way to handle flash storage or USB drives being plugged and unplugged, while tracking the drive letter based on the PHYSICAL PORT, not the actual flash media being inserted and removed.
How do I do this?
For example I have media players playing music from five different sources to five different sinks in pulseaudio. Let's imagine it's five different areas of an art installation.
I want to be able to treat each port as a drive. Let's say port 1 is the source of music for the main hall and I have a thumb drive in that port being used as a music source. It's drive X. The media player sending music to the main hall sink in pulseaudio draws from drive X, automatically. I replace the thumb drive with a different one with a fresh set of music, and the media player continues to draw from it as it still sees drive X, just with a new set of files this time.
>>61862160
Or some kind of script that automatically assigns the same drive letter to any thumb drive plugged into that port. Is that doable?
>>61862120
https://tinyapps.org/blog/windows/200910210700_control_usb_drive_letter_assignment.html
>Assign drive letter based on user, drive type, connection type, USB port, volume label, size, and more
But I need this for ubuntu
>>61862167
Yes you can script this. But since you have to ask you likely lack the skills to be able to do so.
>>61862120
Use Linux.
It's actually a billion times easier to do shit like that in Linux.
>>61862212
I'm not a software guy. But if I have to have it created, I'll get it created.
>>61862120
>drive letter
>>61862120
In Windows? You don't.
In Linux? Add udev rules based on the filesystem UUID/whatever serial code your filesystem has.
>>61862120
On Linux, you can find device files described by physical path in /dev/disk/by-path