I corrected this by simply deleting /run/lock/LCK.. ttyUSB0 . After doing that, gtkterm was able to open ttyUSB0 successfully. Save this answer.
B - Lock file location On most systems This should be /usr/spool/uucp. GNU/Linux systems use /var/lock. If this directory does not exist, minicom will not attempt to use lockfiles.
Sometimes if the connection to a device via Minicom is lost, the next time you start Minicom you could see an error: Device /dev/ttyS0 is locked. The name /dev/ttyS0 may be different, depending on your COM port. To avoid this issue you should always shut down Minicom using CTRL+A keys and then the Q key.
I was playing around with a router earlier this evening using minicom and I must not have closed it cleanly. Here is the error message that I get when I try to open minicom:
device /dev/ttyusb0 lock failed: operation not permitted
I have two questions, 1) how would I go about getting out of this state, and 2) how do I exit minicom cleanly so that I can avoid this happening again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With