Forum › Forums › Official Releases › antiX-19 “Marielle Franco, Hannie Schaft, Manolis Glezos, Grup Yorum, Wobblies” › unplugdrive.sh (bug?)
- This topic has 10 replies, 3 voices, and was last updated Apr 26-7:45 pm by Robin.
-
AuthorPosts
-
April 23, 2022 at 11:11 am #81939Member
blur13
antiX 19.5
The script doesnt work if the USB device name contains a space. Ie if the USB device is called “CLIP JAM” it returns an error, but if the USB device is called “CLIP” it works just fine.
April 23, 2022 at 6:25 pm #81952MemberRobin
::Hello blur13,
many thanks for reporting.This bug was fixed already a half year ago in the last antiX 19 version of unplugdrive, but this version wasn’t integrated in antiX 19 for some reason. So please download directly from:
and put it into your /usr/local/bin folder, overwriting the existing unplugdrive binary. After this it should work fine when called by using sudo, which is mandatory for this version.
So you need to add sudo in all places also where it is started from. Refer to https://www.antixforum.com/forums/topic/unplugdrive-sh/#post-77646Hope this fix works for you.
Windows is like a submarine. Open a window and serious problems will start.
April 23, 2022 at 8:59 pm #81957Member
blur13
April 24, 2022 at 9:28 am #82011Membertamix
::Just for signaling I have posted today a message here about unplugdrive with an attached file that might help some antiX users too.
Regards
EDIT
How to enable the Unplug Removable Device icon in 19.5.Sorry for inconvenience. You will find here the message with its correct attached file.
- This reply was modified 1 year ago by tamix.
April 24, 2022 at 5:30 pm #82028Member
blur13
::Whats the actual command used in the terminal to unplug a USB device? I’m having a hard time trying to follow the script since there are many variables defined. Assume its a standard flash drive, ie no spinning disks.
April 24, 2022 at 7:31 pm #82033MemberRobin
::Unplugdrive version 0.90 does spin down externaly plugged spinning devices fine in case these are present on a system. (Be aware many flash devices wrongly report to the system, pretending to be rotational!) Unplugdrive will automatically spin down the devices in case they have identified itself as rotational to the system. Devices reporting not to be rotational will not be spun down by the script. No need to enter different command line options normally, it is all done by the script logic, and will only fail in case the device lies to the linux system kernel about its true nature. Only in this case you can use the command line options available as a workaround for these specific devices. But you don’t need to, since the commands used by the script will not do any harm to wrongly reporting flash devices, it will simply have to wait for a 30sec. timeout in some cases on these lying devices.
This is the last Version available for antiX 19. It comes with mostly the same functionality, command line options and user interface as the recent antiX 21 Version (0.93b), even when having a different code base. The 0.90 Version is tested extensively to work reliable and stable on antiX 19. (Don’t use 0.93b on antiX 19, there is an important dependency missing, which causes it to fail unnoticed!)
The command to type in on console for this latest unplugdrive Version for antiX 19 should be sudo unplugdrive.sh, in case you have not setup the alias as described above.
Try unplugdrive.sh –help for more information (no sudo needed to get this informational output only).
In order to see and understand, what unplugdrive actually does while running, check the output of sudo unplugdrive -g in a terminal window. It will give you some idea what the variables and arreys are used for at runtime. If you want to follow the script code, please read carefully all the comments you find within the script, they will give you an idea how it is structured and how it works. Make sure to use 0.90 version for this on antiX 19, it has a cleaner internal structure than the patched an mended versions before. Once you understood what’s going on, you could look also into the new code base used by version 0.93b in antiX 21, it was ported to the more modern scripting style by Xecure, he did great work.
Windows is like a submarine. Open a window and serious problems will start.
April 24, 2022 at 7:34 pm #82034MemberRobin
::Additional hint: In case you are using any language other than English, you’ll need to download the respective language file also for use with the 0.90 version. Unfortunately all the original language files for this last antiX 19 version of unplugdrive have gone lost at gitlab, but the ones from antiX 21 will actually fit all the same here. Download them (.mo file type) from the list you find at:
https://gitlab.com/Robin-antiX/antix-goodies/-/commit/46b027e564a415218cd37f4ff48d2c8fb739c1ee
and the following pages (letter z (e.g. for language chinese) is found at page 6 only). To download click on one of the buttons at the right side of the list which reads “show file @46b027e5”, use the one in the line containing your needed language identifier. You will get redirected to the actual download page of this file at gitlab (sorry, but gitlab is a labyrinth, kind of.)
You’ll have to rename the downloaded file from unplugdrive.mo to unplugdrive.sh.mo for use with latest antiX 19 version of unplugdrive. Then copy it simply to the system folder ‘/usr/share/locale/<your-language-ID>/LC_MESSAGES’ (replace <your-language-ID> by your actual language identifier you’ve read in the download list at gitlab, and you’ll need sudo), overwriting the existing unplugdrive.sh.mo living there already. The updated language resource will take effect immediately when starting unplugdrive next time.
Windows is like a submarine. Open a window and serious problems will start.
April 24, 2022 at 7:43 pm #82035Membertamix
::@blur13 In that script, there is no proper command to unplug an USB device. What the script does is to restore the functionality of the ‘Unplug Removable Device’ icon that you can see on the left side of the antiX system tray. So spinning disks are excluded. And the script is valid for the window managers IceWM or JWM only.
To simplify, let’s suppose you’re logged as blur13 in antiX 19.5 with Rox-IceWM as desktop. First just type in the command:
sudo unplugdrive-patch.sh -u blur13Then you’ll _refresh_ your desktop by moving your mouse to
[Favorite Application] > Desktop > Other Desktops > Rox-IceWMand click the last term. Now the icon in question should be operational for removable USB drives, even for those which were already plugged in. I hope it’s clear.
EDIT
Spinning disks are not excluded if they have a USB cable. Those are removable USB devices too.EDIT
I’ll stop my message in this thread because I do not want to interfere with Robin’s last explanations and his last release of unplugdrive.sh.
My small utility was meant for the initial antiX 19.5 point release of January 2022 and for people using a live-usb without further upgrades. I just continue to use it since it works well.Thank you to all the antiX devs for their help and highly appreciated contributions.
Regards.- This reply was modified 1 year ago by tamix.
- This reply was modified 1 year ago by tamix.
April 24, 2022 at 8:38 pm #82039MemberRobin
::Spinning disks are not excluded if they have a USB cable. Those are removable USB devices too.
More than this: External drives (true spinnning drives and flash media both) plugged to IEE1394 (FireWire) and also SD-Cards in an internal or external reader will be recognised by recent unplugdrive (0.90 for antiX 19.x and 0.93b for antiX 21.x) and get prepared for unplugging properly. It will detect and handle LUKS encrypted partitions (0.90, 0.93b) and completely LUKS encrypted devices (0.93b only).
Windows is like a submarine. Open a window and serious problems will start.
April 24, 2022 at 8:43 pm #82041Membertamix
::@Robin Thank you for your further explanations.
I just hope I did not bother you with my bla-bla-bla.
Take care.April 26, 2022 at 7:45 pm #82135MemberRobin
::I just hope I did not bother you with my bla-bla-bla.
This is no bla-bla at all. You have observed precisely what is missing in the packaged version antiX 19.x uses. Please refer to the answer in the other thread, where you have presented your patch script for antiX 19. Many thanks for your approach fixing this issue!
Windows is like a submarine. Open a window and serious problems will start.
-
AuthorPosts
- You must be logged in to reply to this topic.