Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
xfce:thunar:using-removable-media [2012/01/30 13:25]
nick [Management of Removable Drives and Media]
xfce:thunar:using-removable-media [2019/08/19 09:22] (current)
kevinbowen
Line 1: Line 1:
-====== Using Removable Media ======+====== Using Removable ​Drives and Media ====== 
  
 ===== Accessing Removable Media ===== ===== Accessing Removable Media =====
 +Before we talk about managing removable media, we need to explain the terms //mount//, //unmount// and //eject//. The Unix file system treats all drives and media as files, albeit a special type of file. In order to be able to access the files on a particular medium, you must first mount the device. This can be accomplished through the command line with the ''​mount''​ command or through a file manager like Thunar. When a drive is mounted, it gets attached to the file system as a subdirectory;​ e.g., as ''/​media/​username/​device-name''​. The files on the medium can then be accessed just like any other files and folders in the file system. If you want to mount a drive from the command line, you must first run a command to determine its device name. Fortunately,​ this is not necessary in Thunar. As soon as a removable device is inserted or plugged in, its name will show up in the Side Pane under the //Devices// section. It can optionally be mounted and opened automatically---see the [[using-removable-media#​managing_removable_drives_and_media|Managing Removable Drives and Media]] paragraph below for details on how to configure those options.
  
-<​del>​Thunar supports removable media if it was built with support for HAL, or if you are using FreeBSDNote however that on FreeBSD 6.or newerit is suggested to use HAL rather than the native support provided by Thunar.</​del>​+You can see the current mount status of a device by looking at its icon in the Side Pane. The icons of unmounted drives ​are greyed outSee the example below for a comparisonYou can also right-click on a device and the context menu will offer an option to either {gui>​Mount} ​or {gui>​Unmount}depending on the current status.
  
-==== To Mount Media ====+<figure "​Removable ​Media in Side Pane: Unmounted (First), Mounted (Second), Right-click Menu (Third)">​ 
 +{{:​xfce:​thunar:​removable-media-in-side-pane.png?​nolink&​|Mounting Media}} 
 +</​figure>​
  
-To //mount// media is to make the file system of the media available for accessWhen you mount media, the file system of the media is attached as subdirectory to your file system.+To mount a device, simply click on its name in the Side Pane and it will be mounted and opened, its contents being displayed in the Main AreaYou can also mount a device without opening it by using the right-click menu.
  
-To access mediainsert ​the media in the appropriate ​deviceor connect ​the new device ​to your computer (i.econnect an USB stick to one of your USB ports). An object that represents ​the media is added to the side pane of the file manager. If ''​xfdesktop''​ is running ​and configured ​to display {gui>​File/​launcher icons} this object will also be added to your desktop.+If any changes are made to the files on the removable mediumcare must be taken to make sure all of the changes have been written to the device ​before it is removed. ​ This is done by unmounting ​or ejecting the medium. The differences between the two are as follows: 
 +  * Unmount---files on the device ​are closed and no longer appear in the Main Area but the device still shows in the Side Pane 
 +  * Eject---files on the device are closed and no longer appear in the Main Area and the device is no longer shown in the Side PaneAlso, for devices like optical drives, the disc will be ejected from the drive. 
 +<​note>​Clicking ​the triangle icon to the right of the device name will perform an //Eject//.</​note>​ 
 +If you have a notification daemon installed ​and enabled and you try to unmount or eject a device while data is still being written ​to it, you will receive a popup notification like the example below.
  
-To actually mount the media, click on the object that represents the media. ​For example, to mount a floppy diskette, click on the {gui>Floppy Drive} object in the side pane. The file manager will now add the file system of the media to your file system hierarchy and display the contents of the floppy diskette in the main area.+<figure "​Removal Notification">​ 
 +{{:​xfce:​thunar:​thunar_removable-media-unmount.png?​nolink&​|}} 
 +</figure>
  
-==== To Eject Media ====+In that case, you should wait until the notification disappears and the medium'​s icon in the Side Pane either dims or disappears (depending on whether you unmounted of ejected). At that point it should be safe to remove the medium or disconnect the drive.
  
