Thunar unmount usb drives not working

Forum Forums Official Releases antiX-19 “Marielle Franco” Thunar unmount usb drives not working

  • This topic has 7 replies, 4 voices, and was last updated Aug 3-6:32 pm by seaken64.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #39658

    If I use Thunar and mount a usb externel drive I can not unmount the drive. Operation not permitted
    This has never been fixed with antiX 19 you will never be able to unmount a usb device until the gvfs files can be installed a work with Thunar, including phones will not mount either.
    Yet this works just fine with MX 19 and Thunar as the gvfs are installed and working.

    Using spaceFM mounting and unmounting usb Drives work fine with antiX 19 but phones are not working..

    T430 MX-19 , antiX-19 runit.


    Have you set thunar as your file manager using Control Centre > Desktop > Preferred Applications?

    You could try:

    Make sure the command thunar –daemon is autostarted on login.

    You could also try
    dbus-launch thunar
    and see if you can mount/unmount stuff with it.

    I have no experience with thunar, so this is probably a shot in the dark.


    @Xecure Thanks for Replying.

    Don’t worry about it now as I have put thunar on the back burner with antiX. The drive mounting won’t work without the gvfs working in thunar. (Works fine with MX)
    thunar –daemon wont not work with antiX.
    dbus-launch thunar makes no difference.

    Have made SpaceFM my default file manager with antiX as drive mounting/unmounting works just fine.. And can make custom actions too like thunar.

    As far as the phone mounting goes it does work but only by using /usr/share/applications/antixandroid-device-usb-connect.desktop. And this will only open on a gui desktop won’t open at all so far with i3wm. (Will look into this later.)

    Thanks again.

    T430 MX-19 , antiX-19 runit.


    On Ice I have Taskbar entrys

    prog “MountPhone” /usr/share/icons/papirus-antix/48×48/devices/pda.png jmtpfs /home/myhome/Phone

    prog “Abziehen des Wechseldatenträgers” /usr/share/icons/papirus-antix/48×48/devices/drive-removable-media-usb.png

    They had to be added to personal menu to work and a folder in home called Phone created.

    Works fine for me with exception of clean unmount. The phone folder is often blocked until reboot.
    not a big deal in my or group usage case so I never looked for how to fix it.


    @ModdIt I would try the script below Or just copy the file from the location given it may work better just make sure yad is installed or maybe it is by default.

    /usr/share/applications/antixandroid-device-usb-connect.desktop executes the script below

    /usr/local/bin/ This is a bash script which users yad as an interface (interesting this should work with i3wm as I use yad interface for other things)

    And so it does..

    # -----------------------------------------------------------------------------
    # antiX gui for mounting/unmount android devices, by PPC and sybok, 21/5/2020, fully GPL...
    # -----------------------------------------------------------------------------
    yad_title=$"Android Device USB Connect"
      # Clear some files and prepare directories:
      echo $"Clearing files and preparing directories"
      if ! [ -d "${dir}" ]; then
        mkdir -p "$dir"
    } # preparation
      # Check that some commands are available
      echo $"Checking availability of required utilities"
      fusermount -V 1>/dev/null || exit 1
    ## testing -  yad
    	if ! [ -x "$(command -v yad)" ]; then
    		echo $"Error: yad is not available" >&2 && exit
    ## testing -  jmtpfs
    	if ! [ -x "$(command -v jmtpfs)" ]; then
    		echo $"Error: jmtpfs is not available" >&2 && exit
      echo $"Checking availability of required utilities finished successfully"
    } # check_utilities
      # 1- check if a android device seems to be mounted. If so, offer to unmount it and exit OR to access device
    	if [ "$(ls -A "$dir")" ]; then
    		echo $"An android device seems to be mounted"
    		yad --fixed --window-icon=$yad_window_icon --image=$yad_image --title "$yad_title" --center --text=$"An android device seems to be mounted.\n \nChoose 'Unmount' to unplug it safely OR \n Choose 'Access device' to view the device's contents again.   "  --button=$"Access device":1 --button=$"Unmount":2
    			[[ $foo -eq 1 ]] && echo $"User has chosen to access the android device" && desktop-defaults-run -fm "$dir" && exit 1
    			[[ $foo -eq 2 ]] && echo $"User has chosen to unmount the android device" && fusermount -u "$dir" && rm -r "$dir" ###&& exit
    				#### NEW confirmation dialog, that warns if it's safe to unplug the device
    				if [ "$(ls -A "$dir")" ]; then
    					echo $"Android device WAS NOT umounted for some reason, do not unplug!"
    					yad --fixed --window-icon=$yad_window_icon --image=$yad_image --title "$yad_title" --center --text=$"Android device WAS NOT umounted for some reason, do not unplug!"  --button=$"OK" && exit
    					echo $"Android device is umounted; it is safe to unplug!"
    					yad --fixed --window-icon=$yad_window_icon --image=$yad_image --title "$yad_title" --center --text=$"Android device is umounted; it is safe to unplug!"  --button=$"OK" && exit
     } # check_mounted
      # 2- Check if an android device is connected to the computer, if not, warn user and exit
     while :
    		device_check=$(jmtpfs  2>&1)
    			if [[ $device_check == *"No mtp"* ]]; then
    				echo $"No device connected"
    				else echo $"Device is connected" && sleep 1 && break
    		yad --fixed --window-icon=$yad_window_icon --image=$yad_image --title "$yad_title" --center --text=$"No (MTP enabled) Android device found!\n  \n Connect a single device using its USB cable and \n make sure to select 'MTP' or 'File share' option and retry.   \n" --button=$"EXIT":1 --button=$"Retry":2
    		[[ $foo -eq 1 ]] && echo $"User pressed Exit" && exit 1
    		[[ $foo -eq 2 ]] && echo $"User pressed Retry"
    } # check_connected
      # 3- Try to mount android device and show contents
      jmtpfs "$dir" &&
       if  [ "$(ls -A "$dir")" ]; then
    	desktop-defaults-run -fm "$dir"
    	echo $"Device is mounted!"
    	echo $"Device is NOT mounted!" 
      echo $"Attempted to mount device and display its contents"
    } # mount_display
      # 4- When trying to mount device, perform check if device contents are displayed, if not, user may need to allow access on the device. Prompt user to do that and unmount, remount device, and try to display it's contents again
       echo $"Checking if device can be mounted, asking user to grant permission on the device and try to mount again"
     	if [ "$(ls -A "$dir")" ] ; then
    			echo $"Device seems properly mounted!"
    			echo $"Please check that you have ALLOWED access to your files on your android device in order to proceed" && yad --fixed --window-icon=$yad_window_icon --image=$yad_image --title "$yad_title" --center --text=$"Please check that you have ALLOWED access to your files on your android device in order to procced\n \n Note: If you did not allow access, simply unplug and plug in your device's USB cable once more" --button Retry && fusermount -u "$dir" && jmtpfs "$dir" && desktop-defaults-run -fm "$dir"
      #recheck if device contents are displayed, if not, warn user and exit and unmount device to avoid errors
      sleep 1 && echo $"Final check to see if device can be mounted. If not, unmount it to avoid any errors"
    [ "$(ls -A "$dir")" ] && echo $"The device seems to be correctly mounted." && exit
     echo $"Please check that you have ALLOWED access to your files on your android device in order to proceed" && yad  --fixed --window-icon=$yad_window_icon --image=$yad_image --title "$yad_title" --center --text=$" Unable to mount device! \n Please check you correctly selected 'MTP...' or 'File transfer...' option.\n Or 'Allowed' file access.\n \n Unplug and plug in your device and try again." --button Exit
    	 fusermount -u "$dir" && rm -r "$dir"
    } # check_while_mount
      # The main function
      echo "Done"
    } # main
    • This reply was modified 1 week, 5 days ago by Koo.

    T430 MX-19 , antiX-19 runit.


    Thanks Koo, I did see what PPC and Sybock were working on, it does as you say work well
    so will go on the master stick soon.

    i am pretty demotivated unfortunately, looks like a second lockdown might not be far away
    lot of cases around where I live.
    Many of my loved ones are in UK and Vietnam. UK is in a terrible state, VN suffering after
    being able to keep things under control for a long time. Especialy In Ho Chi Minh, my friends
    are terrified of workplace closures and jobs lost forever. Many places closed already.


    Sorry to hear how badly the virus is affecting your friends and family the world really needs a vaccine.I wish you and everyone all the Best.

    T430 MX-19 , antiX-19 runit.


    Sorry ModdIt. Yes, it’s terrible that so many people do not know how they will make a living. I hope you and your family and friends can make it through this without getting too discouraged. Koo is right, we need a vaccine soon. I also wish you only the best.


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