in reply to mounting device from a script

If the user in general can mount devices, you can (on Gnome-ish Linux systems, but also on my LXQt-based system), use the gio command to mount and unmount devices programmatically. See system