Wednesday, February 18, 2009

Accessing Remote Desktops in Ubuntu

Ubuntu also provides tools for accessing remote systems and taking control of their desktops. The X Window System already has built-in support for remotely accessing other user’s desktops. On Linux systems, desktop access is performed through the Virtual Network Computing (VNC) protocol. For Windows desktops, you use the Remote Desktop Protocol (RDP).


Virtual Network Computing
VNC allows a computer to access and control a graphical desktop located on a computer connected to a different network. Anyone with the appropriate permissions can display and control a VNC server on a remote system. To access such a system, a remote computer uses a VNC viewer that connects directly to the remote desktop running a VNC server. Access can be password-protected.

VNC servers export the desktop on ports numbered from 5900. The port used is 5900 plus the number of the port that the desktop uses—usually 1, so this would make the port 5901. Be sure that access is allowed by your firewall. You will also need to open access on port 5800 and 6000. For Firestarter, set up access on the Port dialog. For the Ubuntu Firewall (ufw), you’d enter the following in a terminal window:

ufw 5900 allow


GNOME VNC Client: Vinagre
Vinagre is the GNOME remote desktop viewer used remotely to control a system running a VNC server (Ubuntu main repository). Vinagre is a VNC client that lets you browse your network for VNC servers. You can then connect to a server and remotely control that machine. Vinagre lets you connect to several VNC servers at once, as well as bookmark your favorite ones for easy access later. Vinagre will also keep track of the VNC servers to which you recently connected, letting you easily reconnect. Bookmarks can hold passwords stored in the GNOME keyring, so you do not have to re-enter them each time you connect.

To start Vinagre, choose Applications | Internet | Remote Desktop Viewer, or enter vinagre at the command line in a terminal window. This opens the Remote Desktop Viewer window with a side panel that displays bookmarked connections. The toolbar offers Connect, Close, Fullscreen, and Take Screenshot buttons. The menu bar shows menus for Machine, View, Bookmarks, and Help. The Machine menu includes the same options offered on the toolbar, with additional entries for Open and Recent Connections. Vinagre will keep track of all your recent connections here. The View menu configures display options for Vinagre such as displaying the toolbar, status bar, and bookmarks, as well as a full screen display. You use the Bookmarks menu to add, edit, and remove bookmarks for remote connections.

When you click the Connect button, a window opens where you enter the hostname of the remote VNC server and the port to use. You can also click the Find button to have Vinagre search for VNC servers on your network. This opens a Choose VNC Server window that lists all available VNC servers. A Domain button lets you specify a network to search.


GNOME VNC Server: Vino
Vino is the GNOME VNC server designed to work with Vinagre. You enable and configure Vino on your desktop using vino-preferences, accessible by choosing System | Preferences | Remote Desktop. This opens a Remote Desktop Preferences window with General and Advanced tabs. On the General tab, you can allow sharing and specify security. To enable sharing, select the Allow Other Users To View Your Desktop check box. You’ll then see an additional box for allowing other users to control your desktop. For security, you can have a user first ask you for access and then specify a password for entry. On the Advanced tab, you configure network access, security features, and notification options. For network access, you can restrict access to users on your local network as well as on a specific port. Security can require encryption and screen locking. For notification, a remote desktop connection icon can be displayed on the GNOME desktop panel. Vino server allows access only to users that are currently logged in to their GNOME desktop. Once enabled by a user, the VNC server is automatically started when the user logs in.


X Window System VNC Servers
Vino is designed to work with GNOME and requires that a user be logged in to the remote desktop. More traditional VNC servers allow remote users to log in to a remote desktop. Such servers can be configured to export desktops and window managers other than GNOME. They use their own X Window System configuration files to determine and set up the display to provide (.vnc/xstartup). Here you could specify a window manager or desktop to use: for Ubuntu, they are the vnc4 and tightvnc servers and viewers. These are designed to work with any X Window System window manager, not just GNOME. The tightvnc server and view specialize in low-bandwidth access. Tightvnc server for Windows that will allow Linux users to access Windows desktops.


Windows Terminal Servers
Windows has is own method for allowing remote desktop access. Windows servers and some desktops can be configured to run as terminal servers, allowing users to access and use software on those servers. Windows servers as well as Windows XP Professional and Windows Vista Business/Enterprise/Ultimate desktops have this feature built-in. On Windows XP Professional and Vista, the Terminal Services feature is referred to as the Remote Desktop. Windows Vista also provides Desktop Sharing, which allows more refined multiple access to a particular window or application. Remote Desktops, Terminal Services, and Desktop Sharing are implemented using the RDP. You can access the Windows RPD–enabled remote system using a Remote Desktop Connection client. On Windows XP Professional and Windows Vista, choose Accessories | Communications | Remote Desktop Connection. A Remote Desktop Connection client can also be downloaded for other versions of Windows such as ME, 98, and XP Home. Linux systems can access a Windows terminal server or Remote Desktop using the rdesktop client, which is integrated into other popular clients such as tsclient.

On Windows XP Professional, RDP remote access is configured as Remote Desktop on the Remote tab of the System Properties window (from Control Panel, choose the System icon). Check Allow Users To Connect Remotely To This Computer. On Vista, select the
Remote Settings line and then check Allow Connections From Computers Running A
Version Of Remote Desktop. As Windows servers, the terminal server allows remote users to run a virtual Windows system. Access is licensed by Microsoft. Remote systems accessing the server can then run software installed on it, letting many remote users work on the same server as if they were sitting in front of their own Windows systems. On the XP and Vista desktops, the Remote Desktop operates for single users, allowing one client at a time to connect to a particular RDP-enabled desktop. Users can work on files and use storage and printing devices on their own systems for applications running on the terminal server or the Remote Desktop. Server Linux remote access clients, such as tsclient and rdesktop, support the RDP, allowing you to access a Windows system (server or desktop) running the Windows Terminal Services feature. The major limitation of clients using the RDP is that they can access only Windows systems running the Windows Terminal Services. You cannot use Windows Remote Desktop Connection client to access a Linux desktop from Windows.

The tsclient client lets you connect to Windows desktops running Windows Terminal Services. Though the RDP is selected by default, tsclient also supports VNC servers, so you can use it for Linux VNC servers. Start tsclient by choosing Applications | Internet | Terminal Server Client. This opens a window with tabs for setting up a connection and configurations for that connection. You click a Connect button to connect to a server. You can save the connection and its configuration for later use. A pop-up menu will list saved connections from which you can choose. Configuration is saved in the user’s .tsclient directory.

On the General tab, you enter connection information. The Windows RDP will be selected by default. On the remaining tabs, you configure your connections, set display features (Display), select local resources such as sound and keyboard devices to use (Local Resources), or select performance options such as hiding window manager decorations (Performance). The Programs tab allows you choose a application to run automatically when the connection is made.

The rdesktop client also sets up Windows Terminal Services access. Start rdesktop in a terminal window with the rdesktop command, with the hostname of the system to which you want to connect. A Windows Server dialog is then displayed, where you can enter the username and password for the user whose desktop you want to access. You can also use the -u and -p options to provide the username and password when you invoked rdesktop. The -r option will let you map local resources such as printers and disks to the Windows system. For example, you could print files on the Windows system from a printer on your Linux system. Disks and storage devices on your Linux system, such as CD/DVD drives, can be accessed by applications on the connected Windows system.

Source of Information : McGraw Hill Ubuntu The Complete Reference

No comments: