Way to reproduce: Need to have devices that need authentication to open it. Open thunar with treeview side bar. Behave 1: click on the treeview ICON device that need authenticatoin (e.g. another partition). You can cancel authentication. IT'S OK. Behave 2: click on the treeview expander device (the little arrow to the left). YOU CANNOT cancel authentication. It's very easy to click there by mistake. Annoying when working with many tabs and need to close thunar to avoid that authentication dialog clicked by mistake. Thanks.
> Need to have devices that need authentication to open it. Can you please provide some details? How can one set up those devices?
Devices in Thunar side-bar can be usb, mtp, system partitions, etc. With Archlinux system partitions are protected by default. You can protect devices access with authentication changing polkit rules: https://wiki.archlinux.org/index.php/Polkit#Authorization_rules I don't understand why some Linux/GNU distributions allow access by default to system partitions, but that's another history.
> You can protect devices access with authentication changing polkit rules: > https://wiki.archlinux.org/index.php/Polkit#Authorization_rules Where can I find this particular rules file? Alternatively, you could attach it to this report.
Created attachment 9861 udisk2 polkit /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy is part of udisks2
look for <action id="org.freedesktop.udisks2.filesystem-mount"> this one control removable media (pendrive) change <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>yes</allow_active> </defaults> with <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>auth_admin</allow_active> </defaults> execute in terminal "thunar -q" to terminate totally thunar daemon insert usb, follow the 'way to reproduce' in my first post after you finish, restore the /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy *we can create an overrule in /etc/polkit-1/rules.d to make it permanent but in this way is more compressible. file /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy will be overwritten with udisks2 updates Thanks
Created attachment 9864 patch The instructions were helpful. Thanks! A small change in thunar_tree_view_mount_finish() fixes this issue.
Theo Linkspfeifer referenced this bugreport in commit bad07aaa9803c9255ba62eb32fab623dfe05132f Only open device after successful mount attempt (Bug #16831) https://gitlab.xfce.org/xfce/thunar/commit/bad07aaa9803c9255ba62eb32fab623dfe05132f
Theo Linkspfeifer referenced this bugreport in commit 713b1266546b7d094dfeb13490591a7e645c95c3 Only open device after successful mount attempt (Bug #16831) https://gitlab.xfce.org/xfce/thunar/commit/713b1266546b7d094dfeb13490591a7e645c95c3
Thank you for reporting hapical, and thanks alot for the patch, Theo ! I can reproduce the bug, and I can confirm that the patch fixes it. Pushed to master and 4.14 branch, to be released in thunar 1.9.0 and thunar 1.8.15