### Build and install the plugin Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Build and install the plugin after configuration. Requires root privileges. ```bash make && make install ``` -------------------------------- ### Build and install thunar-volman Source: https://docs.xfce.org/xfce/thunar/thunar-volman After configuring, run make and then make install with superuser privileges. ```bash make make install ``` -------------------------------- ### postr.desktop - Integrate postr into the Send To menu Source: https://docs.xfce.org/xfce/thunar/send-to A complete .desktop file example for adding a 'Flickr' entry to the Send To menu for JPEG files. Install to ~/.local/share/Thunar/sendto/ (create the folder if needed) to make the entry appear. The MimeType=image/jpeg; line restricts the entry to JPEG files. ```desktop # postr.desktop - Integrate postr into # the "Send To" menu. [Desktop Entry] Type=Application Version=1.0 Encoding=UTF-8 TryExec=postr Exec=postr %F Icon=postr Name=Flickr MimeType=image/jpeg; ``` -------------------------------- ### Configure thunar-volman with prefix Source: https://docs.xfce.org/xfce/thunar/thunar-volman Run this command after downloading a release tarball. The prefix must be the same prefix where Thunar is installed. ```bash ./configure --prefix=/usr/local ``` -------------------------------- ### Configure /etc/samba/smb.conf for user shares Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Example smb.conf configuration enabling user shares with a workgroup of WORKGROUP, security mode 'user', and a maximum of 100 shares. Adjust the workgroup to match your network. ```ini [global] workgroup = WORKGROUP security = user usershare path = /var/lib/samba/usershares usershare max shares = 100 usershare allow guests = yes usershare owner only = yes ``` -------------------------------- ### Run Thunar as root with dbus session using sudo Source: https://docs.xfce.org/xfce/thunar/faq Starts Thunar as root with a dbus session. Use this when running Thunar as root because no dbus session is running by default, which prevents xfconf from storing settings. ```bash $ sudo dbus-run-session thunar ``` -------------------------------- ### Run Thunar as root with dbus session using gksu Source: https://docs.xfce.org/xfce/thunar/faq Alternative to sudo for starting Thunar as root with a dbus session. Use gksu if you prefer a graphical authentication prompt. ```bash $ gksu dbus-run-session thunar ``` -------------------------------- ### Run update-desktop-database to refresh desktop database Source: https://docs.xfce.org/xfce/thunar/archive After installing new archive managers in $prefix (e.g., /usr or /usr/local), run this command to update the desktop database. Most package managers do this automatically, but manual installs require it to avoid an error about no supported archive managers found. ```bash update-desktop-database $prefix/share/applications ``` -------------------------------- ### Compare selected files/directories with meld Source: https://docs.xfce.org/xfce/thunar/custom-actions Launches meld to compare the selected files or directories. Requires the meld package to be installed. ```bash meld %F ``` -------------------------------- ### Find Thunar prefix with pkg-config Source: https://docs.xfce.org/xfce/thunar/thunar-volman Use this command to find out the prefix where Thunar is installed. ```bash pkg-config --variable prefix thunarx-1 ``` -------------------------------- ### Download video subtitles with OpenSubtitlesDownload.py Source: https://docs.xfce.org/xfce/thunar/custom-actions Downloads subtitles for selected video files using the OpenSubtitlesDownload.py script. Requires python and zenity, and the script must be installed at ~/.local/bin/OpenSubtitlesDownload.py. The script is commented for easy tweaking. ```bash ~/.local/bin/OpenSubtitlesDownload.py --gui=gnome %F ``` -------------------------------- ### Search files with catfish Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens Catfish in the selected directory. Requires the 'catfish' package to be installed. ```shell catfish %f ``` -------------------------------- ### Launch Thunar with custom window identifier on XOrg Source: https://docs.xfce.org/xfce/thunar/faq Use dbus-launch to start a separate Thunar process with a custom application name on XOrg, allowing window management based on that name. ```bash $dbus-launch thunar –class My-Custom-Name ``` -------------------------------- ### SMB remote filesystem location Source: https://docs.xfce.org/xfce/thunar/unix-filesystem Example location for accessing Windows file systems via Samba (SMB). Enter this in Thunar's location selector. ```plaintext smb://myRemoteHost/johndoe ``` -------------------------------- ### Launch Thunar with custom window identifier on Wayland Source: https://docs.xfce.org/xfce/thunar/faq Use dbus-launch to start a separate Thunar process with a custom application name on Wayland, allowing window management based on that name. ```bash $dbus-launch thunar –name My-Custom-Name ``` -------------------------------- ### AFP remote filesystem location Source: https://docs.xfce.org/xfce/thunar/unix-filesystem Example location for accessing Apple file systems via Apple Filing Protocol (AFP). Enter this in Thunar's location selector. ```plaintext afp://myRemoteHost/johndoe ``` -------------------------------- ### SFTP remote filesystem location Source: https://docs.xfce.org/xfce/thunar/unix-filesystem Example location for accessing a remote filesystem via Secure file transfer program (SFTP). Enter this in Thunar's location selector. ```plaintext sftp://johndoe@myRemoteHost/home/johndoe ``` -------------------------------- ### Create Samba usershares group and directory (as root) Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Run these commands as root to create the usershares directory and group, set ownership, and set permissions. The group name is 'sambashare' and the directory is '/var/lib/samba/usershares'. ```bash export USERSHARES_DIR="/var/lib/samba/usershares" export USERSHARES_GROUP="sambashare" mkdir -p ${USERSHARES_DIR} groupadd ${USERSHARES_GROUP} chown root:${USERSHARES_GROUP} ${USERSHARES_DIR} chmod 01770 ${USERSHARES_DIR} ``` -------------------------------- ### Create tar.gz from folder Source: https://docs.xfce.org/xfce/thunar/custom-actions Creates a tar.gz archive from the selected folder. ```shell tar czvf %n.tar.gz %n ``` -------------------------------- ### Open thunar as root here (pkexec) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens Thunar as root in the selected directory using pkexec. ```shell pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch thunar %f ``` -------------------------------- ### Configure build from tarball Source: https://docs.xfce.org/xfce/thunar/thunar-vcs-plugin Run ./configure to prepare the source for building from a tarball. The configure script automatically finds the Thunar prefix. ```bash ./configure ``` -------------------------------- ### Edit file as root (pkexec) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens a text editor as root on the selected file using pkexec. Replace 'put-your-favourite-text-editor-here' with your editor. ```shell pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch put-your-favourite-text-editor-here %f ``` -------------------------------- ### Open thunar as root here (admin) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens Thunar as root in the selected directory using the admin interface. ```shell thunar admin:/``/``/%f ``` -------------------------------- ### Run autogen.sh for repository builds Source: https://docs.xfce.org/xfce/thunar/thunar-volman Run this instead of ./configure when building from the repository, because the automatically generated files are not included. ```bash sh autogen.sh --prefix=/usr/local ``` -------------------------------- ### Configure plugin from git checkout Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Run this command to configure the plugin when building from a git checkout. It runs autogen.sh with the Thunarx-1 prefix. ```bash ./autogen.sh --prefix=$(pkg-config --variable prefix thunarx-1) ``` -------------------------------- ### Open root terminal here (pkexec) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens a root terminal in the selected directory using pkexec. ```shell pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY dbus-launch xfce4-terminal --default-working-directory=%f ``` -------------------------------- ### Open thunar as root here (gksu) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens Thunar as root in the selected directory using gksu. ```shell gksu thunar %f ``` -------------------------------- ### Create a symbolic link Source: https://docs.xfce.org/xfce/thunar/custom-actions Creates a symbolic link to the selected file or folder. ```shell ln -Ts %f %n" (symlink)" ``` -------------------------------- ### Configure plugin from source tarball Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Run this command to configure the plugin when building from a source tarball. It sets the prefix to the Thunarx-1 prefix. ```bash ./configure --prefix=$(pkg-config --variable prefix thunarx-1) ``` -------------------------------- ### View disk usage with baobab Source: https://docs.xfce.org/xfce/thunar/custom-actions Runs baobab on the current directory to visualize disk usage. Requires the baobab package. Alternative tools like fsview or filelight exist but baobab provides crisper visuals. ```bash baobab %d ``` -------------------------------- ### Edit file as root (gksu) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens a text editor as root on the selected file using gksu. Replace 'put-your-favourite-text-editor-here' with your editor. ```shell gksu put-your-favourite-text-editor-here %f ``` -------------------------------- ### Open terminal here (Command 1) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens a terminal in each selected folder. ```shell for f in %F; do exo-open --working-directory "$f" --launch TerminalEmulator; done ``` -------------------------------- ### Create a hardlink Source: https://docs.xfce.org/xfce/thunar/custom-actions Creates a hard link to the selected file or folder. ```shell ln %f %n" (hardlink)" ``` -------------------------------- ### Open terminal here (Command 2) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens a terminal in each selected folder, or in the current directory if no folder is selected. ```shell for f in %F; do if [ -d "$f" ]; then exo-open --working-directory "$f" --launch TerminalEmulator; elif [ -z "$default" ]; then default=1; exo-open --launch TerminalEmulator; fi done ``` -------------------------------- ### Debugging level 'full' description Source: https://docs.xfce.org/xfce/thunar/thunar-volman Use this level to debug thunar-volman to locate a bug. The build will most probably be noticeably slower. Recommended for people that want to develop thunar-volman stuff. ```text `full' Use this if you want to debug thunar-volman to locate a bug. The build will most probably be noticably slower. This is also recommended for people that want to develop thunar-volman stuff. ``` -------------------------------- ### Set icon theme in ~/.gtkrc-2.0 Source: https://docs.xfce.org/xfce/thunar/faq Add this line to ~/.gtkrc-2.0 to specify an icon theme (e.g., Tango) when not using an XSETTINGS manager. Create the file if it does not exist. ```plaintext gtk-icon-theme-name = "Tango" ``` -------------------------------- ### Open root terminal here (gksu) Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens a root terminal in the selected directory using gksu. ```shell gksu xfce4-terminal --default-working-directory=%f ``` -------------------------------- ### Generate build files from git source Source: https://docs.xfce.org/xfce/thunar/thunar-vcs-plugin Run ./autogen.sh to generate build files when building from the git repository. ```bash ./autogen.sh ``` -------------------------------- ### Create shared thumbnails with sharedx.sh Source: https://docs.xfce.org/xfce/thunar/custom-actions Creates shared thumbnails for the selected folder and all subfolders via the DBus Thumbnailing service. Requires a thumbnail generation script (sharedx.sh) which needs python3 and realpath. The script is not part of Xfce and should be used with caution. ```bash /path/to/script/sharedx.sh %f ``` -------------------------------- ### List Thunar advanced settings with xfconf-query Source: https://docs.xfce.org/xfce/thunar/hidden-settings Use this command in a terminal to list all current advanced settings and their values for the Thunar channel. The -l flag lists properties and -v shows their values. ```bash xfconf-query –channel thunar -lv ``` -------------------------------- ### Play with XMMS Source: https://docs.xfce.org/xfce/thunar/custom-actions Plays the selected files or directories with XMMS. ```shell xmms %F ``` -------------------------------- ### Trust desktop files with gvfs checksum Source: https://docs.xfce.org/xfce/thunar/custom-actions Sets the gvfs checksum and executable flag for all selected .desktop files. The command iterates over each file, computes the sha256 checksum, sets the metadata::xfce-exe-checksum attribute, and makes the file executable. ```bash for f in %F; do sha256sum "$f" | awk '{print $1}' | xargs gio set "$f" metadata::xfce-exe-checksum && chmod +x "$f"; done ``` -------------------------------- ### Query Thunar metadata with gio info Source: https://docs.xfce.org/xfce/thunar/faq Returns an abbreviated list of key/value pairs including the file's URI, local path, and unix mount. Use the -a metadata:: flag to limit output to metadata attributes. ```bash gio info -a metadata:: /some/location ``` -------------------------------- ### Move files into a new folder with zenity Source: https://docs.xfce.org/xfce/thunar/custom-actions Prompts for a new folder name using zenity, creates the folder, and moves the selected files into it. Requires the zenity package. The command uses shell variable expansion and the && operator. ```bash NEW_FOLDER=$(/usr/bin/zenity --entry --title 'Move into new folder' --text 'Please enter a name for the new folder') && mkdir "$NEW_FOLDER" && mv %F "$NEW_FOLDER" ``` -------------------------------- ### Add user to sambashare group Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Adds your user to the sambashare group so they can create shares. Replace 'your_username' with your actual login. ```bash usermod -a -G ${USERSHARES_GROUP} your_username ``` -------------------------------- ### Export documents to PDF with unoconv Source: https://docs.xfce.org/xfce/thunar/custom-actions Exports selected documents to PDF using unoconv. Requires the unoconv package. Supports a wide range of document formats including .doc, .docx, .odt, .odp, .pps, .ppt, .xls, .xlsx, .ods, and .pptx. ```bash unoconv -f pdf %F ``` -------------------------------- ### Debugging level 'yes' description Source: https://docs.xfce.org/xfce/thunar/thunar-volman This is the default for SVN snapshot builds. It adds all kinds of checks to the code, and is therefore likely to run slower. ```text `yes' This is the default for SVN snapshot builds. It adds all kinds of checks to the code, and is therefore likely to run slower. ``` -------------------------------- ### Disable recently used files: create GTK settings file Source: https://docs.xfce.org/xfce/thunar/faq Create the file ~/.config/gtk-3.0/setting.ini to prevent Thunar and other GTK applications from storing recently used files. ```ini ~/. config/gtk-3.0/setting.ini ``` -------------------------------- ### Open file in bulk renamer Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens the Thunar bulk renamer for a single selected file. The command uses the --bulk-rename option. ```bash thunar --bulk-rename %f ``` -------------------------------- ### Restart Samba daemons (sysvinit) Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Restarts the Samba service on systems using sysvinit. ```bash /etc/init.d/samba restart ``` -------------------------------- ### Enqueue in XMMS Source: https://docs.xfce.org/xfce/thunar/custom-actions Enqueues the selected files or directories in XMMS. ```shell xmms -e %F ``` -------------------------------- ### Enable image size in statusbar Source: https://docs.xfce.org/xfce/thunar/hidden-settings Sets the /misc-image-size-in-statusbar property to true to show image size in the statusbar. ```bash xfconf-query --channel thunar --property /misc-image-size-in-statusbar --create --type bool --set true ``` -------------------------------- ### Using a for loop for multiple arguments Source: https://docs.xfce.org/xfce/thunar/custom-actions Safely handle multiple arguments by iterating over the %F field code with a for loop. ```shell for f in %F; do cmd "foo $f bar"; done ``` -------------------------------- ### Restart Samba daemons (systemd) Source: https://docs.xfce.org/xfce/thunar/thunar-shares-plugin Restarts the Samba service on systems using systemd. ```bash systemctl restart smbd ``` -------------------------------- ### Extract here (bzip2) Source: https://docs.xfce.org/xfce/thunar/custom-actions Extracts a .tar.bz2 or .tbz2 archive in the current directory. ```shell tar xjf %n ``` -------------------------------- ### Enable hidden setting with xfconf-query Source: https://docs.xfce.org/xfce/thunar/hidden-settings Use this command to create or modify a hidden setting in Thunar's settings channel. Replace /property-name, value-type, and new-value with the actual property, type, and value. ```bash xfconf-query --channel thunar --property /property-name --create --type value-type --set new-value ``` -------------------------------- ### Convert documents to ODT with unoconv Source: https://docs.xfce.org/xfce/thunar/custom-actions Converts selected documents to OpenDocument Text format using unoconv. Requires the unoconv package. The file pattern is limited to .doc and .docx files. ```bash unoconv -f odt %F ``` -------------------------------- ### Extract here (zip) Source: https://docs.xfce.org/xfce/thunar/custom-actions Extracts a .zip archive in the current directory. ```shell unzip %f ``` -------------------------------- ### Using a shell variable for field codes Source: https://docs.xfce.org/xfce/thunar/custom-actions Alternative approach: store the field code in a shell variable and use that variable in the command. ```shell cmd "foo %f bar" (wrong) ->; f=%f; cmd "foo $f bar" (correct) ``` -------------------------------- ### Configure device progress bar in Thunar shortcuts pane CSS Source: https://docs.xfce.org/xfce/thunar/hidden-settings CSS rules to customize the progress bar for devices in the shortcuts pane. Available since Thunar 4.21.3. Adjusts height and colors for normal, warning, and error states. ```css /* The progressbar for devices in the shortcuts pane can be configured starting with Thunar 4.21.3 */ /* Changing the progressbar height */ .thunar .disk-space-usage-bar { min-height: 8px; } /* Changing the color of progressbars */ .thunar .disk-space-usage-bar--normal { background: none; background-color: Green; } .thunar .disk-space-usage-bar--warning { background: none; background-color: Purple; } .thunar .disk-space-usage-bar--error { background: none; background-color: IndianRed; } ``` -------------------------------- ### Open file in terminal text editor Source: https://docs.xfce.org/xfce/thunar/custom-actions Opens the selected file in a terminal-based text editor using xfce4-terminal. The editor is specified by the 'editor' placeholder, which should be replaced with an actual editor command. ```bash xfce4-terminal -x editor %f ``` -------------------------------- ### Correctly quoting field codes in shell commands Source: https://docs.xfce.org/xfce/thunar/custom-actions Shows the correct way to quote field codes like %f when they appear inside quotes, by extracting them and concatenating. ```shell cmd "foo %f bar" (wrong) ->; cmd "foo "%f" bar" (correct) ``` -------------------------------- ### Convert PNGs to JPEGs Source: https://docs.xfce.org/xfce/thunar/custom-actions Converts selected PNG images to JPEG with 75% quality. The hint suggests using '$(basename %f .png).jpg' to strip the .png extension. ```shell convert %f -quality 75 %f.jpg ``` -------------------------------- ### Disable recently used files: GTK settings content Source: https://docs.xfce.org/xfce/thunar/faq Write this content into the settings file to disable the recent files feature. ```ini [Settings] gtk-recent-files-enabled=0 ``` -------------------------------- ### Rename subtitles with subrnm Source: https://docs.xfce.org/xfce/thunar/custom-actions Renames selected subtitle files to match the video file name. Requires the subrnm script and the zenity package. The file pattern includes video and subtitle extensions. ```bash subrnm %F ``` -------------------------------- ### Adjust icon view row and column spacing in Thunar CSS Source: https://docs.xfce.org/xfce/thunar/hidden-settings CSS rules to set row and column spacing for Thunar's icon view. Available since Thunar 1.8.0. Place in ~/.config/gtk-3.0/gtk.css and restart Thunar with 'thunar -q; thunar'. ```css /* Row and column Spacing for the icon view cab be adusted since Thunar 1.8.0 */ * { -ThunarAbstractIconView-row-spacing: 70; -ThunarAbstractIconView-column-spacing: 30; } ``` -------------------------------- ### Rotate JPEGs counterclockwise Source: https://docs.xfce.org/xfce/thunar/custom-actions Rotates selected JPEG images 90 degrees counterclockwise using exiftran. ```shell for file in %F; do exiftran -i2 "$file"; done ``` -------------------------------- ### Prevent DnD context menu on drag Source: https://docs.xfce.org/xfce/thunar/hidden-settings Sets the /misc-file-drag-mode property to THUNAR_FILE_DRAG_MODE_MENU_CONDITIONAL to avoid showing the DnD context menu on each drag operation. ```bash xfconf-query --channel thunar --property /misc-file-drag-mode --create --type string --set THUNAR_FILE_DRAG_MODE_MENU_CONDITIONAL ``` -------------------------------- ### Rotate JPEGs clockwise Source: https://docs.xfce.org/xfce/thunar/custom-actions Rotates selected JPEG images 90 degrees clockwise using exiftran. ```shell for file in %F; do exiftran -i9 "$file"; done ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.