[Thunar-workers] [Thunar File Manager] page added: documentation:sendto_menu

thunar-workers at xfce.org thunar-workers at xfce.org
Sun Jun 11 22:15:57 CEST 2006


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2006/06/11 20:15
Browser     : Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051116 Firefox/1.0.7
IP-Address  : 80.131.232.98
Hostname    : p5083E862.dip.t-dialin.net
Old Revision: none
New Revision: http://thunar.xfce.org/pwiki/documentation/sendto_menu
Edit Summary: created
User        : benny

====== 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.

{{ :documentation:thunar-sendto.png |:documentation:thunar-sendto.png}}

===== 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 40KiB, 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 [[http://www.xfce.org/documentation/api-4.4/exo/exo-Executing-Applications.html|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).

===== Extending the menu =====

The **Send To** menu can be easily extended by users and other applications using standard [[http://freedesktop.org/wiki/Standards_2fdesktop_2dentry_2dspec|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:

<file>
[Desktop Entry]
Type=Application
Version=1.0
Encoding=UTF-8
Exec=foo %F
Icon=foo
</file>

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 [[http://www.xubuntu.org/|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 easily archived 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 removed. Feel free to [[start#mailinglist|contact us]] if you need help implementing this for a specific distribution.


-- 
This mail was generated by DokuWiki at
http://thunar.xfce.org/pwiki/




More information about the Thunar-workers mailing list