(solved) unplugdrive.sh

  • This topic has 14 replies, 3 voices, and was last updated Apr 29-2:46 pm by tamix.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #77562
    Forum Admin
    rokytnji

      Did my update today. Mainly google-chrome browser dist-upgrade with a couple of libs.
      Inserted my sd card to grab some pictures.
      Rox FM came up OK with auto mount.
      Grabbed pictures and went to use uplugdrive.sh icon in toolbar. Nothing.

      Try running as user via command line in rox terminal and it now says needs sudo to run.
      Not sure why. Because auto mount and everything else in /usr/local/bin has the same permissions.
      Even rebooted after logging out and in to a different window manager using the F1 key in slimski.
      Still the same behavior.

      harry@biker:~
      $ mount
      sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
      proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
      udev on /dev type devtmpfs (rw,nosuid,relatime,size=8060828k,nr_inodes=2015207,mode=755)
      devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
      tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1622136k,mode=755)
      /dev/sda3 on / type ext4 (rw,noatime,data=ordered)
      tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
      pstore on /sys/fs/pstore type pstore (rw,relatime)
      tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=4255760k)
      /dev/sda2 on /home type ext4 (rw,noatime,data=ordered)
      rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
      cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
      none on /run/user/1000 type tmpfs (rw,relatime,mode=700,uid=1000)
      /dev/sdb1 on /media/harry/USB-DATA type vfat (rw,nosuid,nodev,noexec,noatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,utf8,errors=remount-ro)
      harry@biker:~
      $ unplugdrive.sh
      “unplugdrive” should be run with SUDO.
      harry@biker:~
      $ ls -l /usr/local/bin
      total 2896
      -rwxr-xr-x 1 root root   1801 Jun  3  2014 add-desktop
      -rwxr-xr-x 1 root root  15560 Apr 13  2015 add-key
      -rwxr-xr-x 1 root root  10388 Dec  1  2019 add-start
      -rwxr-xr-x 1 root root   3370 Sep 27  2017 alsa-set-default-card
      -rwxr-xr-x 1 root root    158 Jun 17  2015 amz
      -rwxr-xr-x 1 root root   5611 Jun  3  2020 android-device-usb-connect.sh
      -rwxr-xr-x 1 root root    166 May 10  2014 ansi-bars
      -rwxr-xr-x 1 root root    792 May 10  2014 ansi-colors
      -rwxr-xr-x 1 root root    420 May 10  2014 ansi-tput
      -rwxr-xr-x 1 root root    131 Jun 17  2015 antix
      -rwxr-xr-x 1 root root   1320 Aug 22  2019 antixccgrub.sh
      -rwxr-xr-x 1 root root  21093 Jan 21 08:15 antixcc.sh
      -rwxr-xr-x 1 root root   4123 Sep  9 14:35 antixccslim.sh
      -rwxr-xr-x 1 root root  17792 Jun 23  2020 antiX-cli-cc
      -rwxr-xr-x 1 root root    728 Jun 29  2014 antiX-FileManager.sh
      -rwxr-xr-x 1 root root    276 Apr 20  2014 antiX-paste
      -rwxr-xr-x 1 root root   5442 Oct 12 08:19 antixscreenshot.sh
      -rwxr-xr-x 1 root root  16276 Jan 24  2021 antix-wifi-switch
      -rwxr-xr-x 1 root root  17511 Sep  1 04:49 app-select
      -rwxr-xr-x 1 root root    385 Mar  2  2018 apt-history
      -rwxr-xr-x 1 root root    195 Jan 25  2021 archive-create.sh
      -rwxr-xr-x 1 root root    237 Jan 25  2021 archive-extract.sh
      -rwxr-xr-x 1 root root   1733 Jun 17  2017 automount-antix
      -rwxr-xr-x 1 root root   7153 Aug 12  2017 automount-config
      -rwxr-xr-x 1 root root   7208 Feb  4  2021 autoscale-antix
      -rwxr-xr-x 1 root root  19490 Jun 15  2019 backlight-brightness
      -rwxr-xr-x 1 root root   7141 Oct 30 08:39 block-advert.sh
      -rwxr-xr-x 1 root root    796 Jun  6  2016 boot-log
      -rwxr-xr-x 1 root root   7053 Jun 28  2016 BroadcomStartup
      -rwxr-xr-x 1 root root   1513 Jun 19  2009 burniso
      -rwxr-xr-x 1 root root  28234 Nov 25  2019 chroot-rescue
      -rwxr-xr-x 1 root root  31400 Nov  6  2019 chroot-rescue-scan
      lrwxrwxrwx 1 root root     18 Oct 13 06:42 chroot-rescue-select -> chroot-rescue-scan
      lrwxrwxrwx 1 root root      8 Jan 13  2020 clean-isomount -> isomount
      -rwxr-xr-x 1 root root  86462 Oct 13 06:51 cli-aptiX
      -rwxr-xr-x 1 root root  18039 Sep  1 10:53 cli-installer
      -rwxr-xr-x 1 root root    791 Mar 22  2016 colorview
      -rwxr-xr-x 1 root root   6552 Apr 19  2016 conky-colors
      -rwxr-xr-x 1 root root    367 Jul 10  2012 conkytoggle.sh
      -rwxr-xr-x 1 root root   3257 Feb  2  2014 connectshares
      -rwxr-xr-x 1 root root   2992 Feb  1  2014 connectshares-config
      -rwxr-xr-x 1 root root   9027 Feb  1  2014 connectshares-config.sh
      -rwxr-xr-x 1 root root  14221 Feb  1  2014 connectshares.sh
      -rwxr-xr-x 1 root root    348 Jun 21  2019 connmanctl
      -rwxr-xr-x 1 root root   6049 Jun 15  2019 console-font-select
      -rwxr-xr-x 1 root root  11943 Jun 15  2019 console-width-select
      -rwxr-xr-x 1 root root    113 Jun 17  2015 ddg
      -rwxr-xr-x 1 root root  12058 Oct 23  2019 dd-live-usb
      -rwxr-xr-x 1 root root   3098 Apr  7  2021 desktop-defaults-run
      -rwxr-xr-x 1 root root   4027 Aug 10  2021 desktop-defaults-set
      -rwxr-xr-x 1 root root   2777 Mar 14  2018 desktop-defaults-set-new
      -rwxr-xr-x 1 root root  12711 Aug  4  2019 desktop-menu
      -rwxr-xr-x 1 root root   1264 Jun 13  2015 desktop-menu-places
      -rwxr-xr-x 1 root root  16519 Aug 10  2021 desktop-session
      -rwxr-xr-x 1 root root   1477 Feb 16  2019 desktop-session-exit
      -rwxr-xr-x 1 root root   3449 Dec 17  2020 desktop-session-wallpaper
      -rwxr-xr-x 1 root root   7118 Dec 16  2020 desktop_tool.py
      -rwxr-xr-x 1 root root     53 Sep 25 09:34 detect-init.sh
      lrwxrwxrwx 1 root root      8 Jan 13  2020 dfh -> isomount
      lrwxrwxrwx 1 root root      8 Jan 13  2020 dfh-watch -> isomount
      -rwxr-xr-x 1 root root    136 Jun 17  2015 dict-search
      -rwxr-xr-x 1 root root   2990 Feb  1  2014 disconnectshares
      -rwxr-xr-x 1 root root   5444 Feb  1  2014 disconnectshares.sh
      -rwxr-xr-x 1 root root  43603 Oct 12  2020 droopy
      -rwxr-xr-x 1 root root   6429 Nov  7  2016 droopy.sh
      -rwxr-xr-x 1 root root   2249 Oct 25  2015 ds-mouse
      -rwxr-xr-x 1 root root  10847 Dec  1  2019 ds-mouse.py
      -rwxr-xr-x 1 root root    723 Sep  8  2011 du-excludes
      -rwxr-xr-x 1 root root    264 Oct 10  2013 edit-as-root.sh
      -rwxr-xr-x 1 root root    907 Mar  9  2017 encrypt-antix
      -rwxr-xr-x 1 root root   3625 May 19  2021 env-info
      -rw-r--r-- 1 root root  16338 Jan 25  2021 fancy-prompts.bash
      -rw-r--r-- 1 root root  15841 Jan 25  2021 fancy-prompts.zsh
      -rwxr-xr-x 1 root root   5564 Sep 28 08:27 fast_personal_menu_editor.sh
      -rwxr-xr-x 1 root root   1203 Nov 19  2016 fbxkb-start
      -rwxr-xr-x 1 root root  20528 Sep  8 07:29 findshares
      -rwxr-xr-x 1 root root    192 Apr  7  2021 fstrim-antix
      -rwxr-xr-x 1 root root    173 Jun 17  2015 gf
      -rwxr-xr-x 1 root root    114 Jun 17  2015 gg
      -rwxr-xr-x 1 root root   3049 Dec  3  2015 guess-hwclock
      -rwxr-xr-x 1 root root   4288 Dec 30  2020 icewm-menu-Desktop.sh
      -rwxr-xr-x 1 root root   1106 Sep 20  2019 icewm-menu-drives.sh
      -rwxr-xr-x 1 root root   4415 Sep 27  2019 icewm-menu-recentfiles.sh
      -rwxr-xr-x 1 root root  15253 Sep 28 08:28 icewm-toolbar-icon-manager.sh
      -rwxr-xr-x 1 root root    132 Jun 20  2011 id_version
      -rwxr-xr-x 1 root root    117 Jun 17  2015 imdb
      -rwxr-xr-x 1 root root    420 Jun 17  2015 imdb-disc
      -rwxr-xr-x 1 root root    116 Jun 17  2015 imdbe
      -rwxr-xr-x 1 root root  17795 Apr 28  2021 inxi-gui
      -rwxr-xr-x 1 root root  62019 Oct 23  2019 isomount
      lrwxrwxrwx 1 root root      8 Jan 13  2020 isoumount -> isomount
      -rwxr-xr-x 1 root root   5515 Mar 31  2019 jwm-icon-paths
      -rwxr-xr-x 1 root root    625 Mar 31  2019 jwm-set-theme
      -rwxr-xr-x 1 root root     93 Mar 30  2019 jwm-update-components
      -rwxr-xr-x 1 root root    200 Mar 13  2018 lh-mouse
      -rwxr-xr-x 1 root root    194 Oct 11  2014 li
      -rwxr-xr-x 1 root root  44427 Oct 23  2019 live-kernel-updater
      -rwxr-xr-x 1 root root  27528 Mar  9  2020 live-remaster
      -rwxr-xr-x 1 root root 122255 Dec 19  2020 live-usb-maker
      -rwxr-xr-x 1 root root   9977 Sep 16 12:58 login-config-antix
      -rwxr-xr-x 1 root root   8547 Aug 23 05:56 menu_manager_applications.sh
      -rwxr-xr-x 1 root root  22495 Aug 23 05:56 menu_manager_personal.sh
      -rwxr-xr-x 1 root root  14525 Aug 23 05:56 menu_manager.sh
      -rwxr-xr-x 1 root root   2510 Apr 14  2021 mountbox.sh
      -rwxr-xr-x 1 root root    382 Apr  7  2016 mount-media
      -rwxr-xr-x 1 root root    149 Jul 28  2017 mpv
      -rwxr-xr-x 1 root root    129 Jul 15  2019 mx
      -rwxr-xr-x 1 root root    185 Oct 25  2019 my_installed_debs
      -rwxr-xr-x 1 root root   1247 Apr 18  2014 netpro
      -rwxr-xr-x 1 root root    431 Jan  8  2021 network-check-antix
      -rwxr-xr-x 1 root root  14352 Jan  8  2021 network-readiness-state
      -rwxr-xr-x 1 root root   8382 Oct 26  2019 nuke-modules
      -rwxr-xr-x 1 root root   2654 Sep 11  2013 open-with-menu.sh
      -rwxr-xr-x 1 root root    574 Mar 22  2016 paletterx
      -rwxr-xr-x 1 root root    460 Jul 10  2012 paneltoggle.sh
      -rwxr-xr-x 1 root root   7368 Nov 13  2019 persist-config
      -rwxr-xr-x 1 root root    118 Oct 22  2016 persist-enabled
      -rwxr-xr-x 1 root root  30642 Jun  3  2020 persist-makefs
      -rwxr-xr-x 1 root root  10353 Mar  9  2020 persist-save
      -rwxr-xr-x 1 root root 984018 Dec 19 21:11 pinxi
      -rwxr-xr-x 1 root root 196070 Nov 18 12:13 pmrp
      -rwxr-xr-x 1 root root   2164 Sep  9  2017 process-reaper
      -rwxr-xr-x 1 root root   1047 Nov  3  2014 psg
      -rwxr-xr-x 1 root root   8351 May  3  2011 ps_initrd.sh
      -rwxr-xr-x 1 root root  23432 May 11  2020 ps_mem.py
      -rwxr-xr-x 1 root root     83 Oct  7  2017 rc-conf-wrapper.sh
      -rwxr-xr-x 1 root root    424 Sep 23  2019 recently-used-delete.sh
      -rwxr-xr-x 1 root root    607 Sep 23  2019 recently-used-settings.sh
      -rwxr-xr-x 1 root root   1377 Jun  3  2014 remove-desktop
      -rwxr-xr-x 1 root root    200 Mar 13  2018 rh-mouse
      -rwxr-xr-x 1 root root    394 Mar  3  2020 rox-as-root.sh
      -rwxr-xr-x 1 root root     27 Aug  8  2010 roxuri
      -rwxr-xr-x 1 root root   1499 Sep 26  2019 Rox-Wallpaper
      -rwxr-xr-x 1 root root    392 Dec 31  2011 run-mksquashfs
      -rwxr-xr-x 1 root root  11218 Apr  2  2019 screenlight-menu.sh
      -rwxr-xr-x 1 root root   8481 Apr  2  2019 screenlight.sh
      -rwxr-xr-x 1 root root    985 Apr 26  2014 search-and-replace.py
      -rwxr-xr-x 1 root root   6677 Jun 17  2015 search-bar
      -rwxr-xr-x 1 root root    743 Jun 17  2015 search-bar-icon
      -rwxr-xr-x 1 root root   6904 Sep 12  2019 set-desktop-theme
      -rwxr-xr-x 1 root root   4991 May  3  2021 set-dpi
      -rwxr-xr-x 1 root root   6798 Dec  1  2019 set-screen-blank
      -rwxr-xr-x 1 root root   2720 Sep  7  2019 set_time-and_date.sh
      lrwxrwxrwx 1 root root      8 Jan 13  2020 show-isomount -> isomount
      -rwxr-xr-x 1 root root    896 Oct 26  2011 slim-login
      -rwxr-xr-x 1 root root    125 Oct 25  2019 sort_by_size
      -rwxr-xr-x 1 root root   3094 Oct  2  2017 splash-select
      lrwxrwxrwx 1 root root      8 Jan 13  2020 sqmount -> isomount
      lrwxrwxrwx 1 root root      8 Jan 13  2020 squmount -> isomount
      -rwxr-xr-x 1 root root   1620 Jan 28  2015 start-t
      -rwxr-xr-x 1 root root    121 Jun 17  2015 stp
      -rwxr-xr-x 1 root root   5612 Oct  4  2018 streamlight-gui-launcher.sh
      -rwxr-xr-x 1 root root  11987 Oct  4  2018 streamlight.sh
      -rwxr-xr-x 1 root root    345 Jun 14  2015 time-x-start
      -rwxr-xr-x 1 root root    582 Mar 15  2018 tinyradio
      -rwxr-xr-x 1 root root   2019 Sep 25  2016 toram-eject
      -rwxr-xr-x 1 root root    746 Apr  7  2016 umount-media
      -rwxr-xr-x 1 root root  23112 Apr 11  2021 unpack-initrd
      -rwxr-xr-x 1 root root  19992 Sep 28 08:28 unplugdrive.sh
      -rwxr-xr-x 1 root root    512 Mar 31  2019 update-jwm-themes.sh
      -rwxr-xr-x 1 root root   9663 Jan 30  2020 update-Origins-Pattern
      -rwxr-xr-x 1 root root   5183 Jul 15  2017 urxvt-style
      lrwxrwxrwx 1 root root      8 Jan 13  2020 usbmount -> isomount
      lrwxrwxrwx 1 root root      8 Jan 13  2020 usbumount -> isomount
      -rwxr-xr-x 1 root root  20601 Jun 14  2020 wallpaper.py
      -rwxr-xr-x 1 root root  25012 Jun 28  2013 wgetpaste
      -rwxr-xr-x 1 root root    127 Jun 17  2015 wiki
      -rwxr-xr-x 1 root root   3110 Apr 29  2014 wingrid-bottomleft.sh
      -rwxr-xr-x 1 root root   3120 Apr 29  2014 wingrid-bottomright.sh
      -rwxr-xr-x 1 root root   3339 Apr 29  2014 wingrid-bottom.sh
      -rwxr-xr-x 1 root root   3531 Jul 24  2019 wingrid-center.sh
      -rwxr-xr-x 1 root root   1347 Apr 29  2014 wingrid-close.sh
      -rwxr-xr-x 1 root root   5590 Jul 24  2019 wingrid-grow.sh
      -rwxr-xr-x 1 root root   3279 Apr 29  2014 wingrid-left.sh
      -rwxr-xr-x 1 root root   1388 Apr 29  2014 wingrid-maximize.sh
      -rwxr-xr-x 1 root root   3289 Apr 29  2014 wingrid-right.sh
      -rwxr-xr-x 1 root root   4905 Jul 24  2019 wingrid-shrink.sh
      -rwxr-xr-x 1 root root   3077 Apr 29  2014 wingrid-topleft.sh
      -rwxr-xr-x 1 root root   3180 Apr 29  2014 wingrid-topright.sh
      -rwxr-xr-x 1 root root   3305 Apr 29  2014 wingrid-top.sh
      -rwxr-xr-x 1 root root    110 Jun 16  2013 xmms
      -rwxr-xr-x 1 root root     43 Dec 22  2015 yad
      -rwxr-xr-x 1 root root   1728 Feb  8  2021 yad-autoremove
      -rwxr-xr-x 1 root root   1536 Jan 11  2021 yad-calendar
      -rwxr-xr-x 1 root root     41 Jun 21  2019 yad-color
      -rwxr-xr-x 1 root root    176 Jun 20  2019 yad-icons
      -rwxr-xr-x 1 root root   5716 Sep  8  2019 yad-pmrp
      -rwxr-xr-x 1 root root   1848 May 31  2021 yad-updater
      -rwxr-xr-x 1 root root    319 Sep  7  2019 yad-volume
      -rwxr-xr-x 1 root root   4554 Jul 17  2015 zram

      Edit: I forgot to mention. I subbed out a usb stick to test after I rebooted. I know how to use umount. Just wondering why sudo is involved all of a sudden.

      • This topic was modified 2 years, 4 months ago by rokytnji.
      • This topic was modified 2 years, 4 months ago by rokytnji.
      • This topic was modified 2 years, 4 months ago by rokytnji.

      Sometimes I drive a crooked road to get my mind straight.
      I don't suffer from insanity. I enjoy every minute off it.
      Motorcycle racing is rocket science.

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

      #77567
      Forum Admin
      rokytnji

        Other info

        harry@biker:~
        $ inxi -zv7
        System:
          Kernel: 4.9.193-antix.1-amd64-smp x86_64 bits: 64 compiler: gcc v: 8.3.0 
          Desktop: IceWM 2.9.5 dm: SLiM 1.3.6 
          Distro: antiX-19_x64-full Marielle Franco 16 October 2019 
          base: Debian GNU/Linux 10 (buster) 
        Machine:
          Type: Laptop System: LENOVO product: 2347DS2 v: ThinkPad T430 
          serial: <filter> Chassis: type: 10 serial: <filter> 
          Mobo: LENOVO model: 2347DS2 serial: <filter> UEFI-[Legacy]: LENOVO 
          v: G1ET41WW (1.16 ) date: 05/25/2012 
        Battery:
          ID-1: BAT0 charge: 10.6 Wh (98.1%) condition: 10.8/56.2 Wh (19.2%) 
          volts: 12.0 min: 10.8 model: SANYO 45N1001 type: Li-ion serial: <filter> 
          status: Unknown 
        Memory:
          RAM: total: 15.47 GiB used: 1.09 GiB (7.1%) 
          RAM Report: 
          permissions: Unable to run dmidecode. Root privileges required. 
        CPU:
          Info: Dual Core model: Intel Core i5-3320M bits: 64 type: MT MCP 
          arch: Ivy Bridge rev: 9 cache: L2: 3 MiB bogomips: 20751 
          Speed: 1749 MHz min/max: 1200/3300 MHz Core speeds (MHz): 1: 1885 2: 2144 
          3: 2524 4: 1468 
          Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov 
          constant_tsc cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept erms est f16c 
          flexpriority flush_l1d fpu fsgsbase fxsr ht ibpb ibrs ida kaiser lahf_lm 
          lm mca mce md_clear mmx monitor msr mtrr nonstop_tsc nopl nx pae pat pbe 
          pcid pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 pts rdrand rdtscp 
          rep_good sep smep smx ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall 
          tm tm2 tpr_shadow tsc tsc_deadline_timer vme vmx vnmi vpid x2apic xsave 
          xsaveopt xtopology xtpr 
        Graphics:
          Device-1: Intel 3rd Gen Core processor Graphics vendor: Lenovo 
          driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300 
          Device-2: Acer type: USB driver: uvcvideo bus-ID: 1-1.6:3 
          chip-ID: 5986:02d5 class-ID: 0e02 
          Display: server: X.Org 1.20.4 driver: loaded: modesetting 
          unloaded: fbdev,vesa resolution: 1600x900~60Hz s-dpi: 96 
          OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile v: 4.2 Mesa 18.3.6 
          compat-v: 3.0 direct render: Yes 
        Audio:
          Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Lenovo 
          driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20 
          class-ID: 0403 
          Sound Server-1: ALSA v: k4.9.193-antix.1-amd64-smp running: yes 
          Sound Server-2: PulseAudio v: 12.2 running: no 
        Network:
          Device-1: Intel 82579LM Gigabit Network vendor: Lenovo driver: e1000e 
          v: 3.2.6-k port: 5080 bus-ID: 00:19.0 chip-ID: 8086:1502 class-ID: 0200 
          IF: eth0 state: down mac: <filter> 
          Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi 
          v: kernel port: efa0 bus-ID: 03:00.0 chip-ID: 8086:0085 class-ID: 0280 
          IF: wlan0 state: up mac: <filter> 
          IP v4: <filter> type: noprefixroute scope: global broadcast: <filter> 
          IP v6: <filter> scope: link 
          WAN IP: <filter> 
        Bluetooth:
          Message: No bluetooth data found. 
        Logical:
          Message: No logical block device data found. 
        RAID:
          Message: No RAID data found. 
        Drives:
          Local Storage: total: 465.76 GiB used: 54.24 GiB (11.6%) 
          ID-1: /dev/sda vendor: Seagate model: ST500LT012-1DG142 size: 465.76 GiB 
          speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter> rev: YAM1 scheme: MBR 
          Optical-1: /dev/sr0 vendor: Optiarc model: DVD RW AD-7740H rev: 1.S1 
          dev-links: cdrom,cdrw,dvd,dvdrw 
          Features: speed: 24 multisession: yes audio: yes dvd: yes 
          rw: cd-r,cd-rw,dvd-r,dvd-ram state: running 
        Partition:
          ID-1: / size: 19.1 GiB used: 5.4 GiB (28.3%) fs: ext4 dev: /dev/sda3 
          label: rootantiX19 uuid: abdba333-2fb3-456f-842f-bd0539f4b1ca 
          ID-2: /home size: 433.48 GiB used: 48.84 GiB (11.3%) fs: ext4 
          dev: /dev/sda2 label: homeantiX uuid: d11c1f27-c656-4052-9d2d-d09aa9246d53 
        Swap:
          ID-1: swap-1 type: partition size: 4.82 GiB used: 0 KiB (0.0%) 
          priority: -1 dev: /dev/sda1 label: N/A 
          uuid: f18b2739-9fc4-43c1-a3a5-0728d7114e8d 
        Unmounted:
          Message: No unmounted partitions found. 
        USB:
          Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 3 rev: 2.0 
          speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
          Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0 
          speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900 
          Device-1: 1-1.6:3 info: Acer type: Video driver: uvcvideo interfaces: 2 
          rev: 2.0 speed: 480 Mb/s power: 200mA chip-ID: 5986:02d5 class-ID: 0e02 
          Hub-3: 2-0:1 info: Full speed (or root) Hub ports: 3 rev: 2.0 
          speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
          Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 8 rev: 2.0 
          speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900 
          Hub-5: 3-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
          speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
          Hub-6: 4-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.0 
          speed: 5 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 
        Sensors:
          System Temperatures: cpu: 46.0 C mobo: N/A 
          Fan Speeds (RPM): cpu: 3211 
        Info:
          Processes: 181 Uptime: 43m wakeups: 3 Init: SysVinit v: 2.93 runlevel: 5 
          default: 5 Compilers: gcc: 8.3.0 alt: 8 Packages: apt: 1786 Shell: Bash 
          v: 5.0.3 running-in: roxterm inxi: 3.3.06 
        harry@biker:~
        $ sudo apt -f install
        [sudo] password for harry: 
        Reading package lists... Done
        Building dependency tree       
        Reading state information... Done
        0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
        

        Sometimes I drive a crooked road to get my mind straight.
        I don't suffer from insanity. I enjoy every minute off it.
        Motorcycle racing is rocket science.

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

        #77571
        Forum Admin
        rokytnji

          So booted up my antiX 19 chromebook. Dist-upgraded like on the ibm laptop. 4 upgrades with 3 libs and google-chrome.

          Getting the same sudo behavior in it also. Auto mount was OK. So not a isolated incident.

          harry@biker:~
          $ inxi -b
          System:
            Host: biker Kernel: 4.9.212-antix.1-amd64-smp x86_64 bits: 64 
            Desktop: IceWM 2.9.5 
            Distro: antiX-19.2_x64-full Hannie Schaft 27 March 2020 
          Machine:
            Type: Desktop System: Google product: Parrot v: 1.0 
            serial: <superuser required> 
            Mobo: Google model: Parrot v: 1.0 serial: <superuser required> 
            BIOS: coreboot v: 4.0-6588-g4acd8ea-dirty date: 09/04/2014 
          Battery:
            ID-1: BATX charge: 24.2 Wh (100.0%) condition: 24.2/37.0 Wh (65.5%) 
          CPU:
            Info: Dual Core Intel Celeron 1007U [MCP] speed: 1029 MHz 
            min/max: 800/1500 MHz 
          Graphics:
            Device-1: Intel 3rd Gen Core processor Graphics driver: i915 v: kernel 
            Device-2: Chicony type: USB driver: uvcvideo 
            Display: x11 server: X.Org 1.20.4 driver: loaded: modesetting 
            unloaded: fbdev,vesa resolution: 1366x768~60Hz 
            OpenGL: renderer: Mesa DRI Intel Ivybridge Mobile v: 4.2 Mesa 18.3.6 
          Network:
            Device-1: Qualcomm Atheros AR9462 Wireless Network Adapter driver: ath9k 
            Device-2: Broadcom Limited NetLink BCM57785 Gigabit Ethernet PCIe 
            driver: N/A 
          Drives:
            Local Storage: total: 16.78 GiB used: 8.11 GiB (48.4%) 
          Info:
            Processes: 173 Uptime: 11m Memory: 3.8 GiB used: 1.18 GiB (30.9%) 
            Shell: Bash inxi: 3.3.06 
          harry@biker:~
          $ lusb
          bash: lusb: command not found
          harry@biker:~
          $ lsusb
          Bus 002 Device 003: ID 0951:1607 Kingston Technology DataTraveler 100
          Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
          Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
          Bus 001 Device 004: ID 04f2:b336 Chicony Electronics Co., Ltd 
          Bus 001 Device 005: ID 0489:e04e Foxconn / Hon Hai 
          Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
          Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
          harry@biker:~
          $ sudo unplugdrive.sh
          harry@biker:~
          $ 
          

          Then the yad window will pop up.

          Sometimes I drive a crooked road to get my mind straight.
          I don't suffer from insanity. I enjoy every minute off it.
          Motorcycle racing is rocket science.

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

          #77588
          Member
          Robin

            Good morning rokytnji,

            most lilkely this is not a question of file permissions.

            Please let me know the unplugdrive version number shown by the command
            unplugdrive -h
            on console. There exist some older versions of unplugdrive running sudoed only. Maybe unplugdrive has got downgraded for some strange reason by the recent system update to one of the sudo-only versions.

            Unplugdrive originally had to be modified to run sudoed due to some heavy bugs happening when it ran non sudoed, endangering users equipment to get damaged beyond repair, which could not get cured in any other way besides running the script sudoed. The main problem was: without sudo unnoticable by user it didn’t reliably perform the expected actions needed to allow user safely unplug his drives connected and mounted via USB, since the needed helper programs for these tasks need sudo permissions. Somewhere here in board is living a long thread about all the details of bugfixes of unplugdrive from last year, you’ll find all the answers within it.

            In the end Xecure has written a special patch for the helper programm pumount to make unplugdrive work reliably also in non-sudeoed mode, so it was possible to create the recent unplugdrive version for antiX 21 understanding both, sudo and non-sudo mode. This effort was done since antiX developers prefered not to have scripts run sudoed by default as long there is a chance to have it without this.

            So I wonder, what has happened now. Single thing (besides of unplugdrive itself being downgraded as explained above) I could imagine is, that pumount was now updated back to an incompatible debian version again by the last antiX updates instead of the specially crafted version Xecure had created for antiX 21. Recent Unplugdrive 0.93b either can run with the Xecure patched version of pumount, or with default debian version of pumount in sudo mode. Xecure advocated for not implementing a pumount version check in unplugdrive code, since he put forward he would make sure the correct version of pumount would always be installed along with unplugdrive by the dependencies he’d set in its installer package.

            Maybe a
            pumount --version
            on console brings some light in this matter. Please post its output also.

            (This also is the reason for which the antiX 21 version of unplugdrive can’t run in antiX 19 or below in non sudoed mode, since the special crafted Xecure version of pumount wasn’t backported. In these antiX versions all the completely bugfixed versions of unplugdrive need sudo, or they will fail to completely prepare the device for being unplugged. But I beleive unplugdrive was never updated to the bugfixed ones on the older antiX by the package maintainers. In case this should have been done now, there need to be applied some system settings I described in detail in the script head of the versions concerned, and also in the other thread I mentioned, to make it run from desktop task bar.)

            Finally there is a slight chance that the way how unplugdrive internally makes use of the sudo command to protect all commands, executed by itself, which don’t really need this, from ever being run with root privileges, has been broken by some recent environment modifications in antiX or debian. But I doubt this, the conditions for this scenary would be very strange, and they would have broken many other programms and scripts also, so we’d probably have read about such a general issue already.

            Unfortunately right now my PCs suffer from some hardware and update (drivers) issues still, so I can’t check this in detail myself. So it will probably take some time until I can fix it. Maybe @Xecure could step in here and check what’s going on actually. Also he’s the one who knows how to adjust and set all the needed dependencies in the installer packages to make unplugdrive run correctly without sudo.

            —-
            Update: Most probably you’ve got an older unplugdrive version, since the string when starting it from console should run differently in most recent version:

            You have found in your console output:
            “unplugdrive” should be run with SUDO.

            while when running the most recent unplugdrive versions (0.93, 0.93a or 0.93b) this line should read instead:
            “unplugdrive” can also be run with SUDO for utilising different methods while processing.

            This is a clear indicator you have an older unplugdrive installed, how ever this could have happened.

            The 0.93b version for antiX 21 you’ll find at gitlab for download, but when manually replacing it in your system you’ll have to make absolutely sure you also have installed the pumount version Xecure has specially crafted to handle the needed tasks properly without sudo, otherwise you’ll run the risk of damaging hardware under some conditions without even noticing the proper execution failed.

            On antiX 19 and below the unplugdrive version 0.90 is the most recent one, extensively tested on antiX 19 and without need of the special pumount version mentioned. But it needs sudo, so the system settings are to be modified as described in its header:

            # If user is expected to be able to start unplugdrive without being asked for entering his sudo password, it is necessary to add unplugdrive to the /etc/sudoers.d file with the “NOPASSWORD” option from ver. 0.82c and above.
            # System settings referring to unplugdrive need to get supplemented by sudo preceding unplugdrive from ver. 0.82c and above. If etc/sudoers.d/antixers is modified at the same time, user won’t notice any difference of operation compared to previous version 0.82.
            # Additionally an alias like “alias unplugdrive=’sudo unplugdrive.sh'” and/or “alias unplugdrive.sh=’sudo unplugdrive.sh'” should be added to system settings for user convenience, from ver 0.82c and above.

            This 0.90 version contains all bugfixes to prevent hardware damage, and comes with most of the new features and the design of the final antiX 21 version already. So it is probably best choice for antiX 19 and below. But it has a different code base than the antiX 21 unplugdrive still, since for the antiX 21 version Xecure has done some extensive performance improvements last minute which speed up the script execution. (Great work he did, by the way.) As said, this 0.90 version doesn’t need the special pumount, so you can use it safely on antiX 19, only make sure to set up the settings for execution with sudo correctly on your system, as described.

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

            #77609
            Forum Admin
            rokytnji
              harry@biker:~
              $ unplugdrive -h
              bash: unplugdrive: command not found
              harry@biker:~
              $ sudo unplugdrive -h
              [sudo] password for harry: 
              sudo: unplugdrive: command not found
              harry@biker:~
              $ pumount --version
              0.9.23
              harry@biker:~
              $ cd  /usr/local/bin
              harry@biker:/usr/local/bin
              $ sudo cat unplugdrivedrive.sh
              cat: unplugdrivedrive.sh: No such file or directory
              harry@biker:/usr/local/bin
              $ sudo cat unplugdrive.sh
              #!/bin/bash
              # unplugdrive.sh
              #
              # Enables unmounting prior to unplugging removable storage
              # Allows simultaneous selection of multiple drives
              # Unmounts all mounted partitions on nominated drive(s)
              # Removes mountpoints
              #
              # If user is expected to be able to start unplugdrive without being asked for entering his sudo password, it is necessary to add unplugdrive to the /etc/sudoers.d file with the "NOPASSWORD" option from ver. 0.82c and above.
              # System settings referring to unplugdrive need to get supplemented by sudo preceding unplugdrive from ver. 0.82c and above. If etc/sudoers.d/antixers is modified at the same time, user won't notice any difference of operation compared to precvious version 0.82.
              # Additionally an alias like "alias unplugdrive='sudo unplugdrive.sh'" and/or "alias unplugdrive.sh='sudo unplugdrive.sh'" should be added to system settings for user convenience, from ver 0.82c and above.
              #
              # Requires yad and pmount to be installed.
              # Requires /etc/udev/rules.d/99-usbstorage.unused to be renamed 99-usbstorage
              # bobc 12/28/19 added safemode, default FALSE, to avoid confirmation dialogs
              # ppc 20/11/2020 - changed some design, making the dialog windows seem more "inbuit" with the OS, added time out to warning messages, and a title to the windows... cleaned up a bit the selection dialog so it's more multi-lingual...
              # Robin.antiX 04/14/2021 new feature: debug mode structure added for easier testing.
              # Robin.antiX 04/14/2021 bugfix: script did not unmount drives mounted to multiple mountpoints correctly, reporting to user it was safe to unplug while device was still mounted. First fixings by streamlining the processing.
              # Robin.antiX 04/14/2021 bugfix: script did not unmount drives containing underline character "_" in mountpoint (happened always when parition-lable contained this character); fixed by removing seperator replacement and added different IFS instead.
              # Robin.antiX 04/18/2021 bugfix: script did failed unmounting any usb drives not visable to df command, fixed by adding -a option.
              # Robin.antiX 04/18/2021 bugfix: when more than 2 devices were to be unmounted lower checkboxes not accessible when using classical 3-button mouse. Slider at right side without function, so fixed by deriving window hight from number of drives/mountpoints displayed.
              # Robin.antiX 04/18/2021 GUI behaviour: added -center to yad dialogs to prevent script windows to pop up in random, unforseeable places somewhere on screen. Moreover white borderless windows randomly scattered on white background from other open documents, resulting in text messages hiding within other text.
              # Robin.antiX 04/18/2021 new features: commandline switches for help, safemode, decorations and debugging. Added taskbar icon in order to prevent yad from using its erlenmeyer flask.
              # Robin.antiX 04/18/2021 bugfix: wrong entries in drivelist replaced (should have been TRUE/FALSE instead of position number for initialising checkboxes correctly)
              # Robin.antiX 04/20/2021 bugfix: check for remaining devices, did still not reliably detect leftover mountpoints.
              # Robin.antiX 04/20/2021 bugfix: deriving amount of time needed for sync from system info instead of fixed value; moreover before the delay window was not closing after sync due to “$!” mismatch of yad pids.
              # Robin.antiX 05/04/2021 new feature: "centred" optional for users preferring opening windows near mouse pointer. Additional command line option: -c or --centred.
              # Robin.antiX 05/06/2021 bugfix: replaced "pumount" command by "umount" Pumount has proven unreliable in dealing with partitions mounted on multiple mount points. Other mount points are unmounted than requested, causing the unmounting process for the next mountpoint of the partition to fail. Drawback: User will need to enter sudo password now.
              # fixme: devices mounted to mountpoints containing blank characters still don't unmount properly.
              # fixme: mechanical USB hdds not spun down after unmounting, so it is not safe to unplug them when script tells user it was.
              ### Please Note: text strings for debug output dont't need to get marked for translation.
              # preliminaries
              title=$"Unplug USB device"
              version="0.82c"
              txt_version=$"Version "$version
              TEXTDOMAINDIR=/usr/share/locale
              TEXTDOMAIN=unplugdrive
              decorations="--undecorated"
              centred=""
              flag_safemode="FALSE"
              icon_taskbar="/usr/share/icons/numix-square-antix/48x48/devices/usbpendrive_unmount.png"
              declare -a mountpointlist
              #TEMPFILE=/tmp/unpluglist    # no longer needed
              removablelist=""
              removablenow=""
              summarylist=""
              drivenow=""
              driveprevious=""
              drivelist=""
              deviceslist=()
              umountfailurelist=()
              flag_debugmode=0
              flag_dryrun=0
              flag_umounterror=0
              CHR_0x0A="$(printf '\nx')"; CHR_0x0A=${CHR_0x0A%x}		# create special seperator
              true_user=$SUDO_USER
              # check for commandline options
              txt_cline="$*"
              while [[ $# -gt 0 ]]
              do
                opt_cline="$1"
                case $opt_cline in
                  -h|--help)	      echo ""
                                    echo $"  Unplugdrive" "($txt_version)"
                                    echo ""
                                    echo -e $"  GUI tool for safely unplugging removable USB devices."
                                    echo ""
                                    echo $"  Usage: sudo unplugdrive.sh [options]"
                                    echo ""
                                    echo $"  Options:"
                                    echo -e $"\t-h or --help\t\tdisplays this help text"
                                    echo -e $"\t-s or --safe\t\truns script in safe mode,\n\t            \t\tdisplaying some extra dialogs"
                                    echo -e $"\t-d or --decorated\tuses window decorations"
                                    echo -e $"\t-c or --centred\t\topen dialogs centred"
                                    echo -e $"\t-g or --debug\t\tenable debug output (terminal)"
                                    echo -e $"\t-p or --pretend\t\tdry run, don't actually un-\n\t            \t\tmount drives (for debugging)"
                                    echo ""
                                    echo -e $"  Questions, Suggestions and Bugreporting please to:"
                                    echo -e "\t<forum.antiXlinux.com>"
                                    echo -e ""
                                    echo -e "  Copyright 2011, 2012-2018 SamK, anticapitalista"		# entry needed to comply with EU legislation
                                    echo -e "  Copyright 2019, 2020, 2021 the antiX comunity"# entry needed to comply with EU legislation
                                    echo -e ""						# This GPL text may not get translated. See gnu.org for details.
                                    echo -e "  This program is free software: you can redistribute it and/or"
                                    echo -e "  modify it under the terms of the GNU General Public License as"
                                    echo -e "  published by the Free Software Foundation, either version 3 of"
                                    echo -e "  the License, or (at your option) any later version."
                                    echo ""
                                    echo -e "  This program is distributed in the hope that it will be useful,"
                                    echo -e "  but WITHOUT ANY WARRANTY; without even the implied warranty of"
                                    echo -e "  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the"
                                    echo -e "  GNU General Public License for more details."
                                    echo ""
                                    echo -e "  You should have received a copy of the GNU General Public"
                                    echo -e "  License along with this program.  If not, see "
                                    echo -e "  \t<http://www.gnu.org/licenses/>."
                                    echo ""
                                    exit 0;;
                  -d|--decorated)   decorations=""
                                    shift;;
                  -c|--centred)     centred="--center"
                                    shift;;                      
                  -s|--safe)        flag_safemode="TRUE"
                                    shift;;
                  -g|--debug)       flag_debugmode=1
                                    shift;;
                  -p|--pretend)     flag_dryrun=1
                                    shift;;                      
              	 *)               echo -e $"Invalid command line argument. Please call\nunplugdrive -h or --help for usage instructions."
              					  exit 1
                                    shift;;
                esac
              done
              [ $flag_debugmode == 1 ] && echo -e "Version:\t$version\nDebug mode: on""\n$txt_cline\nsafemode:\t$flag_safemode\ndecorations:\t$decorations\ncentred:\t$centred\ndryrun (pretend):\t$flag_dryrun\nTrue user:\t$true_user\nexecuted by:\t<code>whoami</code>"
              # check whether unplugdrive is run with sudo by normal user.
              if [ <code>whoami</code> != "root" ]; then
              	if [ "$true_user" != "root" ]; then echo "“unplugdrive” should be run with SUDO." && exit 1; else echo "“unplugdrive” should not be run by root, please use SUDO being normal user." && exit 1; fi
              else
              	if [ "$true_user" == "root" ] || [ "$true_user" == "" ]; then echo "“unplugdrive” should not be run by root, please use SUDO being normal user." && exit 1; fi
              fi
              #check for needed helper programs etc.:
              [ ! $(command -v yad) ] && echo $"\nˮyadˮ is not installed.\n   --> Please install ˮyadˮ before executing this script.\n" && exit 1
              [ -e icon_taskbar ] && echo $"Taskbar icon $icon_taskbar not found."
              # preparing cleanup on leaving
              function cleanup {
              [ -e $TEMPFILE ] && rm -f $TEMPFILE
              # echo "mischief managed!"
              return 0
              }
              trap 'cleanup && exit 1' SIGINT
              # prepare safemode message
              function safemode {
              if [ "$flag_safemode" = "TRUE" ]; then
                sudo -u $true_user -- yad --title="$title" --fixed $centred --timeout=3 --mouse $decorations \
                    --window-icon="$icon_taskbar" \
                    --text=$"<b>Aborting</b> on user request\n<b>without unmounting.</b>" \
                    --no-buttons
                buttonselect=$?
                [ $buttonselect == 252 ] || [ $buttonselect == 255 ] && buttonselect=1
                [ $buttonselect == 70 ] && buttonselect=1
              fi
              return 0
              }
              # 1.) Preparations for user dialog:
              #------------------------------
              # Collect details of each removable device that has at least one mounted partition.
              # This is the base list for processing
              discovered=$(sudo -u $true_user -- pmount|grep /dev/|sort|cut -d' ' -f 1,2,3)
              # Create a raw list of all removable devices excluding CD/DVD, containing each removable drive, mounted partition and mountpoint.
              orig_IFS=$IFS									# store original field seperator
              IFS="$CHR_0x0A"									# modify field seperator
              [ $flag_debugmode == 1 ] && echo "1.1.) raw list (\$discovered): "
              for item in $discovered;do
                 [ $flag_debugmode == 1 ] && echo -e "removable device discovered:\t$item"
                 if [[ ! $item = /dev/sr* ]];then
                   detectedlist=$(echo -e "$detectedlist\n$item")
                 fi
              done
              # Derive a tailored "removablelist" from first "detectedlist", stripped of all unneccessary string elements. Only names of devices and mountpoints are left.
              # This list is informational only, for display of mounted partitions in yad dialog!
              [ $flag_debugmode == 1 ] && echo "1.2.) tailored list for display purposes (\$removablenow):"
              for item in $detectedlist;do
              		removablenow=$(echo $item | cut -c 6- | sed 's:/.*/:/:' | sed 's/[/]//g')
              		[ $flag_debugmode == 1 ] && echo -e "removablenow item:\t$removablenow"
                 removablelist="$removablelist$removablenow\n"
              done
              # Derive another tailored "drivelist" from first "detectedlist", stripped of all string elements except for devicenames. Count mountpoints and unique devices.
              # This list is functional, devicename entries are used later for looking up of devices marked by user in yad dialog for unmount.
              [ $flag_debugmode == 1 ] && echo "1.3.) second tailored list for lookup of devices (\$drivelist):"
              position=0;drnumber=0
              for item in $detectedlist;do
                 drivenow=$(echo $item|cut -d' ' -f 1|cut -c 6-8)
                 [ $flag_debugmode == 1 ] && echo -e "drivelist item:\t$drivenow"
                 if [ "$drivenow" != "$driveprevious" ];then
                    drivelist="$drivelist FALSE $drivenow"					# "FALSE" here lets checkboxes unchecked, (TRUE) will check them. Entry needed for yad cheklist.
                    driveprevious=$drivenow
                    let $((drnumber++))
                 fi
                 let $((position++))								# found vacant $position entry now is reused (together with $drnumber) for estimate necessary height of yad window.
              done
              [ $flag_debugmode == 1 ] && echo -e "\$drivelist completed (unique items):\t$drivelist\nNumber of partitions (\$position):\t$position\nNumber of devices (\$drnumber):\t$drnumber"
              IFS=${orig_IFS}									# reset field seperator to original values
              # Display a message that no candidate for unmounting was discovered
              if [ -z "$drivelist" ];then
                 sudo -u $true_user -- yad --title="$title" --fixed $centred --timeout=5 --mouse $decorations \
                     --window-icon="$icon_taskbar" \
                     --text $"A removable drive with a mounted\npartition was not found.\n<b>It is safe to unplug the drive(s)</b>" \
                     --no-buttons 
                 exit 0
              fi
              # 2.) User dialog for selection
              # -----------------------------
              # User Dialog, display a list from which the drives to be unplugged may be selected.
              while [ -z "$selected" ]  # Don't proceed as long nothing was selected, or abort.
              do
              	height=$((22*$position+25*$drnumber+50))
              	[ $flag_debugmode == 1 ] && echo -e "2.) User dialog (Yad):\nheight:\t$height"
              	selected=$(sudo -u $true_user -- yad --title="$title" --fixed $centred --height="$height" --width="300" --mouse $decorations \
              				   --window-icon="$icon_taskbar" \
              				   --text=$"<b>Mounted USB partitions:</b>\n$removablelist<b>Choose the drive(s) to be unplugged:</b>" \
              				   --list --separator=" " --no-headers --no-selection \
              				   --checklist --column=" " --column="Drive(s)"  $drivelist)
              	buttonselect=$?
              	[ $buttonselect == 252 ] || [ $buttonselect == 255 ] && buttonselect=1	# Catch ESC button and X-icon also 
              	[ $buttonselect == 1 ] && break
              done
              [ -z "$selected" ] && safemode
              [ $buttonselect == 70 ] || [ $buttonselect == 1 ] && cleanup && exit 1		# exit for both, normal and safe mode.
              [ $flag_debugmode == 1 ] && echo -en "yad output “\$selected”:\n$selected\n"
              # 3.) Preparations for unmounting
              #--------------------------------
              # Create two new lists of mountpoints used by the drives selected to be unplugged, one for unmounting, the other for display purpose.
              # (remark: wouldn't this better have been retrieved from base list above?)
              [ $flag_debugmode == 1 ] && echo "3.1.) Lists for unmounting (\$mountpointlist and \$summarylist)"
              v=0; u=0;
              for item in $selected;do
              	[ $flag_debugmode == 1 ] && echo -e "selected item (\$selected):\t$item"
              	if [[ "$item" != "TRUE" && "$item" != "FALSE" ]]; then
              		v=${#mountpointlist[@]}
              		mapfile -d"$CHR_0x0A" -O $v mountpointlist <<< "$(sudo -u $true_user -- df -a |grep $item | tr -s ' ' | cut -d' ' -f 6)"	# montpointlist for unmounting devices actually
              		summarylist="$summarylist$(sudo -u $true_user -- df -a --output=source,target |grep $item)\n"							# summarylist for display in yad
              		deviceslist+=("/dev/$item")					# devices to check for presence after unmount
                  fi
              done
              if [ $flag_debugmode == 1 ]; then
              	while [ $u -lt ${#mountpointlist[@]} ]
              		do
              			echo -en "item $u in mountpointlist:\t${mountpointlist[$((u++))]}"
              		done
              	echo -e "Number of items to get unmounted:\t${#mountpointlist[@]}"
              	echo -e "summary list is (\$summarylist):\n$summarylist"
              	echo -e "Unique devices to check for after unmount (\$deviceslist):\t$deviceslist"
              fi
              # Obtain confirmation to proceed with unmounting (only in safemode)
              if [ "$flag_safemode" = "TRUE" ]; then
              	sudo -u $true_user -- yad --title="$title" --fixed $centred --mouse $decorations \
              		--window-icon="$icon_taskbar" \
              		--text=$"<b>About to unmount:</b>\n$summarylist<b>Please confirm you wish to proceed.</b>"
              	buttonselect=$?
              	[ $buttonselect == 252 ] || [ $buttonselect == 255 ] && buttonselect=1	# Catch ESC button and X-icon also 
              	[ $buttonselect == 70 ] || [ $buttonselect == 1 ] && cleanup && safemode && exit 1
              # Ensure user waits long enough before unplugging so everything gets written to storage (only in safemode)
              	# get yad pid of specific yad window ($! will fail on yad windows)
              	yad_pid_before="$(pidof -x yad) "				# blank suffix intentionally
              	sudo -u $true_user -- yad --title="$title" --fixed $centred --mouse $decorations \
                      --text=$"Data is being written\nto devices. <b>Please wait...</b>" \
                      --window-icon="$icon_taskbar" \
                      --no-buttons &
              	buttonselect=$?
              	[ $buttonselect == 252 ] || [ $buttonselect == 255 ] && buttonselect=1	# Catch ESC button and X-icon also 
              	[ $buttonselect == 70 ] || [ $buttonselect == 1 ] && cleanup && safemode && exit 1
              	sleep 1									# wait for second yad pid
              	yad_pid="$(sudo -u $true_user -- pidof -x yad)"
              	if [ "$yad_pid_before" != " " ]; then			# if no items sed will fail
              		while read -d' ' item
              		do
              			yad_pid="$(echo "$yad_pid" | sed "s/$item//g")"
              		done <<<"$yad_pid_before"
              	fi
              fi
              # Write data to device(es)
              sudo -u $true_user -- sync
              # wait and close delay window only after sync is done (only in safe mode)
              if [ "$flag_safemode" = "TRUE" ]; then
              	while :;
              	do
              		if [ "$(cat /proc/meminfo | grep 'Dirty:' | tr -s ' ' | cut -d' ' -f 2)" == "0" ] && [ "$(cat /proc/meminfo | grep 'Writeback:' | tr -s ' ' | cut -d' ' -f 2)" == "0" ]; then
              			if [ $flag_debugmode == 1 ]; then echo "sync done"; fi; break
              			fi
              	sleep 1				# wait until sync is done.
              	done
              	[ $flag_debugmode == 1 ] && echo -e "pids of existing yad processes (\$yad_pid_before):\n$yad_pid_before\npid of yad info window (\$yad_pid):\n$yad_pid"
              	kill $yad_pid
              fi
              # 4.) Unmounting selected devices
              # -------------------------------
              # unmount each item in $mountpointlist
              [ $flag_debugmode == 1 ] && echo -e "Number of items in \$mountpointlist():  ${#mountpointlist[@]}"
              [ $flag_dryrun == 1 ] && echo -e "\033[1;33mDry run. Nothing was actually unmounted.\nOmit option -p for real operation.\033[0m"
              i=0
              while [ $i -lt ${#mountpointlist[@]} ]
              do
              	[ $flag_debugmode == 1 ] && echo "unmounting item $i is ${mountpointlist}"
              	[ $flag_dryrun != 1 ] && gksudo -- umount "$(echo ${mountpointlist[$i]})"						# here selected devices get unmounted actually. (it needs 'echo' for some reason)
              	i=$[$i+1]
              done
              # 5.) Test for remaining mounted partitions and final user dialog on exit
              # -----------------------------------------------------------------------
              # check $deviceslist against all currtently mounted devices using findmnt command to get reliable data. Refering to “man mount”: >>For more robust and customizable output use findmnt(8), especially in your scripts.<<
              u=0
              while [ $u -lt ${#deviceslist[@]} ]
              	do
              		checkitem="$(sudo -u $true_user -- findmnt --list -o SOURCE,TARGET | grep ${deviceslist})"
              		[ $flag_debugmode == 1 ] &&  echo -e "checking for item $u:\n${deviceslist}"
              		if [ -n "$checkitem" ]; then
              			umountfailurelist+=("${deviceslist}")
              			echo -e $"\033[1;31mWARNING: DEVICE ${deviceslist} WAS NOT PROPERLY UNMOUNTED!\033[0m\n\033[4;37mPlease check before unplugging.\033[0m"
              			flag_umounterror=1
              			v=0
              			while [ $v -lt ${#mountpointlist[@]} ]
              				do
              					mountpointerrorlist="$mountpointerrorlist$(echo ${mountpointlist[v]} | grep $(echo ${deviceslist} | cut -c 6-))\n"
              					let $((v++))
              				done
              		else
              		[ $flag_debugmode == 1 ] &&  echo -e "Check OK"
              		fi
              		let $((u++))
                  done
              # User information on exit:
              if [ $flag_umounterror == 1 ];then
              	# Display a message if unmount failed
              	mountpointerrorlist="$(echo -e $mountpointerrorlist |tr -s '\n')"
              	sudo -u $true_user -- yad --title="$title" --fixed $centred --mouse $decorations \
              	    --text=$"<b>Mountpoint removal failed.</b>\n<u>One or more mountpoin(s) remain present at:</u>""\n$mountpointerrorlist\n"$"<b>Check each mountpoint listed before unpluging the drive(s).</b>" \
                      --window-icon="$icon_taskbar" \
                      --button="OK"
              		# no need for checking button selection anymore
              	cleanup && exit 1
              else
                 # Display a message if unmount successful   
              	sudo -u $true_user -- yad --title="$title" --fixed $centred --timeout=5 --mouse $decorations \
                      --text=$"<b>Unmounted:</b>\n$summarylist\n<b>It is safe to unplug the drive(s)</b>" \
                      --window-icon="$icon_taskbar" \
                      --no-buttons
                      # no need for checking button selection anymore
              	cleanup && exit 0
              fi
              harry@biker:/usr/local/bin
              $ 
              

              I am not going to install anything yet because no big deal with me. Just figured I’d post info on what happened on antiX 19.
              As you can see. unplugdrive -h is a dead end for me. So I posted whole file contents hoping it would show version in the file.

              So I tried a different route

              harry@biker:~
              $ apt search unplugdrive.sh
              Sorting... Done
              Full Text Search... Done
              antix-goodies/buster,buster,now 0.8.6 all [installed]
                Various useful scripts for antiX.
              

              So all I can figure is that buster somehow downgraded my unplugdrive.sh to version 8.6 instead of 9.0. How it happended on 2 different boxes is also a curiosity.
              HTH. :)

              Edit: Looks like I’ll be editing sudoers file. Seems simple enough.

              Sometimes I drive a crooked road to get my mind straight.
              I don't suffer from insanity. I enjoy every minute off it.
              Motorcycle racing is rocket science.

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

              #77614
              Forum Admin
              rokytnji

                Fixed by going over here and replacing my unplugdrive.sh with a later model

                http://gitlab.com/Robin-antiX/antix-goodies/-/blob/6b0aeaecee8026ba2fc191e783b7b807600c3cc9/bin/unplugdrive.sh

                So my edit in sudoers file would work. Used visudo. Added to users line

                harry (ALL:ALL) ALL

                Now both laptops are back in order. With my old unplugdrive.sh I would still need use to sudo with my /etc/sudoer edit. Tasbar icon now works.

                • This reply was modified 2 years, 4 months ago by rokytnji.
                • This reply was modified 2 years, 4 months ago by rokytnji.

                Sometimes I drive a crooked road to get my mind straight.
                I don't suffer from insanity. I enjoy every minute off it.
                Motorcycle racing is rocket science.

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

                #77620
                Member
                Robin

                  Hello rokytnji!

                  As you can see. unplugdrive -h is a dead end for me.

                  Basically there are some different ways you can start any script in console, depending how its environment was set up in a system:

                  unplugdrive
                  unplugdrive.sh
                  /bin/bash unplugdrive.sh
                  /bin/bash /home/user/myfolder/unplugdrive.sh

                  The first command is the convenience shortcut and does only work in case the alias was set on your system before correctly as expected (or if the script was named actually unplugdrive instead of unplugdrive.sh)

                  So if the command unplugdrive -h fails for you, probably no alias was set in the environment of your system, since the script file is actually named unplugdrive.sh as you know. You may check the aliases present on your system by entering the command
                  alias
                  on console or terminal emulator, e.g. ROXterm.

                  The second command, unplugdrive.sh, will start the script by its full name instead by its convenience shortcut. It will allways run the version present in your system binary folders as found in the system environment variable $PATH, e.g. /user/local/bin, even if there exists a script file of this very name in your recent working directory from where you are running the command. To learn what actually is in your $PATH variable you may check it by entering
                  echo $PATH
                  Btw, preceding it with a path like /home/user/myfolder/unplugdrive.sh will fail due to permission error, even if the script file itself has set the executable permissions correctly.

                  The third method (without giving an explicit path to the script file, but preceding it with /bin/bash) will start the very script file that sits in your recent working directory from where you call it, in case it is present (which is a bit confusingly compared to the behaviour of the command before, now it ignores the content of $PATH variable when searching for the script file to execute). It mostly doesn’t care whether the file has set the executable permissions for owner/group/others or not. Only if there is no file of this precise name present in your working directory it will start the one found in your system binary folders listed in $PATH instead without notice.

                  The last of the commands from above will start the script file present in the very place you point to, not caring whether there exists a file of this name in your systems binary folders listed in $PATH also, so this way you can call the file in this very place without making its folder your current working directory by moving yourself into it, e.g. by using the cd command before. If the file is not present it will complain instead of searching it in the folders given in $PATH.

                  So, and now: obviously there was no alias set on your system while installing the unplugdrive script from the antiX-goodies package, so you’ll have to enter

                  unplugdrive.sh -h
                  instead of
                  unplugdrive -h

                  in order to run it from console/terminalwindow and show the help message.

                  To add the missing alias for convenience, simply enter
                  alias unplugdrive='/usr/local/bin/unplugdrive.sh'
                  or
                  alias unplugdrive='unplugdrive.sh'
                  on console or in a terminal emulator like ROXterm. But it will not survive a reboot or a restart of the shell.

                  To make this alias permanent on your system for all users, add the alias line to the file
                  /etc/profile.d/00-aliases.sh
                  Create the file if not present in the /etc/profile.d folder. But it will only work in login shells this way. So you may want to add it also to the file
                  /etc/bash.bashrc
                  where you’ll find some other aliases to be present already. (This is for bash only. In case you do use another shell, like ksh, zsh or whatever, you’ll have to put it in the respective resource file for these shells)

                  In case you want it to have only for a single user instead, not system wide, add the very alias command as a separate line to your
                  ~/.bashrc
                  file. There you’ll find some of these aliases present already also.

                  Hope this helps to understand all the pitfalls when starting a script manually from console.

                  so long
                  Robin

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

                  #77621
                  Member
                  Robin

                    So all I can figure is that buster somehow downgraded my unplugdrive.sh to version 8.6 instead of 9.0.

                    It’s even a bit more complicated :)
                    The script version of unplugdrive is different from the antiX goodies package version. (This is probably true for all scripts and programs found in the goodies) So 8.6 and 9.0 is the goodies package version number only.
                    And obvously it contains the unplugdrive 0.82c version now instead of 0.90 for antiX 19 at least.

                    ——–
                    @anticapitalista please could you check whether there was an error while packaging? And please keep in mind, these script versions differ from the most recent 93b version as present in antiX 21 in some details:

                    - the textdomain for gettext translations was changed from unplugdrive.sh to unplugdrive for some reason. So all language files have to be renamed accordingly to make them work.
                    - all the bugfixed versions from 0.82c to 0.90 can be started with sudo only, while only 0.93 and above allows both, starting with sudo and non sudo.
                    - all the 0.93 versions need the special pumount version Xecure has patched in order to run correctly, while all versions up to 0.90 can run with the default debian version of this helper tool.
                    

                    Moreover you might want to include in goodies package the config additions for permanent alias for convenience, so it can be called by unplugdrive and unplugdrive.sh both from command line, regardless whether its a version which needs sudo or not, and regardless whether user is on antiX 19 or 21. For 0.82c to 0.90 the alias has to contain sudo preceding the script call, while 0.93 series can live without this in case the correct pumount version is installed.
                    So the necessary version specific adaptions in antiX system config files need to be incorporated when packaging the goodies package so they will be carried out during its installation. Otherwise users will have trouble and will be confused when working alternately on antiX 19 and 21 systems.
                    Moreover, if you decide to switch to 0.93b version instead of 0.90 version on antiX 19 also, you’ll have to make sure the correct pumount version crafted by Xecure is always installed along with this most recent unplugdrive version we had rewritten for antiX 21. But I don’t know whether his special pumount will run on buster. Otherwise the proper shutdown of devices will fail and users may damage their hardware without even knowing. So in case the special pumount can’t be installed on antiX 19, unplugdrive 0.90 with latest bugfix is the most recent one running on this system base correctly, it’s the best tested version, containing mostly all features already, but this one needs sudo still. Don’t use ever 0.91, which is on gitlab also. This is a transition version only, which supports non-sudo incompletely, it was created to allow Xecures non-sudo approach of patching pumount and reuse it in unplugdrive to get combined with the existing code.

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

                    #77622
                    Member
                    Robin

                      @rokytnji

                      Unfortunately you probably have installed manually the antiX 21 version (0.93b) of unplugdrive on your antiX 19, if I read your output above correctly.

                      I had intentionally pointed you to version 0.90 instead:
                      http://gitlab.com/Robin-antiX/antix-goodies/-/raw/317baff2dfc52e67f2b823f2840be384042a64e4/bin/unplugdrive.sh?inline=false
                      While your link points to the most recent 0.93b version:
                      http://gitlab.com/Robin-antiX/antix-goodies/-/blob/6b0aeaecee8026ba2fc191e783b7b807600c3cc9/bin/unplugdrive.sh
                      It will come up on antiX 19 also. But: If you do use the 0.93 version, you have to make sure the correct pumount version is installed along with it. Xecure knows more about what he has modified in pumount and how to determine whether a given pumount version contains his changes or not. Since I’m not a real programmer, and I don’t know anything about this, I only can write scripts :) So I really do hope he will say some words for clarification, whether you have the correct version on your antiX 19 to run unplugdrive 0.93 without running the risk of hardware damage or not. Until we know about this definitively, I’d recommend not to use versions above 0.90 on antiX 19, but 0.90 itself is perfectly fine for it, including all bugfixes and mostly all features and the design of the antiX 21 (0.93b) version already.

                      What is it, what can happen when having “wrong” pumount as present by default in antiX 19 and running unsudoed unplugdrive 0.93 instead of sudoed 0.90 ? Well, it depends. Most modern devices like flash drives will tolerate this without any problem. But if you have true spinning devices, some of these won’t halt at all (they do not spin down), and probably you will see some headcrashes when plugging off in full speed, while the script tells you happily it was safe to unplug. Also here again, some spinning devices will tolerate even this, so you can never tell whether you get in trouble or not before it has happened. So better safe than sorry, don’t use an unplugdrive version along with a pumount version which wasn’t meant for it. Again, all this trouble will not happen when running it sudoed, since it will not use the functions not present in default pumount then, but other methods instead (which is the reason it needs sudo then).

                      Also with the “wrong” pumount version combined with 0.93 unplugdrive can’t unmount luks encryption, even if the UI claims it. There is a difference between 0.90 and 0.93: Only the latter can unmount luks encrypted drives, while the former will unmount luks encrypted partitions only, not seeing the completely encrypted drives.

                      And yet another, maybe important hint: Never run really old versions before 0.82c sudoed. These don’t need it and really should not be run this way. This is, since they do not have the bugfixes of later versions implemented.

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

                      #77623
                      Forum Admin
                      rokytnji

                        Oh. I get the spin down message like in antiX 21 now. When removing A USB drive now. I have antiX 21 running on other gear.
                        Never had that message before in previous unplugdrive.sh. When it was working in antiX 19.

                        My fix may dirty but eventually these 2 laptops will roll over and I will antiX 21 running on both of them.
                        Just not a big deal with me right now.
                        Thanks for detailed posts and advice.
                        I learned a bunch over this.

                        By the way. My above posts in code tags show pumount version at 0.9.23. Just to save looking.

                        Edit. Also. I don’t encrypt usb files or partitions on them. Never have anything on them long enough or sensitive enough to matter for that kind of usage.
                        Just a scooter tramp. Who runs antiX. anti and folks like you keep me going.

                        • This reply was modified 2 years, 4 months ago by rokytnji.

                        Sometimes I drive a crooked road to get my mind straight.
                        I don't suffer from insanity. I enjoy every minute off it.
                        Motorcycle racing is rocket science.

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

                        #77646
                        Member
                        Robin

                          To round it off, some additional thoughts on your course of action and your findings:

                          With my old unplugdrive.sh I would still need use to sudo with my /etc/sudoer edit.

                          The alias from my posting above would fix this, also for the 0.90 version:

                          alias unplugdrive='sudo unplugdrive.sh'
                          or
                          alias unplugdrive='sudo /usr/local/bin/unplugdrive.sh'
                          or even
                          alias unplugdrive.sh='sudo /usr/local/bin/unplugdrive.sh'

                          In combination with the entry in a sudoers file this will allow you to run the script without ever being asked for your password, and even without the need to prefix it by sudo when keying it in. So it will behave as you are used to it, while actually it runs sudoed now.

                          So my edit in sudoers file would work. Used visudo. Added to users line
                          harry (ALL:ALL) ALL

                          And in case you don’t want to have users allowed to execute everything on your system without entering their sudo password, you should use the following string instead, which is a bit more restrictively:
                          %users ALL=(root) NOPASSWD: /usr/local/bin/unplugdrive.sh
                          You could add the line e.g. to the file
                          /etc/sudoers.d/antixers
                          Or even create a new file in the very folder, name it as you like best, e.g. antiX-contribs, and put the line in there. So it probably will survive system updates.

                          Again, I’d strongly recommend to use unplugdrive 0.90 on antiX 19 instead of 0.93b, which needs the special pumount for correct execution, as long the presence of the latter is not guaranteed.
                          Here’s the changelog of the official pmount 0.9.23 package in debian buster, but I really can’t find in there a hint whether Xecures patch made its way into the pmount package antiX uses in buster or not. Maybe somebody experienced in packaging and repository organisation of antiX could tell.

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

                          #82000
                          Member
                          tamix

                            (worldfence rejected me twice yesterday as i was trying to submit a message with a text file attached…trying again today with no attached file…)

                            How to enable the Unplug Removable Device icon in 19.5.

                            Recently looked up antiX 19.5 and just caught sight of this thread yesterday. My patch below – a shell script – is now helping me. At least a temporary solution for what i need daily.
                            This could possibly help some antiX users too. Feel free to use it.

                            EDIT #3
                            attaching a tar.gz file…
                            EDIT #4
                            attaching a .zip file… last try
                            EDIT #5
                            ok the previous try is successful. sigh…
                            Now an admin might explain us what is going on with that strange worldfence for a quite standard post.

                            • This reply was modified 2 years, 2 months ago by tamix.
                            • This reply was modified 2 years, 2 months ago by tamix.
                            • This reply was modified 2 years, 2 months ago by tamix.

                            They call me anartista.
                            « If the users don't control the program, the program controls the users. » - rms

                            #82025
                            Member
                            tamix

                              How to enable the Unplug Removable Device icon in 19.5.

                              Sorry for inconvenience. I am not lucky by these times.
                              Below the shell script attached in zip.

                              They call me anartista.
                              « If the users don't control the program, the program controls the users. » - rms

                              #82102
                              Member
                              Robin

                                Many thanks, @tamix, for your approach, scripting all these tasks, which I have described at several threads her in forum already. Obviously there was overlooked something by the package maintainers of antiX-goodies package, some important additional precautions necessary to run the bugfixed versions of unplugdrive from 0.82c and above properly. Also the most recent and completely bugfixed version 0.90 suitable for antiX 19 has not made its way into the antix 19.5 ISO, and also not in the antiX package repository at all. I can’t package unplugdrive 0.90 separately as an update, since this would conflict with the existing antiX-goodies package. So all we can do is waiting until antiX-goodies package maintainer once will notice there is a need to fix some settings. Until then your patch script will help people to create the needed system settings more easily themselves.

                                Please refer to the instructions I have described when the first patched version in need of these precautions was launched, which was 0.82c: https://www.antixforum.com/forums/topic/cant-find-source-of-unplugdrive/page/2/#post-59484 They apply for all versions up to 0.90, the latest antiX 19 version. Possibly it is enough already to add the proposed alias along with the added line in sudoers file to make the taskline-icon work.

                                As far I can see, your script does mostly exactly what I’ve described there. Great!

                                In case you’d like to improve your script changing all the entries in the localised files also: A single-liner will be sufficient probably, you could try to add a command like:
                                sed 's/unplugdrive/sudo unplugdrive/;s/sudo sudo/sudo/' /usr/share/antiX/localisation/*/icewm/toolbar*
                                (and possibly another one, similar to this for jwm/tray)
                                Once you have checked that everything in this line works as expected and reliable, just add the i option: sed -i … to let it change all the files directly instead of printing to command line only. If you want to create backup copies, use sed -i.bak … instead.

                                In antiX 21 all these precautions are no longer needed, since we made unplugdrive 0.93 and above run properly in sudoed and unsudoed mode both, but please, don’t ever use 0.93 on antiX 19.x, it will fail unnoticed while telling everything is fine. To allow non-sudoed mode again, Xecure has created a special crafted version of the helper tool pumount (which I had dismissed before because the original version of pumount turned out to be unreliable, we can use it only in the Xecure patched version to have it reliable), while I modified the script logic to additionally allow non-sudoed mode and engage different preparation methods and commands depending whether unplugdrive is run with sudo or without sudo.

                                P.S.:

                                Now an admin might explain us what is going on with that strange worldfence for a quite standard post.

                                There lives a thread somewhere here in board discussing exactly these problems. It’s a wordfence thing, nothing can be done to help it, so we have to live with it. E.g. I get many times the strange response from the server: “Are you really sure you want to do this?” instead of simply adding my answer to a thread. OK, just reload page and start over. Second attempt is successfully most time.

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

                                #82279
                                Member
                                tamix

                                  In case you’d like to improve your script changing all the entries in the localised files

                                  If you want to create backup copies, use sed -i.bak … instead.

                                  Thank you @Robin for support. I have followed your pertinent suggestions and brought a few changes to my small utility in a second version which everyone can download from the link below. I do not think it needs further improvements because it is only a temporary solution – perhaps useful in very specific cases. Its life cycle is counted. On your side you are dealing with the _main_ task around unplugdrive with all its variations. And probably some other modules I do not know of.

                                  Fortunately the antiX OS – plus MX Linux – is structured simultaneously around its robustess and its high flexibility. I think most Linux users love that! Personally I do. There is a lot to learn.

                                  I would also like to congratulate you as an antiX contributor not only because you are striving to make things clear as much as possible around technical contexts that are somewhat complex – but your talented way of processing and explaining may give an idea of what a typical “work in progress” looks like. As if we would get the impression to get smarter and smarter… It is nice.

                                  As I started to create the script, I was doing it only for my own purpose. I was not aware of the existence of your threads relating to unplugdrive posted at the same time or even earlier in the antiX forum. Simply because I do not visit the forum enough regularly. So I happen to miss absolutely the “departure of the train”, as you can imagine… But trying to catch the train rolling ahead is not bad at all! It’s also the same story like in the fable of the Hare and the Tortoise.

                                  I’ll start now to look up your posts – past or to come – and observe all the changes and design you are working on. And partucularly this thread of course.

                                  They call me anartista.
                                  « If the users don't control the program, the program controls the users. » - rms

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