Table of Contents
Thunar
Open disk image files read-write
Thunar seems to open disk images read-only by default. This makes sense for ISO-images and probably a bunch of other use cases, but not for image files created to be used with LUKS for additional security1)
The workaround is to configure a custom action in Thunar containing the command
udisksctl loop-setup -f %f
References:
man udisksctl
Use ssh-agent to mount sftp targets
dbus-update-activation-environment SSH_AUTH_SOCK=$SSH_AUTH_SOCK systemctl --user stop gvfs-daemon gio mount sftp://ftp.example.com
This doesn't look like a Thunar topic, but it seems to affect Thunar as well, so I put it here
References:
man dbus-update-activation-environment
Build Thunar deb package with default password save set to "never"
This is an updated version which also undoes the “native package format” of the Linux Mint maintainer. You can find the original version that was successfully applied to thunar-1.8.14 on Linux Mint 20 Ulyana here
apt-get source --download-only thunar=4.18.4-1~bpo22.04 # this provides thunar_*.*.*.orig.tar.bz2 apt-get source thunar=4.18.4-3+victoria cd thunar-*.*.* sed -i -e s/native/quilt/ debian/source/format # revert the already applied patch so it does not interfere with the # upcomming steps patch -p1 -R < debian/patches/01_support-non-multiarch-modules.patch # make patches out of the differences between unpacked sources and .tar.bz2 file rm -v thunar-build-deps_4.18.4-3+victoria_amd64.buildinfo thunar-build-deps_4.18.4-3+victoria_amd64.changes dpkg-source --commit # Enter the desired patch name: 02_4.18.4-3+victoria # Edit: # |Description: Fix (undo) turn into a native source format package # | Ask Clement Lefebvre why I did not do that from the beginning # : # Now apply the actual patch (default password save setting to "never") cat >> debian/patches/03_set_default_password_save_never.patch <<EOF --- a/thunar/thunar-gtk-extensions.c 2024-08-31 14:49:58.042852434 +0200 +++ b/thunar/thunar-gtk-extensions.c 2024-08-31 14:47:57.468107395 +0200 @@ -307,7 +307,7 @@ screen = thunar_util_parse_parent (parent, &window); operation = gtk_mount_operation_new (window); - g_mount_operation_set_password_save (G_MOUNT_OPERATION (operation), G_PASSWORD_SAVE_FOR_SESSION); + g_mount_operation_set_password_save (G_MOUNT_OPERATION (operation), G_PASSWORD_SAVE_NEVER); if (window == NULL && screen != NULL) gtk_mount_operation_set_screen (GTK_MOUNT_OPERATION (operation), screen); EOF echo 03_set_default_password_save_never.patch >> debian/patches/series # <codename> is your Debian (derivate) release codename as "bookworm" or "ulyana". # You might want to replace "local" by something specific to you or your organisation export DEBEMAIL="${DEBEMAIL:-<your e-mail address here>}" export DEBFULLNAME="${DEBFULLNAME:-<your name here>}" dch -l .local~<codename> -D <codename> 'Set G_PASSWORD_SAVE_NEVER for default password save option' # ignore warnings, check with head debian/changelog # the following is not neccessarily needed, but comes in handy if # you are going to run your own repository server on an outdated # Debian, whichs dpkg tools do not yet understand zst compression: echo -e '\noverride_dh_builddeb:\n\tdh_builddeb -- -Zxz' >> debian/rules # build with dpkg-buildpackage -rfakeroot --no-sign # # If it fails due to missing dependencies, install them by # sudo apt install --no-install-recommends <packages> # # and redo # dpkg-buildpackage -rfakeroot --no-sign sudo apt install ../thunar-data_*_all.deb ../thunar_*_amd64.deb # # If you want to clean up your system, you might want to remove packages installed just for compiling: # sudo apt purge <packages>
Credits:
- Stack Overflow answer by Aldegar Rızvan to the question “How do I build a .deb without zstd compression in Ubuntu 21.10?” for the only working solution to configure the compression of the control.tar inside the .deb package.
Extend desktop background context menu
Thunar allows the user to add custom items on file and directory context menus called custom actions. (look for them in the Edit menu)
You can specifiy a pattern where the custom items … sorry: actions - appear. By setting this to “Desktop”, the item will appear on the context menu of any folders named “Desktop” - which ist most of the times just the one Desktop.
Example values to launch the Xfce4 display settings would be:
| Name | Display |
|---|---|
| Description | Configure screen settings and layout |
| Command | xfce4-display-settings |