Virtual Network Calculation Tool VNC User Guide
Author: Jeremy Impson Compile: ideal
Introduction
Virtual Network Calculation Tools (VNC, Virtual Network Computing) is essentially a remote display system, and administrators can view the desktop environment by not only on the running machine, but also observe the operation of the remote machine from anywhere on the Internet. The situation is, and it has a cross-platform feature.
This article will discuss a new way to set up VNC-based X Windows system desktops as Linux systems. By reading this article, you will be able to configure the implementation to log in into the X-Window desktop through a display manager. More importantly, users can securely access the same desktop in any location in the network. Typically, a graphics workstation system runs with a display manager. The display manager we discussed herein refers to an application such as XDM, GDM (GDM (GNOME Display Manager) or KDM (KDE Display Manager). A display manager provides the user with a graphical login interface. When a user logs in into the system, the Display Manager launches the appropriate window manager (eg, FVWM2, GNOME or KDE). Users from Window Manager can run any application. When the user exits the login, the application is turned off, the window manager exits, the display manager appears again, waiting to log in again. If the same user is logged in, the display manager launches a new window manager and all applications must be restarted. This is the work process of the traditional X-Window system desktop. We will call such a desktop session as an X desktop. When a user uses a workstation's keyboard and monitor to use a workstation, we call users to log in through the console, which is to distinguish between network login.
Figure 1. A Display Manager
In a virtual network calculation article we learned how to configure VNC to access a desktop through any machine on the network. Here I mean this means that when a user is not connected to the desktop, the desktop has not terminated, but keep the state waiting for the connection request. When a user is connected to the VNC server using the VNC client, each window remains at the time of last left, and each of the opened files remain state. The characteristics of the VNC server that control the window manager and the application ensure continuity of the desktop state.
Therefore, any computer on the network can run VNC clients (eg, vncviewers) to connect to the workstation to display the desktop. We can even run the VNC client on the workstation running the VNC server. We refer to this desktop session as a VNC desktop, and we call the workstation running the VNC server (and its window manager) as a VNC workstation.
There is a problem with the VNC desktop. Suppose you want to log in to the VNC workstation through the console, then this workstation is also running on the VNC desktop. You may log in to the workstation through other machines on the network, this time you tend to continue to connect vnc desktops over the network. At the same time, when you log in to the console through a Display Manager, you want to see the same desktop that can be seen when logging in through the VNC. But if you log in to the workstation via the Display Manager, it will start a new window manager. Basically, you started a new X desktop, which has no relationship with the VNC desktop that has been running at the workstation.
If you want to connect to a VNC desktop on a UNIX system, you have to run a VNC client, such as Vncviewer. This is very stupid because an application window based on X-based desktop is itself a desktop (VNC desktop) on another machine. It is very troublesome to keep multi-level redirects, except that it is easy to confuse, and efficient is very low because it is necessary to run two window manager, although it should only need one. This article will discuss how to configure a X server, display manager, and a VNC server so that you can log in to the VNC desktop directly without starting a window manager and keeps all files and application status until next time. log in. Prerequisites We discussed here can be applied to any Linux release. But there is a need for a running X server, a display manager, and VNC. We can use the following command to test the premise: rpm -q xfree86 VNC Xfree86-XDM KDebase GDM As long as you have XFree86-XDM KDebase or GDM installed. All profile storage locations we discussed here are REDHAT7.1. Of course, any Linux system can be configured to use the Mathematical VNC desktop, but the profile discussed in the article may be in different locations. Whether you like any display manager, it should start when the system starts. It is generally configured in the / etc / inittab file as follows: x: 5: Respawn: / etc / x11 / prefdm -nodaemonprefdm is generally a symbolic connection to the display manager you want to use. X and your favorite display manager must ensure startup and run. Configuring a VNC server VNC server must also be running, but also configure the VNC server to run your favorite window manager. This starts your favorite window manager by editing file $ home / .vnc / xstartup. Use STARTKDE & to start KDE, start GNOME, FVWM2 & to start FVWM2 using Gnome-session & to start FVWM2. At the same time, make sure you start vncpasswd in $ home / .vnc / passwd to create a password file. RedHat 7.1 provides some simple way to start VNC when the system is started. Use LinuxConf to set the VNCServer boot script (/etc/init.d/vncserver) to start the VNCServer when the system is started. But the default startup script is not enough, so edit /etc/init.d/vncserver, modified: "Su - $ {display ## *:} -c" cd && [-f .vnc / passwd] && vncserver: $ {Display %%: *} "" "" Su - $ {display ## *:} -c "CD && [-f .vnc / passwd]
&& vncserver $ {Args}: $ {display %%: *} "" "" "" "" "" "" "" "" "" "" "" "" "" "" "
# Display: User PAIRS.
#
# Uncomment the line below to start a VNC Server ON
# Display: 1 as my 'myusername' (Adjust this to your
# OWN). You will also need to set a vnc password;
# Run 'man vncpasswd' to see how to do That.
#
# Do not run this service if your local area network # is untrusted! For a secret, See
#
Vncservers = "1: jdimpson"
Args = "- Geometry 1024x768 -alwaysshared" modifies "1024x768" in Args to adapt to its own X desktop actual parameter configuration. You can add any other VNC server parameter configuration here. Modify JDIMPSON in VNCservers to run the VNC desktop. 1 represents the VNC runs at desktop 1, if you want to add other desktops, you can modify the configuration as follows: vncservers = "1: JDIMPSON 2: phred 3: sysadmin" On the Redhat system, use the following command to start VNC: / ETC / Init.d / vncserver Start Now you can use VNC any client to use the VNC desktop. Configuring Display Manager In my Red Hat 7.1 system, I created a file called $ HOME / .XSESSION. This file is used to set which window manager should run when the manager is displayed. When logging in, the display manager detects this configuration file. If the file exists, the display manager will run the program set in the file. The display manager considers that the file contains commands for the window manager program that launches the user. Not running a window manager such as Gnome or KDE, but we will run the VNC client. Edit $ HOME / .XSESSION as follows: EXEC VNCVIEWER -PASSWD $ HOME / .VNC / Passwd
-fullscreen localhost: 1 If you are using other Linux distributions, the article's instructions may also fit you. A quick detection method is to add the following command in this file: EXEC FVWM2 When logging in to the display manager, if FBWM2 starts successfully, then you have succeeded. If there is no successful start, then you need to see the system documentation. Log in to the login window to the display manager. You will be able to see your favorite desktop. When you log in to the server via the display manager, it will be replaced by the Window Manager you selected in the VNC server. If there are other computers in the network, you can try the client to connect to the server. Then you might see two desktops. When you use a computer to move a window, you can see the window on another computer is also moving. After logging in to the display server, if the display flashes, the login interface is reapply, then an error occurs. First ensure that the VNC server is running and .xSession file configuration is correct. It should be noted that you should not use any login feature of any exit window manager in the settings. This will terminate the VNC desktop, which may not be the result you want. At this time, use Ctrl-alt-backspace to kill the X server and the display manager returns to the screen. If you log in again, you will enter the environment you just left, so you can use the console to use the user without losing your desktop state. System principle When the server starts, it will run VNC servers for each user defined in file / etc / sysconfig / vncservers. When VNC is started, the .vnc / xstartup file will be read when the user owner directory is read, and use it to run the window manager you want. The VNC server then waits for a connection request.
Figure 3. The whole process
The display manager is also started at the system startup and provides a graphic login interface for the user. For users who do not have a VNC server and not properly set the .xSession file in the main directory, they will get a common X desktop when logging in to the display manager. For those who have appropriate configurations, they will get a VNC desktop, and can access the VNC desktop anywhere on the network. Disadvantages and Other options The settings discussed here have many strengths. For me, the main advantage is to access my desktop from any computer on the network. One of the most important disadvantages of the VNC as the default desktop is that the graphic performance of the GUI is not stable enough. For example, play movies on a VNC desktop is very poor. Most graphical transformations are very fast games running in VNC. Similarly when the VNC server is running, it is as all of the app X servers you run, it is impossible to obtain any graphic acceleration characteristics, even if the unit's X server tries to speed up the graphic acceleration. (You can quit the login, log in to the system as other users, play movies or play the play and then exit login; finally enter the system as original user, you can get the desktop when you quit the same time) This configuration is more The user application environment is not well marble, you can define a lot of VNC sessions in the / etc / sysconfig / vncservers file to achieve startup during system startup. . But all of these VNC desktops are idle until they are used. Corresponding to each VNC desktop has a VNC server, a window manager is running. There are many auxiliary applications for GNOME and KDE. All of these applications take up memory and compete with each other. Strong computers need to have a powerful computer for commercial solutions such as Citrix MetaFrame and Microsoft Terminal Server to support multi-user applications. Another optional way is to use XDMCP, which is a traditional way to remotely access the X desktop, but this method may make you lose the continuity of the desktop state, because each login is started every time you log in. Desktop so you can't achieve the same desktop local and remote sharing. You can get more information about xdmcp at www.linuxdoc.org/howto/xdmcp-howto. Another solution is to run VNC in inetd / xinetd, that is, using the -inetd parameter. However, this may cause VNC to restart for each connection, so that multiple connections use a desktop, and the corresponding VNC process after the initial connection is disconnected. So losing the characteristics of maintaining the connection status and sharing desktops locally. Viewing VNC gets more information. Another option is to use X0RFBServer, which is run in normal X desktop, but it relies on the display of the VNC client. It can take advantage of any acceleration graphics cards supported by the X server. And it takes less memory than the X server plus VNC server (it only requires a X server and the X0RFBServer application that is originally smaller). But it requires you to always keep the X desktop running on the console, so it does not apply to multiple user utilities. More information can be obtained from www.hexonet.de/software.en. Jeremy D. Impson is from Owego's LockHeed Martin Systems Integration
One
Senior Senior Researchor. He is a member of the mobile communication and mobile computing center, where he uses open source software to develop mobile computing systems. You can contact him by email address juemy.impson@lmco.com.
Editor Press: In addition to VNC, there is a better protocol - Tight VNC can also choose to use, it is fully compatible with VNC (the same configuration file and the same executable file name). See http://www.tightvnc.com/.