-If the drive for the media is a motorized drive (i.e. a CD-ROM drive), right-click on the media object ​in the side pane or on the desktop and choose {gui>​Eject Volume}The media is ejected from the drive after a few seconds. If the drive for the media is not motorized (i.e. a floppy drive or an USB stick)right-click on the media object ​and choose {gui>​Unmount Volume}. After a short period of time, a notification will appear ​to inform you that it is now safe to remove the media or disconnect the drive from the computer.+Be aware that you cannot eject or unmount ​media that are still in use by one or more applicationsTherefore if the file manager refuses to eject media, ​make sure you close all applications that were accessing ​the mediaand be sure to also check command line applications running in ''​Terminal''​ windows
  
-<figure "Unmount notification">​ +===== Managing Removable Drives and Media ===== 
-{{:​xfce:​thunar:​removable-media-unmount.png?​nolink&​|}}+Thunar is able to automatically manage removable drives and media if the ''​thunar-volman''​ package is installed on your system. To enable this feature, open the file manager Preferences,​ go to the {gui>​Advanced} tab and check the {gui>​Enable Volume Management} box in the {gui>​Volume Management} section. Finally, click on the __//​Configure//​__ link right below that. The {gui>​Removable Drives and Media} configuration dialog shown below will be displayed. The tabs in this dialog are organized by device categories to make it easy to locate the options for your specific device. 
 + 
 +<figure "Removable Drives and Media">​ 
 +{{:​xfce:​thunar:​volman-settings-storage.png?​nolink&​|}}
 </​figure>​ </​figure>​
  
-However this notification will only be displayed if support for ''​libnotify''​ is enabled, and you have installed a notification daemon. A notification daemon for Xfce is available from the Xfce Goodies Project. If notification support is not available, wait until the context menu disappears before you remove the media or disconnect ​the drive.+There are two expansion characters ​you can use in the "​command"​ entries in all device categories. 
 +| %d | device file | 
 +| %m | mount point | 
 +==== Storage tab ====
  
-Be aware that you cannot eject or unmount media that is still in use by one or more applications. Therefore if the file manager refuses to eject media, make sure you close all applications that were accessing ​the media, and be sure to also check command line applications running ​in ''​Terminal''​ windows.+=== Removable Storage === 
 +The **Removable Storage** section of the {gui>​Storage} tab contains ​the most important options of the entire dialog. The options are described ​in detail below.
  
