The "Send To" Menu
Thunar includes a Send To sub menu, which provides possible targets where files can be sent to. It is available from both the file context menu, and the File menu in the menu bar.
Default targets
By default, the Send To menu includes an entry named Desktop (Create Links) for all files and folders, which simply creates a link on the desktop for each selected file. In addition, if the Shortcuts side pane is active, the menu also includes an entry Side Pane (Create Shortcuts) for folders, which allows the user to add new shortcuts to the side pane (if you don’t want to use drag’n’drop).
The Thunar distribution also includes the thunar-sendto-email plugin (in the plugins/ subfolder), which adds an entry Mail Recipient to the menu, that opens the mail composer with the selected files attached to the new email. If the selection contains atleast one folder, the selected items are added to a ZIP archive before attaching them. Otherwise, if the selection contains multiple files, or a single file, which is larger than 200KiB, the user will be prompted whether to pack the files into a ZIP archive, and send the ZIP archive. The mail composer is launched via the Xfce Preferred Applications framework, but the applications (and esp. the launchers) must support attaching files to emails explicitly (fortunately, all included launches for mail clients, i.e. Thunderbird, Evolution, Sylpheed, Kmail and Mutt, already support this since exo 0.3.1.7).
Attachments with icedove doesn’t work for me here, so I wrote my own .desktop file, and placed it in .local/share/Thunar/sendto/icedove.desktop
With the following lines in it:
[Desktop Entry] Type=Application Version=1.0 Encoding=UTF-8 Exec=icedove -compose 'attachment=file://%F' Icon=icedove Name=Icedove
Extending the menu
The Send To menu can be easily extended by users and other applications using standard desktop entry files, that are placed in $XDG_DATA_DIRS/Thunar/sendto.
For example, say you want to add a new entry to the menu, named Foo, that sends the selected files to the program foo. Just add a new file, named foo.desktop (the entries in the menu are sorted by their filenames), to the directory ~/.local/share/Thunar/sendto/ (just create the directory if it does not already exists), with the following content:
[Desktop Entry] Type=Application Version=1.0 Encoding=UTF-8 Exec=foo %F Icon=foo Name=Foo
The target will automatically appear in Thunar’s Send To menu now (Thunar automatically reloads the targets whenever a change on one of the sendto directories is noticed).
Linux distributions
Linux distributions (for example Xubuntu) may use this mechanism to add targets to the menu for currently connected devices, like floppy disks, portable media players, and the like. This could be done by creating a .desktop file in one of the Thunar/sendto directories in the $XDG_DATA_DIRS whenever a new device is connected, and removing the .desktop file once the device is disconnected. Feel free to contact us if you need help implementing this for a specific distribution.
Examples
This section provides a few examples to demonstrate how to add additional targets to the Send To menu.
Printer (xfprint)
Save the content below to a file x-xfprint.desktop in ~/.local/share/Thunar/sendto/ (create the directory if it does not already exists):
[Desktop Entry] Version=1.0 Type=Application Encoding=UTF-8 Name=Printer Exec=xfprint4 %f Icon=xfprint
X Multimedia System (xmms)
Save the content below to a file x-xmms.desktop in ~/.local/share/Thunar/sendto/ (create the directory if it does not already exists):
[Desktop Entry] Version=1.0 Encoding=UTF-8 Type=Application Name=X Multimedia System Exec=xmms -e %F Icon=applications-multimedia MimeType=audio/x-ogg;audio/x-speex;application/x-ogg;audio/x-aiff;audio/aiff;audio/x-pn-aiff;audio/basic;audio/x-basic;audio/x-pn-au;audio/x-wav;audio/wav;audio/x-pn-wav;audio/x-pn-windows-acm;audio/x-m4a;audio/x-8svx;audio/8svx;audio/x-16sv;audio/168sv;audio/mpeg2;audio/x-mpeg2;audio/mpeg3;audio/x-mpeg3;audio/mpeg;audio/x-mpeg;audio/x-mpegurl;audio/mpegurl;audio/mp3;audio/x-mp3;application/x-flac;
Bluetooth to Your Phone Using Gnome Obex Send (gnome-obex-send)
This will allow you to send files from your PC to your phone (or other device using Bluetooth OBEX push). This fil
Save the content below to a file gnome-obex-send-generic.desktop in ~/.local/share/Thunar/sendto/ (create the directory if it does not already exists):
[Desktop Entry] Type=Application Version=1.0 Encoding=UTF-8 Name=Bluetooth OBEX Recipient Icon=internet-mail Exec=/usr/bin/gnome-obex-send %f
This will allow you to select from a list of potential Bluetooth-enabled recipients. Since there is no gnome-obex-send in Hardy, use Exec= bluetooth-sendto %F instead (it’s in bluez-gnome package).
If you have a particular device you’d like to send to and want to avoid having to select it everytime, you can do the following. First, you need to figure out the recipient device’s Bluetooth address using hcitool. Then customize the following file by inserting the Bluetooth address where it says INSERT BLUETOOTH ADDRESS:
[Desktop Entry] Type=Application Version=1.0 Encoding=UTF-8 Name=My Bluetooth Device Icon=internet-mail Exec=/usr/bin/gnome-obex-send -d INSERT BLUETOOTH ADDRESS %f




