Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Beginning Ubuntu Linux - From Novice To Professional (2006)

.pdf
Скачиваний:
71
Добавлен:
17.08.2013
Размер:
25.54 Mб
Скачать

488

C H A P T E R 3 4 A C C E S S I N G C O M P U T E R S R E M O T E L Y

Accessing Ubuntu via Remote Desktop

A less secure but more convenient way to access your PC’s desktop across a network is to use Ubuntu’s Remote Desktop feature. The advantage of this method is that the desktop of the remote computer appears in a window on the remote computer’s desktop, so there’s no need to kill the existing X server and start a new one.

Remote Desktop uses the Virtual Network Computing (VNC) software to share the desktop. Sharing is the key word because, effectively, anyone who connects will take control of the main desktop. They will control the mouse and keyboard input.

However, there are a couple of important differences compared to accessing X across an ssh connection:

Although the password is sent encrypted, the rest of the VNC data transfers aren’t. Complete encryption is possible using special versions of VNC, or via an OpenSSH tunnel, but this can be difficult to set up on the Windows end of the connection.

The remote desktop isn’t blanked, so anyone standing in front of the computer will be able to see what you’re doing. This could present a security/privacy risk.

If you’re prepared to put up with these caveats, then allowing remote desktop access on a computer is easy. Here’s the procedure:

1.Click System Preferences and then click Remote Desktop. Put a check alongside Allow Other Users to View Your Desktop and ensure there’s a check in the box alongside Allow Other Users to Control Your Desktop, as shown in Figure 34-3. Beneath this option, you can choose whether the user can confirm each connection and whether you want to set a password. Both options add to the security of your system, although the confirmation option will mean that someone will have to be at the computer to authorize an incoming connection.

Figure 34-3. Ubuntu’s Remote Desktop feature lets you share your desktop but isn’t as secure as making an X server connection across SSH.

C H A P T E R 3 4 A C C E S S I N G C O M P U T E R S R E M O T E L Y

489

Note Ignore the information in the dialog box about how users can view your desktop, because the address it gives is wrong. Instead, you should find out your computer’s IP address and use that. To do this, click Applications System Tools Network Tools. Ensure your network device is selected in the dropdown list and look for the IPv4 IP address in the list.

2.On the computer from which you want to connect to the remote desktop, click Applications Internet Terminal Server Client. In the Computer field, enter the IP address of the computer you wish to connect to. In the Protocol drop-down list, select VNC. Then click Connect.

3.You’ll be prompted to enter the password, if one is applicable, and you should then see the remote computer’s desktop in a window. Once you’ve finished, simply close the window to terminate the connection.

Connecting to Remote Windows Computers

The Terminal Server Client program allows you to connect to a variety of remote desktop server programs and, in particular, Windows XP or Windows 2000 computers via the Remote Desktop Protocol (RDP). Unfortunately, Windows XP Home, Me, 98, and 95 don’t support RDP connections, which means that they aren’t able to run an RDP server and allow other computers to access their desktops. However, there is a way to access the desktop of these computers remotely using some add-in software.

Connecting to Windows XP Professional, 2000, and NT

Using Terminal Server Client to access a Windows XP Professional, 2000, or NT computer is easy. Here, I use an XP Professional machine as an example, but the instructions are valid for 2000 and NT, too.

You’ll find the Terminal Server Client program on the Applications Internet menu. Once it’s running, in the Computer field, type either the IP address of the machine or its FQDN (if applicable). You don’t need to type the username, password, or any other details. Click Connect, and a new window should appear in which you should see an XP login prompt. You should then log in to Windows using your username and password.

Caution If you haven’t set a password for your user account on the Windows machine, you won’t be able to log in. This is a quirk of the Windows XP RDP system. The solution is simple: use the User Accounts applet within the Windows Control Panel to assign yourself a password.

490

C H A P T E R 3 4 A C C E S S I N G C O M P U T E R S R E M O T E L Y

Of course, the XP computer will need be configured to allow incoming RDP connections. To configure it, right-click My Computer, selecting Properties, click the Remote tab, and make sure Allow Users to Connect Remotely to This Computer is checked, as shown in Figure 34-4. The Windows computer to which you want to connect may also need to be updated with the latest service packs, particularly in the case of a Windows 2000 computer.

Figure 34-4. You can access remote Windows XP Professional machines using RDP and the Terminal Server Client program.

If this is the first time you’ve accessed the Windows computer over an RDP connection, you might be wondering why the graphics look so bad. This is because they’re heavily compressed in order to transmit efficiently across networks.

