View the GNOME desktop version

Use FTP under Ubuntu M 174

To use Firefox, simply type the address into the address bar, remembering to preceded it with ftp:// rather than http://. Once you're connected, Firefox lets you drag and drop files onto the the desktop (or Nautilus windows), but you can't upload files to a site.

If the FTP site requires a username/password you'll be prompted for it, or you can also supply it within the url in the form username:[email protected], for example:

ftp://kei r:[email protected]


Using Ubuntu's default file manager provides perhaps the most fussfree and capable choice of FTP client and allows drag and drop of files to and from the server (ie download and upload). To access a site, click on any Nautilus file browsing window and click Go ^ Location. Then type the site address, remembering to include the ftp:// prefix. Once connected you'll be prompted for your username/password, if applicable, and you'll be able to have Nautilus remember it for future access.

Following connection, the FTP site is treated like any other mounted file system and an icon will appear on the desktop. To disconnect from the site, right-click the desktop icon and select Unmount Volume. One handy tip is to create Nautilus bookmarks of FTP directories you access frequently. You can do this by clicking Bookmarks ^ Add Bookmark, or just hitting [Ctrl ]+d), as in Firefox. Once the bookmark is clicked upon in future, Nautilus will connect automatically, as if the folder concerned were on your own computer or the local network.

Command-line ftp tool

The third method of FTPing provided by Ubuntu is to the use the command-line ftp tool. You can connect to a site by typing the following: ftp

Obviously, you should replace with the address of the FPT site. Following this you'll be prompted for your username (just hit (Enter) if it's the same as your Ubuntu login) and then your password.

Following connection, ftp works mostly the same as a standard command-line prompt. ls can be used to list files, cd can be used to switch folders, and so on. The two unique but essential commands are get and put, which download and upload specified files, respectively.

Switch to old-fashioned tree-view in Nautilus M 175

Typing an exclamation mark (!)20 will give you a shell session on your computer for quick file operations. To return back to the ftp program, type exit (don't type ftp—that will start a NEW ftp session!).

Another useful command is help, which lists the available commands. You can then use help to ask for information about a specific command: help pwd. Once you've finished your uploading/downloading work, type quit to disconnect from the site and quit the ftp program.

If you long for a Windows-like FTP experience of using a program such as FTP Explorer or CuteFTP that shows the site contents within a single window, then give Gftp a try. Use Synaptic to search for and install the gftp-gtk package. Once installed, this can be found in the Applications — Internet menu.

To learn how to setup your own personal FTP server, see Tip 226, on page 265.

Remember how file manager windows used to show files on the right, and show a tree-view of the file system on the left? This made it easy to hop from place to place in the file system.

To switch back to this way of working with Nautilus, click the Places dropdown above the left-hand pane and select Tree. By default you'll only see folders listed in tree view. To have files listed too, click Edit — Preferences and remove the check from Show only folders under the Tree View Defaults heading in the dialog box that appears.

For more Nautilus tricks, see Tip 72, on page 129; Tip 85, on page 143; Tip 165, on page 203; Tip 104, on page 157; Tip 144, on page 187; Tip 261, on page 301; Tip 272, on page 312; and Tip 295, on page 343.

Switch to old-fashioned tree-view in Nautilus

20. An exclamation mark (!) is known as a "bang" in Linux-speak. You'll often hear it referred to as such in Linux documentation.

Kill any crashed program M 176

When a Linux users wants to get rid of a crashed program, he kills it—literally. The kill command is used for this purpose, but it needs the program ID (PID) number to work. This can be discovered using the pgrep. For example, let's say Firefox has crashed and won't respond to requests to quit. Open a terminal window, and type the following: $ pgrep firefox

A three or (more likely) four digit number will be returned—something like 7198. All you need then do is type the following:

$ kill 7198

You might also try the killall command. This lets you specify the program name—killall firefox, for example.

The kill command has a more ruthless brother, designed to click-and-kill GUI programs: xkill. Just type the command from a terminal window and, after the cursor has changed to a cross, click on the crashed program. It will be terminated instantly. If you decide to change your mind, right-clicking anywhere will cancel xkill. Bear in mind that xkill can also terminate components of the GNOME desktop, so if the panel stops responding, for example, it can be used.

Was this article helpful?

0 0

Post a comment