Using File Dialog Boxes in Linux


Now that you know something more about the Linux file system, paths, and home directories, you're ready to master the Save As file dialog box shown in Figure 5.2. Here are the major components that you see in the file dialog box and how each of them is used:

  • The Name box allows you to enter either a filename or full file path by hand for loading or saving. If you know the path to the file you want to access, just typing it into the filename entry box can sometimes be faster than navigating through the file system using the mouse. If you enter only a filename, the file is stored using that name in the current directory.

  • The Save in folder drop-down list begins by showing the current directorythe directory to and from which the application is currently expecting to save or load files. Clicking on this list lets you opt to save or load from other common locations or locations that you've bookmarked (something we'll discuss in a moment), like your Desktop or removable storage devices such as Zip drives or USB memory sticks.

  • The Character coding drop-down list, which won't always be present, is used to save your files using special character sets if, for example, you are working on a document that contains international characters.

  • Click Browse for other folders when you want to store a file in a specific folder that hasn't been bookmarked, and thus isn't listed in the Save in Folder drop-down list. When you click Browse for other folders, the file dialog box expands to provide you with additional navigation tools, as shown in Figure 5.6.

    Figure 5.6. Click Browse for other folders to expand the Save As file dialog box if you want to navigate through the file system.


In the expanded file dialog box that's displayed when you click Browse for other folders, you'll see two panes. The left pane contains a list of common "starting" locations, including your Home directory (Home), your desktop (Desktop), the root directory (Filesystem), or removable storage devices like a CD drive (CD-ROM), as well as any locations in the file system that you've bookmarked. In the right pane are the files or folders stored in the current location. A number of navigational tasks can be performed in the expanded file dialog box:

  • Double-click on any folder that's listed in the right-hand pane (marked with a folder icon) to "visit" that folder and display its contents in the right-hand pane.

  • When you locate the file that you are looking for in the right-hand pane, double-click to save the current document using that name (in a save file dialog box) or to load the document (in an open file dialog box).

  • Click on any path navigation button to visit the directory in question along your current path. For example, if the right-hand pane is currently displaying the files in /usr/X11R6/lib, you will see path navigation buttons labeled usr, X11R6, and lib, each of which will cause the directory in question to be displayed in the right-hand pane.

  • Use the Add bookmarks button to add a location to the left-hand pane for quick return after you've browsed to it.

  • Use the Delete bookmarks button to remove a location that you no longer use very often from the left-hand pane.

Using the file dialog box, you can navigate to any location in the Linux file system and ask an application to create a new file there, or to load an existing file that is already stored there.

Practice Using the File Dialog Box

If the file dialog box seems confusing to you, take a few moments to navigate around the file system using the dialog box so that you become comfortable with it. Use the present working directory drop-down to visit the root directory of the Linux file system and then double-click your way back to /home/you using the directory navigation pane.


When you feel comfortable with the Save As file dialog box and have navigated back to your home directory, enter a suitable name for the text file you want to create in the filename entry box; for this example, name the file anotherfile.txt, as shown in Figure 5.7. After you name the file, click Save to save it and close the Save As dialog box.

Figure 5.7. Here, text is being saved in a file named anotherfile. txt in the home directory.


After you save the file under its new name, the new filename appears in the application window's title bar. From now on, choosing File, Save while you work in this file saves your changes in the same placein anotherfile.txt.

What's the Difference Between Save and Save As?

You might notice that the text editor's File menu has two save options: Save and Save As. Choosing Save replaces the existing, stored version of your document with the contents of the current application window, including any changes you've made since last accessing the file; choosing Save As opens the Save As dialog box, so that you can save the file under new name or in a different directory. Each time you use Save As and enter a new filename for a file you're working on, a new file is created. This way, you can maintain multiple versions of the same file and access each at will.


After you save anotherfile.txt, choose File, Quit to exit the text editor. You should now see an empty desktop once again.



    SAMS Teach Yourself Red Hat(r) Fedora(tm) 4 Linux(r) All in One
    Cisco ASA and PIX Firewall Handbook
    ISBN: N/A
    EAN: 2147483647
    Year: 2006
    Pages: 311
    Authors: David Hucaby

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net