Unmounting USB device through Qt
-
Are USB Devices automatically mounted when they are plugged in?
-
-
pmount is a shell command.
-
@the_ So does the Qt application need to open the Terminal window in order for "pmount /media/path/to/flashdrive" to work? Or can I still send the command without opening the Terminal window. In other words, I don't want the user to mess with the Terminal. I just would like for them to press the button and their flash drive should unmount.
I tried using the following but it doesn't unmount:
QStringList parameters; parameters<<"/media/user/nameOfFlashdrive/"; QProcess ps; ps.start("pumount", parameters); ps.waitForFinished(-1);
-
Hi
pmount is a wrapper for the normal mount command
allowing normal user (non root) to
mount devices.As far as I know, the pumount is used for unmounting devices?
as least here on ubuntu it seems to work pretty safe. -
yes it should.
you can read about it here
http://manpages.ubuntu.com/manpages/utopic/man1/pumount.1.htmlit seems to expect the device to be mounted under /media.