- This topic has 24 replies, 4 voices, and was last updated Mar 17-1:10 am by olsztyn.
-
AuthorPosts
-
March 14, 2022 at 10:59 am #79051Member
PPC
::I’m happy to report that this script is now included in ft10-transformation beta provided here: https://gitlab.com/antix-contribs/ft10-transformation/-/raw/main/packages/ft10-transformation_1.4.b4_all.deb
You can download and install the .deb (for now it’s not available in the official repository). You can launch the script using antiX Menu > Applications > Internet > Shared Folders
The only part of the script that requires localization is the message asking to install dependencies- if you see that, simply click the button to install the dependencies and, after that installation is done, restart the script.P.
March 14, 2022 at 2:14 pm #79054MemberRobin
::I really like your idea of giving connectshares an modern brother. Even if not having had time to see it running here live until now, let me mention a function which should be present (maybe it is already?). It’s about lost connections due to whatever reason to a remote server.
Make a simple test setup:
1.) Connect to your remote share in your network 2.) Access a folder within this share with e.g. zzzfm. Leave the tab open and click another tab. 3.) Plug the network cable off (this way simulating any kind of errors (not only network errors) rendering the share unaccessable all of a sudden, like hdd-hedacrashes or hard shut down of remote e.g. due to power supply failure or whatever)My findings when using old-school connectshares (which shouldn’t make a difference under this aspect to your polished new GUI) were:
1.) zzzFM will freeze long time when clicking the tab of the unaccessable network share (as long as it is not available again) 2.) disconnectshares fails disconnecting the share (as long it is not available again). 3.) you can't manually u(n)mount the share, it simply wouldn't let you, coming up with error messages only.I believe this scenario could happen with your polished version also. So maybe you could add a button to allow user to forcefully disconnect in these (not too unlikely) cases.
The solution which I found to be working finally on antiX was a special umount command line switch. It could be enough already to lay the command on a button in your GUI.
sudo umount -l '/mnt/Buche/Arbeitsordner on Buche'
(where ‘/mnt/Buche/Arbeitsordner on Buche’ is my local mountpoint of the remote share only, would need to get its actual target from a script variable.)I found this solution which works on antiX in a discussion on stackoverflow, which covers the problem under many aspects.
You might experiment a bit with this, unplugging your network cable on purpose, and checking what happens while e.g. a remote document is opened in a program like libreoffice or gimp when the intended switch is pressed. Maybe it needs to have a user warning/info popup asking him to make sure to save all the open files locally and close applications accessing the share beforehand, before giving OK to proceed.
Windows is like a submarine. Open a window and serious problems will start.
March 14, 2022 at 3:56 pm #79057Memberolsztyn
::I believe this scenario could happen with your polished version also. So maybe you could add a button to allow user to forcefully disconnect in these (not too unlikely) cases.
The solution which I found to be working finally on antiX was a special umount command line switch. It could be enough already to lay the command on a button in your GUI.Great ideas…
This perhaps would amount to showing which shares are connected in the overall list of shares and have a ‘Disconnect’ button next to them…
Thanks and Regards…Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersMarch 14, 2022 at 5:33 pm #79062MemberPPC
::@Robin – I tested the situation you described and you are right – zzzfm just freezes, when it loses contact with the shared folder.
I was thinking of a simple script to disable the network shares and restart zzzfm, if it’s running… But I’m not sure I can do more work on the script before launching the final Ft10 1.4… I literally learned from scratch how to create and manage samba shared folders, and then dug around to discover the perfect way to scan and mount those shared folders… Lots of time went to this script, already…@olsztyn – I like your idea- but that implies changing the script…
Any takers on helping adapt the script? š
P.
March 15, 2022 at 2:06 pm #79117MemberRobin
::I literally learned from scratch how to create and manage samba shared folders, and then dug around to discover the perfect way to scan and mount those shared folders⦠Lots of time went to this script, alreadyā¦
I do know exactly what you mean, I had to research on this very thing some years ago myself and remember quite well there were many pitfalls…
Maybe you could have saved some time when hanging around in IRC antiX translators channel occassionally, possibly I could have given you some hints. But as I’ve learned from your other thread, you have managed to research everything very well on your own already. Great job, PPC!So many thanks also for your SAMBA tutorial tailored for antiX! This updates also my recollection of the needed steps on SAMBA.
Don’t bother if the force disconnect button(s) don’t make their way into the upcoming final version. Let’s implement it in the next update, e.g. along with the translations.
Windows is like a submarine. Open a window and serious problems will start.
March 15, 2022 at 2:30 pm #79119Memberolsztyn
::@olsztyn ā I like your idea- but that implies changing the scriptā¦
Any takers on helping adapt the script? šI could make incremental changes and test but I still would need to learn modern styles of programming. All my programming experience of the past was mainframe IBM 370 Assembler, Cobol, etc…, though later some C and Java. But I will try to learn your script first and methods used…
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersMarch 15, 2022 at 4:44 pm #79130MemberPPC
::I just found an “one size fits all” solution to unmouting samba shares here: http://devplant.net/2016/02/29/unmounting-samba-shares-after-network-disconnect/comment-page-1/
Running this command solves the problem:
sudo umount -a -t cifs -lSo, a GUI to close zzzfm, unmount all shares and restart zzzfm will probably look something like this (untested):
pkill zzzfm & pkill spacefm & sleep 1 && sudo umount -a -t cifs - && sleep 1 && zzzfmEdit1: why the “spacefm” part? Funny thing, when working on the script that configures zzzfm, I needed to close zzzfm to perform editions to it’s config file (manual changes to that file are overwritten automatically if zzfm is running)- and sometimes, those editions would not stick- I found out why after some frustrating hours- when zzzfm is killed, it can sometimes respawn as the process spacefm- nice, right?
Edit2: I was thinking how to implement this – probably on the part of the script that displays the “notification” that no network/shares are detected- I could create a function with this contents:
– check if zzzfm is running
– If zzz is running, kill it.
– Display a warning to save locally any open shared documents
– Perform the umount command and
– if zzz was running, launch it againThis implies no buttons, nothing more than this function- simply launching the script from the cli or the menu (using the provided .desktop file) can solve the problem… This approach has only one problem – it unmounts all shares- most people probably are not connected to shares hosted on more than one device, but just in case they are, they’ll have to remount the share that was not off-line… This solution, as everything in live has pros and cons…
All feedback is, as always, welcome!P.
- This reply was modified 1 year, 1 month ago by PPC.
- This reply was modified 1 year, 1 month ago by PPC.
- This reply was modified 1 year, 1 month ago by PPC.
March 15, 2022 at 6:19 pm #79141Memberolsztyn
::his implies no buttons, nothing more than this function- simply launching the script from the cli or the menu (using the provided .desktop file) can solve the problem⦠This approach has only one problem ā it unmounts all shares- most people probably are not connected to shares hosted on more than one device, but just in case they are, theyāll have to remount the share that was not off-line⦠This solution, as everything in live has pros and consā¦
All feedback is, as always, welcome!Just want to confirm the issue that disconnecting network with SMB share open on any content will freeze zzz file manager.
However, unless I am misunderstanding the issue you are trying to solve via the command line to unmount an SMB share, there is no need for command line code for this…
If the SMB share in question is mounted then you can unmount it by right click of mouse on it in zzz and select ‘Unmount’. No need to unmount the entire caboodle of network shares.
Also, Your script works very well as is at this point, so there might be no need to further modify this code.
Just my two cents.- This reply was modified 1 year, 1 month ago by olsztyn.
Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersMarch 16, 2022 at 10:18 am #79169MemberPPC
::If the SMB share in question is mounted then you can unmount it by right click of mouse on it in zzz and select āUnmountā.
Yes, it’s the way I regularly unmount my Shares, just like they were a USB thumbrive… But I can’t do that when zzzfm is “frozen”… can you?
Edit: I tested, even on my more powerful desktop – mount a Share; unplug the network- zzzfm freezes. I have to use xkill to close it. If I try to reopen zzz, I can’t, not unless I pkill it first. If I do that, zzzfm reopens, with the share indicated as being mounted on the Device list. If I try to unmount it, zzzfm can’t.
So, pkilling zzzfm and then force unmounting the share seems to be the only possible way to untangles zzz from a share that as been disconnected…P.
- This reply was modified 1 year, 1 month ago by PPC.
March 17, 2022 at 1:10 am #79221Memberolsztyn
::Edit: I tested, even on my more powerful desktop ā mount a Share; unplug the network- zzzfm freezes. I have to use xkill to close it. If I try to reopen zzz, I canāt, not unless I pkill it first. If I do that, zzzfm reopens, with the share indicated as being mounted on the Device list. If I try to unmount it, zzzfm canāt.
Thank you for this description of the issue. I can confirm on my end the same behavior, after losing WiFi connection.
In my case after killing zzz, zzz appears not to start for some time, zzz resisting restarts. Reconnecting WiFi bring back zzz to life.
Looks like a problem indeed.Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_Parameters -
AuthorPosts
- You must be logged in to reply to this topic.