-Make sure to unmount ​removable media before ejectingDo not eject a diskette from the floppy drive before your unmount ​the disketteDo not remove an USB stick before ​you unmount ​the flash driveIf you do not unmount ​the media first you might lose data or cause your system ​to crash.+? Mount removable drives when hot-plugged 
 +! Enable this option ​to automatically mount removable drives (e.g., external hard drives or USB sticks) when such drives are plugged into the computer. This option must be enabled in order for most of the other options in this dialog to work with removable drives. For example, if this option is unchecked, {gui>​Browse ​removable media when inserted} will be ignored. 
 +? Mount removable media when inserted 
 +! Enable this option to automatically mount removable media (e.g., CDs or DVDs) in the file manager. As with the previous option, most other features in this dialog require this option to be enabledFor example, {gui>​Play audio CDs when inserted} (under the **Multimedia** tab) will not function unless this option is enabled. 
 +? Browse removable media when inserted 
 +! Enable this option to automatically display the contents of newly inserted drives or media in the Main Area of the file manager. Note however, that the contents will only be displayed if no other action was called for or you choose to ignore ​the other possible actionsFor example, if you insert a CD-ROM with auto-run capabilities and the {gui>​Auto-run programs on new drives and media} option is enabled, ​you will be prompted whether you want to allow or ignore the auto-run. If you choose ​to ignore the auto-run, the contents will then be displayed in the file manager.  
 +? Auto-run programs on new drives and media 
 +! Enable this option to make use of auto-run capabilities of certain removable drives and media. See the [[http://​standards.freedesktop.org/​autostart-spec/​autostart-spec-0.5.html|Desktop Application Autostart Specification]] for details about the auto-run mechanism. As a security precaution, you will always be prompted to confirm the auto-run (see the example below).
  
-===== Management ​of Removable Drives ​and Media =====+! If the Windows emulator WINE is installed on your system, the auto-run mechanism will also try to run ''​autorun.exe''​ files using WINE.  
 +? Auto-open files on new drives and media 
 +! Enable this option to make use of auto-open capabilities ​of certain removable drives ​and media. See the [[http://​standards.freedesktop.org/​autostart-spec/​autostart-spec-0.5.html|Desktop Application Autostart Specification]] for details about the auto-open mechanism. As a security precaution, you will always be prompted to confirm the auto-open (see the example below).
  
-Thunar is also able to automatically manage removable drives ​and media if the ''​thunar-volman''​ package is installed on your systemNote however that this feature requires HAL support.+<figure "​Auto-Run ​and Auto-Open Confirmation Dialogs">​ 
 +{{:xfce:thunar:​thunar_auto-run-confirmation.png?​nolink&​|Auto-run Confirmation}} 
 +{{:​xfce:​thunar:​thunar_auto-open-confirmation.png?​nolink&​|Auto-open Confirmation}} 
 +</​figure>​
  
-Now, if HAL support is available ​and ''​thunar-volman''​ is installed on your system, you can choose to enable the {gui>Volume Management ​}feature ​of ThunarThereforeopen the file manager preferences,​ go to the {gui>​Advanced} page and check the {gui>​Enable Volume Management} button.+=== Blank CDs and DVDs === 
 +Enabling ​{gui>Burn a CD or DVD when a blank disc is insertedallows you to save the step of manually launching a burning application whenever you insert a blank, writable discOnce this box is checkedyou can add an appropriate command---including parameters to specify ​the type of composition---to call the burning application of your choice. Consult ​the help files of your chosen application for supported commands and parametersWhen the blank disc is inserted, one of the following confirmation dialogs will appear, depending on the type of disc detected:
  
-The next step is to customize the management of removable drives and media to your needs. Click on the {gui>Configure} link in the {gui>​Volume Management} section, right below the button. The {gui>​Removable Drives and Mediaconfiguration dialog will be displayed+<figure "Blank Disc Inserted - Confirmation Dialogs"​> 
 +{{:​xfce:​thunar:​thunar_blank-disc-inserted-confirmation.png?​nolink&​|Blank CD Confirmation}
 +{{:​xfce:​thunar:​thunar_blank-dvd-inserted-confirmation.png?​nolink&​|Blank DVD Confirmation}} 
 +</​figure>​
  
-<figure "Management of Removable Drives and Media">​ +In the case of a blank CD, you are presented with separate buttons for choosing a Data or Audio composition type. Choosing the **Burn Data CD** button will execute the command you entered in the {gui>​Command for Data CDs:} field. The **Burn Audio CD** button will run the {gui>​Command for Audio CDs:}. 
-{{:​xfce:​thunar:​removable-drives-and-media.png?​nolink&​|}}+ 
 +If you have inserted a blank DVD, you will only see a {gui>​Burn DVD} button. Choosing this will execute the command entered in the {gui>​Command for Data CDs:} field. 
 + 
 +==== Multimedia tab ==== 
 +As with the **Blank CDs and DVDs** choices under the **Storage** tab, the three options under the **Multimedia** tab offer shortcuts to the actions to be performed when these media or devices are inserted or plugged in. The syntax of the commands that can be entered here (along with those on the **Cameras**,​ **PDAs**, **Printers** and **Input Devices** tabs) is beyond the scope of this document. The screenshot below shows a couple of possibilities,​ but you will need to consult the application help files or device user guides in question for the others. 
 + 
 +<figure "Multimedia Tab">​ 
 +{{:​xfce:​thunar:​volman-settings-multimedia.png?​nolink&​|Multimedia Tab}}
 </​figure>​ </​figure>​
 +