antiX-23.1 coming soon [actually, it is AVAILABLE!]

Forum Forums antiX-development Development antiX-23.1 coming soon [actually, it is AVAILABLE!]

  • This topic has 467 replies, 23 voices, and was last updated Feb 26-9:42 pm by blur13.
Viewing 15 posts - 406 through 420 (of 468 total)
  • Author
    Posts
  • #132520
    Member
    Robin

      @PPC: found out your script kills itself at startup:

      for pid in $(pidof -x $scriptname); do
          if [ $pid != $$ ]; then #exit 1
          kill $pid_of_script
          fi 
      done

      After I had commented out this block it comes up with it’s selection window again. For some reason the first time start from within control centre ran though and installed the needed packages.

      Reactivating the lines again, the following happens like before, again and again:

      $ antix_my_network_neighborhood
      Beendet
      Robin@antix1~
      $ antix_my_network_neighborhood
      Beendet
      Robin@antix1~
      $ antix_my_network_neighborhood
      Beendet
      Robin@antix1~
      $ pidof -x antix_my_network_neighborhood
      485124

      So there is still an instance running; if killing this manually on console, your script comes up again for a single run. Then again it fails to come up (and also fails to kill the former instance, what is the reason obviously it won’t come up every second run as it should probably, if I understand your concept properly.)

      Now I tried to kill this running instance manually:

      $ kill 485124
      Robin@antix1~
      $ antix_my_network_neighborhood
      Connected to a network - this device's IP is 192.168.178.24 
      The detected available IP range is: 192.168.178.24/24
      IPs that will be searched for shared folders:
      192.168.178.1
      192.168.178.2
      192.168.178.22
      192.168.178.24
      192.168.178.254
      Scanning for shared folders on each IP...
      do_connect: Connection to 192.168.178.2 failed (Error NT_STATUS_CONNECTION_REFUSED)
      	Arbeitsordner
      	nobody
      do_connect: Connection to 192.168.178.24 failed (Error NT_STATUS_CONNECTION_REFUSED)
      do_connect: Connection to 192.168.178.254 failed (Error NT_STATUS_CONNECTION_REFUSED)
      ...Done scanning. Detected Network shares:
      //192.168.178.22/Arbeitsordner
      //192.168.178.22/nobody
      udevil: verweigert 71: '/media/sda4/Arbeitsordner/antiX/zzzFM-extensions/git/desktop-defaults-zzzfm-antix' ist kein erlaubtes Medienverzeichnis
      desktop-defaults-run -fm --follow   //192.168.178.22/Arbeitsordner
      zzzfm   //192.168.178.22/Arbeitsordner
      Robin@antix1~

      How to disconnect now? Is it enough to kill the still running script to disconnect the share?

      And please note the error line
      udevil: verweigert 71: '/media/sda4/Arbeitsordner/antiX/zzzFM-extensions/git/desktop-defaults-zzzfm-antix' ist kein erlaubtes Medienverzeichnis
      Not sure where this comes from. It points to the current working directiory from which I have started the script. Obviously there is something going wrong still. Nevertheless, the connected folder is opened in zzzFM.

      Btw, it doesn’t show the proper name for the neighbourhood devices; 192.168.178.22 has the network name “birke” for example, so this should be displayed to avoid mixing up different devices when merely IPs are displayed:

      $ arp -a
      birke.local.net (192.168.178.22) auf 00:26:a0:14:e1:18 [ether] auf eth0
      ...

      Windows is like a submarine. Open a window and serious problems will start.

      #132538
      Member
      Robin

        Update:

        After thinking a bit about the workflow of your script, it became clear to me it isn’t meant to stay open in background at all. The running instance must have happened for some reason, maybe because of the logon wasn’t successful when running it from control centre, or maybe I have mixed up the very similar IP addresses and gave wrong credentials. Whatever it caused, if another instance is running, the script should kill this instance, not itself. Maybe something lile this could do it:

        # kill former instance before starting a new one.
        for i in $(pidof -x antix-my-network-neighbourhood); do [ $i -ne $$ ] && kill -15 $i; done

        This is what I have added to your suspend-if-idle script already some time ago to make sure it doesn’t run in multiple instances. The line kills all instances but the one from which the kill-orgy was initialised. It will merely kill the script itself, not any yad windows opened by the script, so it works if the script stays running for some reason after the yad window was closed, what had happened in my very first run documented above. So you’ll have to care also for the case the user has called it intentionally a second time. In this case it should bring up the other instance and actually kill itself (and only itself, not the other instance the same time).

        You could achieve this the way we have developed for and done it in a function in antiXradio:

          for i in $(xdotool search --name $"antiX-shares"); do xdotool windowactivate $i; done # raise main window
          exit 0

        But you’ll have to make sure there IS a window of this name before applying the above, AND the underlying script is also still running. So check for both:

        xdotool search --name $"antiX-shares"
        pidof -x antix-my-network-neighbourhood

        Test the results, and only if one of the tests is not “true”, apply the kill orgy and continue, initialising a new yad window and actually running the script.

        And then, how to get rid of the connections? Here my proposal for some lines which could do the job in your script:

        remote_mounts="$(df --output=fstype,target | grep '^cifs ' | awk -F'^[[:blank:]]*([^ \t]*[ \t]+){1}' '{ printf "false|\047"$2"\047|" }')"
        if [ -z "$remote_mounts" ]; then yad --text="nothing to do"; exit 0; fi
        IFS="|"
        remote_umount=$(yad --list --checklist --print-column=2 --column=" " --column=" " $remote_mounts | tr -d \\n)
        for i in $remoteumount; do umount "$i"; done
        IFS="$ifsbak"

        Sure, this will fail if the mount contains a vertical bar | so there might to be done some workaround, like using a separator not commonly used (like I did in unplugdrive 0.91):
        CHR_0x0A="$(printf '\nx')"; CHR_0x0A=${CHR_0x0A%x} # create special separator
        Then you can use $CHR_0x0A as IFS and separator for input and output in yad, instead of the vertical bar. Or use any other character not allowed in Linux file systems for file/folder naming (is there any, besides of the slash?)

        This is just a draft, but I guess you can make something of it. If on staring up your script it “sees” already cifs filesystems, it can ask user then:

        if [ -z "$remote_mounts" ]; then
        yad --text "Following remote filesystems have been mounted already: \n\
        <list of current cifs mount sources and targets>" \
        --button=$"Unmount selected":2 --button=$"Mount another one":4 --button=$"Abort":6
        fi

        And in case no cifs filesystems are found, just come up with the yad dialog you already have.

        Last note: Add a check to prevent mounting an already mounted remote share a second time.

        That’s what came to my mind when looking into the script code in order to understand how to use the UI which comes up when clicking the new control centre entry.

        Windows is like a submarine. Open a window and serious problems will start.

        #132542
        Member
        Robin

          @PPC Here you are the complete window generation code for copy and paste into your script (code modified to call your script, see posting below, will live in a separate script for easier handling and maintenance):

          $ IFS="|"; while true; do remote_mounts="$(df --output=fstype,target | grep '^cifs ' | awk -F'^[[:blank:]]*([^ \t]*[ \t]+){1}' '{ printf "false|\047"$2"\047|" }')"; remote_umount=$(yad --title="antiX SAMBA mount manager" --window-icon="smbc" --text=$"The following remote filesystems are currently mounted:" --list --no-selection --checklist --print-column=2 --column="✅" --column="Mountpoint" $remote_mounts --button=$"Create SAMBA share":2 --button=$"Unmount selected":4 --button=$"Mount another one":6 --button=$"Leave":1 | tr -d \\n; exit "${PIPESTATUS[0]}"); case $? in "1") break;; "4") if ! [ -z $remote_umount ]; then for i in $remote_umount; do umount "$i"; done; fi;; "6") antix_my_network_neighborhood;; esac; done; IFS="$ifsbak"

          The above creates the Window from screenshot below and unmounts the selected remote mountpoints.
          The fourth button “Create Samba share” is meant to call another script, still waiting to be drafted 🙂
          And then, when done we should copy the thing to manage NFS shares. I recon we have just to replace “cifs” by “nfs” in the lookup routines to make this work, but I’ll have to explore NFS shares before I can confirm this defintely.
          Hint: icon=”smbc” refers to the icon /usr/share/icons/papirus-antix/48×48/apps which is present in antiX 23.1 as a named icon resource for Samba client.
          Another hint: No quotings needed here around vars containing spaces, since IFS is modified during execution (and restored after we are done)

          • This reply was modified 2 weeks, 6 days ago by Robin. Reason: code fixed

          Windows is like a submarine. Open a window and serious problems will start.

          #132551
          Member
          Robin

            @PPC Another Update: I’ll put this into a second script, calling yours for mounting when pressing the third button. That’s easier to handle I guess. But you still will have to fix the other issues I have described in your script. This means:
            – User must be informed by first window of antix_my_network_neighborhood in some way what to do with the list of IP addresses displayed (i.e. he is expected to double click on one of them, rather than just single click and select it, since there are no buttons, and it is not self explaining). Nobody could guess this is more than a listing, displaying the networking neighbourhood for overwiew.
            – The self-killing issue in antix_my_network_neighborhood must be fixed.

            The manager script outlined above will be soon at my git space.

            ——–
            Edit says:
            Update: antiX SAMBA manager ready.
            (Still not done: the antiX setup SAMBA shares script.)
            @PPC: some more issues with your mount script listed over there. Please urgently fix, so it can work properly, being integrated in the manager.

            • This reply was modified 2 weeks, 6 days ago by Robin. Reason: update: samba manager script available at git

            Windows is like a submarine. Open a window and serious problems will start.

            #132578
            Member
            PPC

              @Robin – sorry, but for the next few days I probably won’t be making anything related to bash scripts… That was part of the reason why I worked so hard last night, to have IceWM Control Center finished, and the icon for aCC working perfectly.
              Please feel free to make any commit you see fit to the original “shared folders” GUI – it was ported, with very few changes, from FT10 (along with antiX Cloud). Those 2 scripts, together with zzzfm bookmarks and trash were some of the biggest “selling points” FT10 had (and maybe the web search app, now integrated into Finder). Now they are all integrated into antiX 23, so any future version of FT10 will probably be a bit lighter, if and when I get to it.
              EDIT: I used the original FT10 version for over a year, without finding a single problem… But I’ve not tried to change it that much, since it worked so well. As you noticed, the script does not need to keep running, it basically automates finding all shared folders in the internal network and offers a GUI to login into they (if a login is required).
              If you edit the script, feel free to also add some text on the login screen, stating that login credentials are only required if the shared folder has restricted access. Since, when I created the script I was dead tired of localizing stuff for FT10, I used only images, no text that required localization…

              If you are creating a more “far reaching” script, that does allow to manage (create, etc) SAMBA shared folder, then probably the original “shared folders” code should be integrated into it, so we have all-in-one script. NOTE: I think the GUI that I used to manage Samba shares was available for antiX 19, but not for 21/22, and is available once again for 23…
              I’ve not used Samba shares for almost a year now, my old “server” desktop PC got fried, and I’ve not yet needed to share files between my computers (I needed that feature when I was developing stuff like FT10, etc).

              Once again, sorry I can’t help much right now… I’ll still keep an eye on the forum, on my phone or my netbook, on the following days, and I’ll try to help out when I can…

              EDIT2:
              I have not tested it, but I like your proposal, it sounds simple(ish):

              # kill former instance before starting a new one.
              for i in $(pidof -x antix-my-network-neighbourhood); do [ $i -ne $$ ] && kill -15 $i; done

              P.

              • This reply was modified 2 weeks, 6 days ago by PPC.
              • This reply was modified 2 weeks, 6 days ago by PPC.
              #133356
              Member
              Robin

                creating a more “far reaching” script, that does allow to manage (create, etc) SAMBA shared folder

                antiX samba manager is on it’s way to be completed very soon, I’ll update my git next days. Your script will be called from a button within it, but it can be still be called as a standalone application, if user doesn’t need to share folders himself.

                Once again, sorry I can’t help much right now…

                No problem, back home I’ll see what I can do to make it behave. Obviously it has some quirks when running outside FT10, maybe it behaves if you run it from within, since you never noticed any problems with it.

                Windows is like a submarine. Open a window and serious problems will start.

                #133357
                Member
                Robin

                  @anticapitalista: There is a localisation issue in antiX 23.1 testing: When asked in GUI for sudo password, the password enter dialog is completely untranslated. See screenshot below, it’s from antiX 23.1 runit testing ISO, full, 64 bit, started localised from USB.

                  I’ve checked /usr/share/locale/<lang>/LC_MESSAGES folder for missing .mo files, but gksu.mo and libgksu.mo are present both. When msgunfmt-ing them, the strings from the dialog are not present as msgids. So I guess either the .mo files are outdated (they date from 2003 !? and 2007) and don’t match the gksu binary, or another .mo file is missing.

                  Can this be fixed in antiX 23.1 ? It’s an antiX package providing gksu:

                  $ apt-cache policy gksu
                  gksu:
                    Installiert:           2.1.0antix1
                    Installationskandidat: 2.1.0antix1
                    Versionstabelle:
                   *** 2.1.0antix1 500
                          500 http://ftp.halifax.rwth-aachen.de/mxlinux/packages/antix/bookworm bookworm/main amd64 Packages
                          100 /var/lib/dpkg/status

                  This dialog is something users are confronted with pretty often, I guess, so it should come up localised.

                  Or is merely the German translation missing? Other languages affected also?

                  —-
                  Update: Answer to my question: It is perfectly localised for french. See second screenshot.

                  German .mo file version (libgksu.mo), 2 translatable entries:

                  "Project-Id-Version: GKsu 0.9.14\n"
                  "Report-Msgid-Bugs-To: \n"
                  "PO-Revision-Date: 2003-11-18 21:19-0200\n"
                  "Last-Translator: Sebastian Heinlein <debian@pimpzkru.de>\n"
                  "Language-Team: German <gnome-de@gnome.org>\n"
                  "MIME-Version: 1.0\n"
                  "Content-Type: text/plain; charset=UTF-8\n"
                  "Content-Transfer-Encoding: 8bit\n"

                  French .mo file version (libgksu.mo), 21 translatable entries:

                  "Project-Id-Version: libgksu1.2-1.3.2\n"
                  "Report-Msgid-Bugs-To: \n"
                  "PO-Revision-Date: 2006-09-15 22:45+0200\n"
                  "Last-Translator: Stéphane Raimbault <stephane.raimbault@gmail.com>\n"
                  "Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
                  "MIME-Version: 1.0\n"
                  "Content-Type: text/plain; charset=UTF-8\n"
                  "Content-Transfer-Encoding: 8bit\n"

                  @anticapitalista: Is there a place you can fetch the proper file from? Or should I rather transplant the missing msgid’s from the French version to the German .po file, translate to German and create an updated .mo version from it, I could upload it either here as zip or to somewhere on your git.

                  Windows is like a submarine. Open a window and serious problems will start.

                  #133425
                  Member
                  PPC

                    Or is merely the German translation missing? Other languages affected also?

                    I guess the missing localization strings only affect German- the pt version looks fine to me.

                    P.

                    #133462
                    Member
                    PPC

                      @Robin – bad news. IceWMCC was updated to the gtk version and, for some reason, it can’t be launched while antiXCC is running. My bet would be that the aCC script blocks gtk-dialog from starting another instance, since, if I click the IceWMCC toolbar launcher, if aCC is running, it just jumps to the aCC window.
                      Does this mean we will have to revert the the yad version of IceWMCC??

                      Edit: this is probably a aCC problem. If I launch IceWMCC first and then launch aCC, aCC starts fine… If I launch aCC first, it’s like it takes over gtk-dialong and stops it from opening a different window.

                      P.

                      • This reply was modified 1 week, 5 days ago by PPC.
                      #133543
                      Forum Admin
                      rokytnji

                        Just confirming what PPC said running testing sysvinit,runit,s6 66 , s6 rc release version.

                        Works exactly like mentioned.

                        Sometimes I drive a crooked road to get my mind straight.
                        Not all who Wander are Lost.
                        Motorcycle racing is rocket science.

                        Linux Registered User # 475019
                        How to Search for AntiX solutions to your problems

                        #133593
                        Member
                        Robin

                          If I launch aCC first, it’s like it takes over gtk-dialong and stops it from opening a different window.

                          Will look into it as soon as possible. Maybe this can be helped by assigning a different session id when calling the script. Or did you happen to export the very variable names used already in environment by aCC? This could be a possible reason.

                          Does this mean we will have to revert the the yad version of IceWMCC??

                          Probably not. I guess we can make the gtk-dialog version of IceWMcc work in some way from within antiXcc. There are some means.

                          I guess the missing localization strings only affect German- the pt version looks fine to me.

                          @PPC Yes, this substantiates what I had already had analysed in my update above, 2nd screenshot, fr language, and .mo file extraction, strings are present in other languages. So for some reason merely(?) the German language file is outdated. Still no answer from @anticapitalista whether I should provide an updated version of it or not (I reckon there is somewhere a current file available, but don’t know where to look for it, so I won’t start translating the strings as long not knowing whether this is actually needed).

                          Concerning your antix-my-net… script:
                          The reason your script failed for me, and here I wonder how it can have ever worked for you, is:

                          udevil mount -o vers=1.0 -t cifs smb://Robin@192.168.178.22/Arbeitsordner
                          udevil: denied 90: option 'vers=1.0' is not an allowed option
                          udevil mount -o vers=3.0 -t cifs smb://Robin@192.168.178.22/Arbeitsordner
                          udevil: denied 90: option 'vers=3.0' is not an allowed option

                          Whatever SMB version I specify, none of them is accepted by the mount command. This is an udevil issue. See line 64
                          https://github.com/IgnorantGuru/udevil/blob/master/src/udevil.c
                          Neither vers nor password are allowed options for udevil. So how did this work for you, having both options included in the share mount command in your script?

                          Removed the vers= and password= statement, then it works. Adding the non existing vers=1.0 option to the line again, causes udevil to try to mount the share to the current folder instead of creating a new one in /media/<user>, resulting in permissions error, udevil won’t mount to anywhere but to designated media folders.

                          You can specify password= and also the vers= option only if mounting directly with mount command, not when using udevil.
                          I’ve modified the respective lines in your script to match these restrictions for use in antiXcc and antiX Samba mount manager.
                          New version for testing will be up at my git in some minutes.

                          And then, just found out it’s probably a kernel update causing the commands used in your script to fail. On what kernel did you test? The option -o vers=1.0 seems to be no longer supported by current kernels, even when using mount instead of udevil, to avoid the above issue:

                          $ sudo mount.cifs -v -o vers=1.0,username=Robin //192.168.178.22/Arbeitsordner /media/Robin/testmount/Arbeitsordner
                          Password for Robin@//192.168.178.22/Arbeitsordner: 
                          mount.cifs kernel mount options: ip=192.168.178.22,unc=\\192.168.178.22\Arbeitsordner,vers=1.0,user=Robin,pass=********
                          mount error(95): Operation not supported
                          $

                          while:

                          $ sudo mount.cifs -v -o vers=3.0,username=Robin //192.168.178.22/Arbeitsordner /media/Robin/testmount/Arbeitsordner
                          Password for Robin@//192.168.178.22/Arbeitsordner: 
                          mount.cifs kernel mount options: ip=192.168.178.22,unc=\\192.168.178.22\Arbeitsordner,vers=3.0,user=Robin,pass=********
                          $

                          Mounts fine, but asks for password on console.

                          After investing really much time in investigation for the reason of this, it turned out the support for SMBv1.0 has been been removed from kernel some time ago:
                          https://bugzilla.kernel.org/show_bug.cgi?id=215375#c10
                          https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=76a3c92ec9e0668e4cd0e9ff1782eb68f61a179c

                          Since we have older antiX kernels available, it may work for a while still if you run an older kernel, but it fails silently when running a current kernel.
                          This is why I couldn’t make your script work on antiX 23.1 with most recent antiX kernel:
                          Linux antix1 6.1.60-antix.1-amd64-smp #1 SMP PREEMPT_DYNAMIC Tue Oct 31 01:27:40 EET 2023 x86_64 GNU/Linux

                          But, @anticapitalista: maybe antiX kernels could be compiled with this patch? https://bugzilla.kernel.org/attachment.cgi?id=301473&action=diff
                          This would allow people using older media devices still to connect to them, if manufacturer (as usual) won’t upgrade the firmware to enable SMB v2.x or 3.x support on them…
                          See discussion over here: https://bugzilla.kernel.org/show_bug.cgi?id=215375#c22 and followups.
                          Obviously this patch wasn’t integrated into current default linux kernels: https://bugzilla.kernel.org/show_bug.cgi?id=216682#c14
                          So the question is: Shouldn’t at least antiX have it, to provide compatibility with hardware devices otherwise rendered useless?

                          Windows is like a submarine. Open a window and serious problems will start.

                          #133598
                          Forum Admin
                          anticapitalista

                            @Robin – gksu source is here: https://gitlab.com/antiX-Linux/gksu/-/tree/master?ref_type=heads

                            Philosophers have interpreted the world in many ways; the point is to change it.

                            antiX with runit - leaner and meaner.

                            #133650
                            Member
                            PPC

                              @Robin – Last night, before going to bed I took a look at the IceWMCC script. Disclaimer- I knew 0 about gtk-dialog, when I adapted IceWCC from yad to gtk-dialog…I just edited antiXCC’s script and changed to make it work the way I wanted. Now reviewing the code, this seems to be the cause of the problem, right at the start of my script, I did not change:

                              if [ “$(wmctrl -l | sed -n ‘s/^\(..*\) ..* ‘$”antiX Control Centre”‘/\1/p’)” != “” ]; then
                              wmctrl -F -a $”antiX Control Centre”
                              exit 0
                              fi

                              I’ll have to correct that (you or @anticapitalista can fix that), and also some icons that don’t seem to be part of “normal” antiX 23… so they don’t show up.

                              Changing that to:

                              if [ "$(wmctrl -l | sed -n 's/^\(..*\)  ..* '$"Basic IceWM Settings Manager"'/\1/p')" != "" ]; then
                                wmctrl -F -a $"Basic IceWM Settings Manager"
                                exit 0
                              fi

                              Should solve the problem. Sorry for the inconvinience… I should have inspected antiXCC code, before starting to mess with it to create my script.

                              P.

                              • This reply was modified 1 week, 3 days ago by PPC.
                              #133655
                              Forum Admin
                              anticapitalista

                                @PPC – re icons – please use png ones – thanks

                                Philosophers have interpreted the world in many ways; the point is to change it.

                                antiX with runit - leaner and meaner.

                                #133664
                                Forum Admin
                                anticapitalista

                                  @Robin – Last night, before going to bed I took a look at the IceWMCC script. Disclaimer- I knew 0 about gtk-dialog, when I adapted IceWCC from yad to gtk-dialog…I just edited antiXCC’s script and changed to make it work the way I wanted. Now reviewing the code, this seems to be the cause of the problem, right at the start of my script, I did not change:

                                  if [ “$(wmctrl -l | sed -n ‘s/^\(..*\) ..* ‘$”antiX Control Centre”‘/\1/p’)” != “” ]; then
                                  wmctrl -F -a $”antiX Control Centre”
                                  exit 0
                                  fi

                                  I’ll have to correct that (you or @anticapitalista can fix that), and also some icons that don’t seem to be part of “normal” antiX 23… so they don’t show up.

                                  Changing that to:

                                  if [ "$(wmctrl -l | sed -n 's/^\(..*\)  ..* '$"Basic IceWM Settings Manager"'/\1/p')" != "" ]; then
                                    wmctrl -F -a $"Basic IceWM Settings Manager"
                                    exit 0
                                  fi

                                  Should solve the problem. Sorry for the inconvinience… I should have inspected antiXCC code, before starting to mess with it to create my script.

                                  P.

                                  Yes, that fixes it.

                                  I replaced the svg icons for png ones

                                  Philosophers have interpreted the world in many ways; the point is to change it.

                                  antiX with runit - leaner and meaner.

                                Viewing 15 posts - 406 through 420 (of 468 total)
                                • You must be logged in to reply to this topic.