C H A P T E R 3 4 A C C E S S I N G C O M P U T E R S R E M O T E L Y

491

Note As with Ubuntu’s Remote Desktop feature, when logging in via RDP, you will be literally sharing the same desktop as anyone who might be standing in front of the computer. Because of this, for privacy and security, the desktop on the remote computer will be blanked when you log in.

Connecting to Other Windows Computers

You can download a VNC server for just about any operating system. Windows and Linux are supported, as is Macintosh OS X. In fact, a VNC server will run on any Windows computer, from 95 upwards. Once it’s installed, you can then use the Terminal Server Client program within Ubuntu to connect to that computer’s remote desktop.

Note In fact, any computer that’s running the VNC Viewer program can access a computer running a VNC server (including the one set up by Ubuntu’s Remote Desktop feature). Various VNC Viewer programs are available for Linux, Windows, Macintosh OS X, and other operating systems, including the likes of PocketPC. Just search the Web using “VNC Viewer” as a search string to find viewer programs.

Of course, you’ll have the same insecurities and lack of desktop blanking that plague VNC connections to a Ubuntu desktop, as described previously. But if you’re prepared to accept this, you’ll be pleased to hear that setting up the VNC server on the Windows machine is easy. TightVNC, available from www.tightvnc.com, is one of the best variations of VNC around. You should download the Self-Installing Package for Windows. During installation, you’ll be asked if you want to register TightVNC as a system service. Click the check box alongside this option. This will activate the VNC server every time the computer starts.

Once the program has installed, the server configuration program will appear. You should change the password by overtyping the default in the Password field.

Connecting to the remote Windows machine is also a piece of cake. On the Ubuntu system, open Terminal Server Client (Applications Internet) and type the remote computer’s IP address into the Computer field. In the Protocol drop-down list, select VNC. Then click Connect. You’ll be prompted for the remote computer’s VNC server password and, once you enter this, the remote desktop will appear in a window. Figure 34-5 shows an example of connecting to a Windows 98 computer.

492

C H A P T E R 3 4 A C C E S S I N G C O M P U T E R S R E M O T E L Y

Figure 34-5. By installing a VNC server, you can connect to just about any remote operating system, including Windows 98 (as here).

Summary

In this chapter, we looked at how you can access your Ubuntu computer remotely across the Internet. We examined how you can access the computer as if you were sitting in front of it, using the ssh program. This allows you to start a command-line prompt and even run GUI programs on the remote computer.

In addition, we discussed how the screen program can be used to keep sessions alive across various logins, and how you can transfer files using the sftp and scp programs. Then we looked at how to use the Terminal Server Client tool to access the desktop of remote Windows computers.

A P P E N D I X A

■ ■ ■

Glossary of Linux Terms

This appendix provides brief explanations of common terms used in the Linux and Unix environments. These include technical terms, as well as conventions used within the Linux community. Due to space limitations, this glossary is somewhat selective, but still should prove a lasting reference as well as a helpful guide for those new to Linux.

Cross-referenced terms are highlighted in italics.

Symbols

.

Symbol that, in the context of file management, refers to the current directory.

..

Symbol that, in the context of file management, refers to the parent directory of that currently being browsed.

/

Symbol that, in the context of file management, refers to the root of the file system; also separates directories in a path listing.

~

Symbol that, in the context of file management, refers to a user’s home directory.

|

Pipe symbol; used at the command prompt to pipe output from one command to another.

>

Symbol that, when used at the command prompt, indicates output should redirect into a file.

493

494

A P P E N D I X A G L O S S A R Y O F L I N U X T E R M S

<

Symbol that, when used at the command prompt, indicates a command should accept input from a file (see redirect).

#

Symbol that, when it appears on the command prompt, usually indicates the user is currently logged in as root.

$

Symbol that, when it appears on the command prompt, usually indicates the user is currently logged in as an ordinary user. (Note that some versions of Linux/Unix use % or > instead of $.)

?

Wildcard character indicating that any character can be substituted in its place.

*

Wildcard character indicating that zero or more characters can appear in its place.

*nix

Popular but unofficial way of describing the family tree that comprises Unix and its various clones, such as Linux and Minix.

A

administrator

Another word for either the root user or one who has adopted that user’s powers temporarily.

AIX

IBM’s proprietary form of Unix that runs on the company’s proprietary hardware, as well as commodity hardware based around AMD and Intel processors. Nowadays, IBM is slowly deprecating AIX in favor of Linux.

