Thunar

Configure >
For those who haven't yet progressed from using a graphical interface file manager, and for learner PC users, I recommend Thunar, as it's light-weight, fast and expandable with all kinds of right-click actions you can make yourself to make work a lot faster.



Some tips


To drag-select files



To move files



Navigate

Alt-left go back in the directory history
Alt-right go forwards


Tabs

Thunar 1.6 has a Tabs feature, which makes it easier for moving files to locations all in one window and without going back and forwards in the directory browse history. You can select and drag files to the tab header and then drop them at that location.

My tabs shortcuts are Crtl-Space and Shift-Space to add or close tabs. But there's no easy shortcut to switch from one tab to the next!!

There's a "Skip All" button in the Copy/Move dialogue so that you can copy a whole dir of files over and skip all the identical files, but if you want to copy over updated files you'll still have to click on Replace one-by-one, checking the time-stamps. For updating you need to make a custom action that will `rsync -u` the selected files to the next tab.


Shortcut panel

No Documents, Downloads, Music, Video folders in home? -go to them in the 'Go' menu and they will appear. Then drag them to the shorcuts on the left.

You can set the directory location of these icons by editing the ~/.config/user-dirs.dirs file, e.g.
 
just edit the path to your music dir, and restart the file manager if it's opened.


You can select which places will show in the left-hand panel. Just right click there and select from DEVICES, PLACES or NETWORK.

Switch to expandable folder tree with Ctrl-E, and to Places pane with Ctrl-B. Hit the same again and the tree pane is hidden.


Another massive improvement with 1.6 is the ejecting of media... with 1.4 there would always be an error saying data needs to be written, even long after a file transfer was done. Pulling out a USB stick, for example, would often render the stick read-only. Now in 1.6 the eject button, next to the mounted device, has a wait/process icon and then the media disappears from Devices, safe to pull out.



Modify the menu bar accelerator keys

Set up GTK accels
 
add the line
 
and restart Thunar. Then mouse over a menu item and type a new shortcut key (works with any GTK drop-down menus).

Here are my own shortcuts

Alt-W New window
Alt-Escape Close
Ctrl-Space New Tab
Shift-Space Close Tab
Alt-NNew folder
Alt-D Duplicate
Alt-L Make Link
Alt-Q Home
Alt-1 to Alt-0 Locations




Right-click custom actions

This is what makes Thunar much more versatile than some other file managers, having the ability to launch nearly any command on selected dir's and files through the right-click menu. There are lots of ideas in the links below and then all mine are listed here too. You can make any kind of custom action depending on what you need to do, you just need to experiment with the Thunar macros (i.e. %f, %F, %n, etc) and see what works.

There is a limit however as to what you add to the right-click menu, as that menu is going to get quite full!

Note that all my custom actions here are included in my Ranger keybinds which is a faster way to work than with Thunar. I use yad here instead of zenity.

Introduction thunar.xfce.org/...
http://forums.debian.net/...
 
Custom actions shown after a righ-click on a folder..and on a file




Here are the best custom actions I've found/used so far

Name Command Appearance conditions
search here catfish --fileman=thunar --path=%f directories
Create Folder mkdir "`yad --entry --height=100 --width=400 --title="Enter New Folder Name"`" check all
Create New File touch "`yad --entry --height=100 --width=400 --title="Enter New File Name"`" check all
edit as root gksu geany %f text files, other files
open terminal here (set preferred terminal in the settings manager) exo-open --working-directory %f --launch TerminalEmulator directories
open terminal here exo-open --working-directory %d --launch TerminalEmulator all other files
open root thunar here gksu thunar %f directories
make executable chmod +x %F all other files
display disk usage du -chs --apparent-size %N | zenity --text-info all
     
duplicate files (with suffix) for file in %F ;do cp "$file" "$file"_1 ;done all
duplicate files (with infix _1) for f in %F; do cp "$f" "${f/\.*/_1\.${f##*.}}" ;done all
send to <cloud sync> folder cp %n /home/username/<sync_folder>/%n text files
move to mv %F "`yad --file --directory --height=400 --width=500`" all
copy to cp %F "`yad --file --directory --height=400 --width=500`" all
sync files/dirs to rsync -a %F "`yad --file --directory --height=400 --width=500`" directories, text files
make a symlink (select directory) ln -s "`yad --file --directory --height=400 --width=500 --title=Choose\ Directory\ to\ Link\ to!`" directories
create a bookmark to a directory ln -s %f ~/Bookmarks/%n directories
compare meld %F text, other, directories



delete bypass trash (with confirm) yad --height=100 --width=300 --question --title="DELETE FILE" --window-icon="/usr/share/icons/Tango/16x16/actions/edit-delete.png" --text="DELETE\ %N\ FOREVER!!" ; if [ $? = 0 ] ; then rm -r %F ; fi as you prefer
secure delete (with confirm) yad --height=100 --width=300 --question --title="FILE\ SHREDDER" --window-icon="/usr/share/icons/Tango/16x16/actions/edit-delete.png" --text="SHRED\ IT!!" ; if [ $? = 0 ] ; then srm %f ; fi text files



start a slide show of images from 1st file, 3 sec int, -d to draw file name (need to install feh) feh -dFZ -D 3 * image files
...F full screen, start on selected file
...Z auto-zooms images if nec
feh -dFZ --start-at %n * image files
start slideshow of a whole directory of images recursively, by file name order feh -rSfilename -dFZ -D 4 %f directories
the -g sets the window size (man page) feh -r -g 1024x768 %f directories
Edit in Xnview /usr/sbin/xnview %n *.jpg;*.JPG;*.JPEG;*.png;*.PNG etc /image files
put in thunar's uca.xml: <icon>/opt/XnView/xnview_2.png</icon>  
     
extract audio from video ffmpeg -i %f -vn -ar 44100 -ac 2 -ab 192 -f mp3 output.mp3 video files
open dir with easytag easytag %d audio files



create 7z archive 7z a -t7z %n.7z %N directories, other files, text
create tar.bz2 archive tar jcf %n.tar.bz2 %n directories, other files, text
Extract here (tar.bz2) tar -xjf %n *.tar.bz2;*.tbz2 /other files
Extract here (tar.gz) tar -zxf %n *.tar.gz /other files
Extract here (zip) unzip %f *.zip  /other files
Extract here (xz) tar -xJf %f *.xz /other files
     
mount iso (`mkdir /mnt/mounted` 1st) gksu 'mount -o loop -t iso9660 %f /mnt/mounted' && thunar '/mnt/mounted' *.iso;*.ISO;*.nrg;*.NRG
unmount iso (do on the ISO already mounted) gksu 'umount /mnt/mounted' *.iso;*.ISO;*.nrg;*.NRG
clone a directory tree (make empty dir's) find . -type d -exec mkdir -p -- ../{} \; %F directories


Also, see my Image processing page, under My Tutorials, for custom actions with Mogrify for converting and resizing images. Plus my custom actions with ffmpeg commands on my HD Video page.



Custom actions to backup files (using scripts)

duplicate with infix
 

Thunar command: ~/scripts/duplicate %f
conditions: any

copy to backup (1st make the dir)
 
Thunar command: ~/backup.sh %n
conditions: text, other files



Tip: in the custom action description, an underscore "_" before a character makes that character the shortcut key for the action on the right click menu.

So for opening a file with geany, I use _.geany %f which means I can hit the "context menu" button to the right of Space bar and then "dot" and I get geany, which is quite fast.



Next page:

Firewall - set up a simple firewall using iptables