Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
This chapter is from the book

Preferred Behaviors

Ubuntu can detect and adapt to certain events that happen when you plug something into your computer or if you click on a link. Sometimes you may want Ubuntu to open one application rather than another, or sometimes to not do anything at all. This is called Ubuntu's behavior, and you can modify it to work as you want it to.

You can find the two main tools you need to do this under the System, Preferences menu, and you need use either Preferred Applications or Removable Drives and Media.

Preferred Applications

Preferred applications are the applications that Ubuntu calls upon when it wants to open an Internet site, an email, or a terminal (see Figure 2.10). Ubuntu makes it easy for you by automatically detecting the available options for you. Alternatively, if you want to specify your own particular application that may not appear in the list by default, select the Custom option within the application type and enter the command used to launch the application into the field along with any options, arguments, or switches that you want to use.

Figure 2.10

Figure 2.10 Setting preferred Internet applications.

Removable Drives and Media

In an increasingly connected world, you will find yourself plugging all sorts of devices and widgets into your computer. For the most part, it is usually multimedia files that you want to launch in a specific way. Ubuntu provides a great tool to configure the consequences of everything from plugging a digital camera into your computer, inserting a film DVD, and even plugging in a graphics tablet.

This handy tool goes by the catchy name of Removable Drives and Media, or to call it by its proper (package) name, gnome-volume-properties. With this tool, you can select the default command to run when Ubuntu detects the presence of a new drive or piece of hardware. Unlike the Preferred Applications tool, this tool does not detect the options for you, instead relying on you knowing the command needed to execute the correct application.

For example, in Figure 2.11, you can see the options for handling digital images in Ubuntu. Rather than using gthumb to import pictures from a digital camera, I want Ubuntu to use F-Spot, a cool photo management and editing application available through synaptic. In this case, I need to enter the f-spot command in the Command field and make sure to check mark the Import Digital Photos When Connected option.

Figure 2.11

Figure 2.11 Take the hard work out of importing digital images by configuring gnome-volume-properties to work the way you want.

Now when I connect my digital camera after a hard day's snapping, GNOME will detect its presence and launch F-Spot, ready for it to import my pictures directly into its library.

Other options include GNOME's behavior when removable drives (USB pen drives and the like) are connected, what to do in the event of a PDA or scanner being connected, and even more obscurely, what to do when a USB mouse is plugged in.

  • + Share This
  • 🔖 Save To Your Account