alias

Method of creating a user-defined command that, when typed, causes another command to be run or a string to be expanded.

Apache

Popular Open Source web server software that runs on Unix, Linux, and other operating system platforms. Considered responsible in part for the rise in popularity of Linux in the late 1990s.

A P P E N D I X A G L O S S A R Y O F L I N U X T E R M S

495

applet

Small program that, in the context of the Ubuntu desktop, runs as part of a larger program and offers functions that complement the main program. The GNOME desktop incorporates several applets in its notification area.

APT

Advanced Packaging Tool; the underlying system by which software is managed and installed on Ubuntu and Debian Linux systems. Shell commands beginning with apt, such as apt-get, are used to install new software from various repositories. Under Ubuntu, the Synaptic Package Manager program provides a GUI method of using APT.

archive

Any file containing a collection of smaller files, compressed or otherwise (see also tar).

B

BASH

Bourne Again SHell. The most common shell interpreter used under Linux and offered as default on many Linux systems.

binary executable

Another way of referring to a program that has been compiled so that it can be used day-to-day. See also compile.

block device

How the Linux kernel communicates with a device that sends and receives blocks of data; usually a hard disk or removable storage device. See also character device.

BSD Unix

Berkeley Software Distribution Unix; form of Unix partially based on the original Unix source code but also incorporating recent developments. BSD is open source and free for all to use and share with practically no restrictions. There are various forms of BSD Unix, such as FreeBSD, NetBSD, and OpenBSD. BSD doesn’t use the Linux kernel, but it runs many of the same programs. Some of the programs offered within the Linux operating system come from BSD.

bzip2

Form of file compression. Together with the older and less efficient gzip, it is a popular form of file compression under Linux and the equivalent to Zip compression under Windows. Files employing bzip compression are usually given a .bz2 file extension. See also tar.

496

A P P E N D I X A G L O S S A R Y O F L I N U X T E R M S

C

C

Programming language in which much of the Linux kernel is written, as were later versions of Unix before it. C was created by some of the same people who created Unix, and its development mirrors that of Unix.

C++

Object-oriented programming language; originally designed to be an enhancement to C, but now seen as a popular alternative.

C#

Modern programming language, which uses similar syntax to C, created by Microsoft and re-created on Linux via the Mono project.

character device

How Linux refers to a device that sends/receives data asynchronously. For various technical reasons, this typically refers to the terminal display. See also block device.

checksum

Mathematical process that can be applied to a file or other data to create a unique number relative to the contents of that file. If the file is modified, the checksum will change, usually indicating that the file in question has failed to download correctly or has been modified in some way. The most common type of checksum program used under Linux is md5sum.

client

Shorthand referring to a computer that connects to a server.

closed source

The reverse of Open Source in which the source code is not available for others to see, share, or modify. See also proprietary.

code

See source code.

command

Input typed at the shell that performs a specific task, usually related to administration of the system and/or the manipulation of files.

command-line prompt

See shell.

A P P E N D I X A G L O S S A R Y O F L I N U X T E R M S

497

commodity

In the context of hardware, describes PC hardware usually based around Intel or AMD processors that can be bought off the shelf and used to create sophisticated computer systems (as opposed to buying specially designed hardware). One reason for Linux’s success is its ability to use commodity hardware.

community

The general term for the millions of Linux users worldwide, regardless of what they use Linux for or their individual backgrounds. By using Linux, you automatically become part of the community.

compile

The practice of creating a binary file from source code, usually achieved using the ./configure, make, make install series of commands and scripts.

config file

Configuration file; any file that contains the list of settings for a program. Sometimes it’s necessary to edit config files by hand using programs like vi or Emacs, but often the program itself will write its config file according to the settings you choose.

copyleft

The legal principle of protecting the right to share a creative work, such as a computer program, using a legally binding license. Copyleft also ensures future iterations of the work are covered in the same way.

cracker

Someone who breaks into computer systems to steal data or cause damage. The term is not necessarily linked to Linux or Unix but was created by the community to combat the widespread use of hacker in this sense. The word hacker has traditionally defined someone who merely administers, programs, and generally enjoys computers.

cron

Background service that schedules tasks to occur at certain times. It relies on the crontab file.

CUPS

Common Unix Printing System; set of programs that work in the background to handle printing under Unix and Linux.

curses

Library that lets software present a semigraphical interface at the shell, complete with menu systems and simple mouse control (if configured). The version of curses used under Linux and Unix is called ncurses.