PDA

View Full Version : Using TotalView, a X Windows application, on a remote machine



Josh-TotalView-Tech
10-27-2006, 10:14 AM
It is possible to use TotalView or any X Windows application remotely by using X11 forwarding. However, TotalView Technologies strongly recommends that you do not do this when using TotalView on a machine that is on a different network. If such an approach is used extreme GUI latency will occur. TotalView Tech. recommends using Virtual Network Computing (VNC) to setup a remote desktop on the distant machine and accessing that desktop via a viewer on your local machine.

TotalView Tech recommends using TightVNC which is a free, GPL licensed version of VNC. TightVNC offers "tight" encoding to compress screen updates which makes it very fast and eliminates most latency issues. You can download or find more information on TightVNC at the website http://www.tightvnc.com/

How To Use TightVNC

Installation

Download and install TightVNC from http://www.tightvnc.com/download.html

On the remote machine (where you want to run TotalView) you will need to install the VNC Server if it is not already installed. You should be able to tell if it is installed or not by typing the command:

vncserver -help

If it is not installed this will report the error:

vncserver: Command not found

and you will have to install the server.

On your local machine you will need to install the VNC Viewer.

If your local machine is a Windows machine you will need to download and install PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/ (http://www.chiark.greenend.org.uk/%7Esgtatham/putty/)
Starting the VNC Server

To start the server simply execute the command:

vncserver

There are a few different options you can use, one that I typically use is the -geometry option to set the width and height of my desktop. Please see the man page for vncserver for details.

If this is the first time you have started a server it will ask you to create a password. This is the password that will be used to access the desktop from your local machine.

Before returning you to your shell prompt, the server will report the display that it will use. For example, if the remote machines host name is frontend-6 the display may be frontend-6:1, where the integer after the ':' could be any positive integer and for here on is referred to as the "display number". You should take note of this information because you will need it later to access the desktop.

Starting the VNC Viewer on a UNIX based Operating System

For security we recommend using the TightVNC Viewer's -via option to create a secure encrypted TCP tunnel between your local machine and the remote network. The way you do this depends on how you login to the remote machine where your remote desktop sits.

Case A.


You can log directly into the remote machine from your local machine. For example if your remote machine is named frontend-6 and you normally login directly using the form:

ssh [options] [yourusername@]frontend-6.foo.com

To access your remote desktop on frontend-6.foo.com use the command:

vncviewer -encodings tight -via [yourusername@]frontend-6.foo.com localhost:

Where should be the display number reported when setting up your VNC Server. This will first prompt you for your login password for frontend-6, it will then prompt you for your VNC password that you set up for your remote desktop.

The vncviewer -via option invokes ssh to establish a connection to frontend-6.foo.com, if you need to specify options to ssh please see the man page for vncviewer and look at the ENVIRONMENT section.

Case B.


You have to log into an intermediary gateway machine before logging into the remote machine, for example if your remote machine name is frontend-6 and the gateway machine is bcssh.foo.com and you normally log into bcssh.foo.com first by using the command:

ssh [options] [yourusername@]bcssh.foo.com

To access your remote desktop on frontend-6 use the command:

vncviewer -encodings tight -via [yourusername@]bcssh.foo.com frontend-6:

Where should be the display number reported when setting up your VNC Server. This will first prompt you for your login password for frontend-6, it will then prompt you for your VNC password that you set up for your remote desktop.

The vncviewer -via option invokes ssh to establish a connection to frontend-6.foo.com, if you need to specify options to ssh please see the man page for vncviewer and look at the ENVIRONMENT section.

Starting the VNC Viewer on Windows.

Create an encrypted ssh tunnel.

The way you do this depends on how you login to the remote machine where your remote desktop sits.

Case A. If you can directly login to your remote system running your VNC Server, for example frontend-6.foo.com, without going through a gateway machine.
Using Putty select "Session" in the Category list to bring up the "Basic options for your PuTTY session" tab. Specify the host you want to connect to and select the SSH protocol. For example if you started your VNC Server on frontend-6.foo.com, you would enter frontend-6.foo.com, as the host.

Now in select Tunnels which is under Connection and SSH in the Category list. Under "Add new forwarded port" for Source port specify 5900 + display number, where display number is the display number that you received when you started your VNC Server. For example, if the server reported frontend-6:1 the display number is 1 and the source port is 5901.

For "Destination", enter localhost:5901, if your display number is 1, otherwise the integer after the ':' character should be 5900 + display number.

Make sure "Local" is specified and press the "Add" button. Finally press the "Open" button to establish the connection. This will prompt you for your password to log into frontend-6.foo.com. When your password is authenticated you have created your tunnel and you can start your VNC Viewer.
Case B If you can not directly login to your remote system running your VNC Server, for example frontend-6, but most login to a gateway machine, for example bcssh.foo.com, before logging into the remote system.
Using Putty select "Session" in the Category list to bring up the "Basic options for your PuTTY session" tab. Specify the host you want to connect to and select the SSH protocol. For example if you gateway machine is bcssh.foo.com, you would enter bcssh.foo.com as the host.

Now in select Tunnels which is under Connection and SSH in the Category list, under "Add new forwarded port" for Source port specify 5900 + display number, where display number is the display number that you received when you started your VNC Server. For example, if the server reported frontend-6:1 the display number is 1 then source port is 5901.

For "Destination", enter hostname:5901, if your display number is 1, otherwise the integer after the ':' character should be 5900 + display number. Hostname is the hostname of the remote system that you started the VNC Server on.

Make sure "Local" is specified and press the "Add" button. Finally press the "Open" button to establish the connection. This will prompt you for your password to log into bcssh.foo.com. When your password is authenticated you have created your tunnel and you can start your VNC Viewer.Starting the VNC Viewer

Once you have used Putty to establish the encrypted SSH tunnel you can access your viewer by going to Start > Programs > TightVNC and select TightVNC Viewer (Fast Compression) . Once you select the Viewer it will open a "Connection details" dialog box. Press the Options button and set "Preferred encodings" to "Tight". Hit "OK" and then enter localhost:. Where is the number you used for a "Source port" for your tunnel in PuTTY. After you hit OK it will prompt you for a password, you should enter the password you set up for your server. At this point a window should open up which is your desktop that is running on the remote machine.

mhovers
03-26-2008, 02:41 PM
Does this mean I could have total view Individual running on a linux box and work on my Windows XP laptop using exceed and TightVNC?

The documentation says Individual will only run on localhost:0.0.

thanks

Josh-TotalView-Tech
03-27-2008, 06:08 AM
Good question. The answer is that this FAQ does not apply to TotalView Individual because as you note it is restricts you to the display :0.0. This FAQ applies only if you have an Enterprise License, a Team License, or an evaluation license. It also applies to MemoryScape.

Chris-TotalView-Tech
09-11-2008, 10:39 AM
Folks,

Please note that while these instructions still work and are a great reference in some cases it is a lot simpler than this. We have implemented a secure and easy to use remote display client that runs on Windows and Linux for remotely accessing TV Team and Enterprise (as well as MemoryScape and/or ReplayEngine) in TotalView 8.6.0.

Please see the HTML format doc at

http://www.totalviewtech.com/...teDisplayClient.html (http://www.totalviewtech.com/support/documentation/totalview/wwhelp/wwhimpl/api.htm?href=Using_the_Remote_Display_Client/RemoteDisplayClient.html)

or the pdf format doc at

http://www.totalviewtech.com/...w/remote_display.pdf (http://www.totalviewtech.com/support/documentation/totalview/remote_display.pdf)

for more information on the remote display client.

Cheers,
Chris