Sharing computers on Linux (or heterogeneous) networks, part 1

Source: Internet
Author: User
Article title: sharing computers on Linux (or heterogeneous) networks, part 1. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: David Mertz
  
More information about VNC, Desktop On-Call, remote X, and security
  
This article is part 1 of two articles comparing SSH, remote X, VNC, and other technologies as remote application running methods. In this section, David studies some VNC configuration issues, mentions IBM's Desktop On-Call, introduces remote X, and discusses some security issues.
In part 2 of the two articles on shared computers, I described my heterogeneous local network and how to use it to compare and test applications on different operating systems and architectures. There are several technologies that allow users on one workstation to run applications on another workstation. SSH is provided to the text terminal of the remote computer. you can use the X Window system to display the application on a workstation that does not actually run the interactive application; VNC can be used as a "remote control" for the entire remote desktop ".
  
Each technology has advantages and disadvantages. They all run on Linux, but different variants (host or remote) allow interaction with other OS environments in heterogeneous networks. Using a combination of these tools, I can sit on a workstation (for example, the one with the best display, keyboard, and Chair, then run and test applications on multiple platforms and set the runtime for them-generally, no system needs to be rebooted.
  
Part 1 describes SSH and VNC. In section 2nd, we will discuss VNC more, and then remote X and security.
  
My network settings
My local network has seven nodes named Apollo, Bacchus, Chaos, Delphi, Echo, Fury, and Gaia. These nodes are allocated a local IP address from 192.168.1.101 to 192.168.1.107 in the order listed. In most cases, a physical machine always obtains the same IP address when multiple boot attempts are made to different operating systems (but sometimes I use DHCP, which assigns addresses above 192.168.1.200 ). The entire network is located behind a hardware firewall/router, and I fully trust the firewall, so that I may not be as skeptical about services running on local machines as it should be. Readers who need to share computers on the public Internet should be more worried about security issues than I do. The above details will help readers understand some shell examples below. Actually, I am sitting in front of Bacchus. its IP address is 192.168.1.102.
  
Configure VNC
In Part 1, I demonstrated how to start VNC on the Linux platform and considered some issues related to screen resolution and color depth, however, I did not consider some important content about configuration and use of VNC. This article only focuses on the use of UNIX-like Xvnc servers. Apart from implementing different configurations, other systems have similar concepts. they are usually configured through menus and dialogs, rather than through command lines and configuration files.
  
When the vncserver runs in a given user account for the first time, it requires you to specify the password required for the VNC client connection. In addition, some default configuration files are created. Take a look at its first run:
  
Create default VNC configuration
[Vnc-user @ fury vnc-user] $ vncserver
  
You will require a password to access your tops.
  
Password:
Verify:
  
New 'X' desktop is fury. gnosis. lan: 3
  
Creating default startup script/home/vnc-user/. vnc/xstartup
Starting applications specified in/home/vnc-user/. vnc/xstartup
Log file is/home/vnc-user/. vnc/fury. gnosis. lan: 3.log
  
  
  
Here, I created a VNC session. Although no resolution is specified on the command line, the default resolution is used. The default resolution is 1024x768, and the default color depth is 8 bits. Part 1 demonstrates how to create a script file that uses other resolutions.
  
At the beginning, you should note that it was created during the first running ~ /. Vnc/xstartup file. This file controls what happens when a VNC session is created-which window manager is used most importantly. Create for the first time ~ /. Vnc/xstartup, the specified Window manager is twm, which is a very small Window manager and has twm on almost every X Window System machine. In a good sense, the extremely small nature of twm almost makes it possible to become the most "bandwidth-friendly" method for running VNC. In the bad aspect, twm does not have most of the fancy features of the complete "Desktop Manager" (such as KDE, GNOME, or WindowMaker. Many users want to edit their xstartup. The following is an example of my modifications:
  
Custom VNC "start"
#! /Bin/sh
Xrdb $ HOME/. Xresources
Xsetroot-solid gray
# Xterm-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
# Twm &
# Exec wmaker
Exec startkde
  
  
  
In the above example, I commented out the default Start of twm and xterm. I also commented out the Windows maker startup that I used for a while. In fact, I did not delete those rows in case I want to restore them later. I used this account to start KDE. However, I configured this special KDE desktop to avoid color gradient on the background and title bar and use very little animation effect. To minimize the desktop's busy schedule, KDE becomes looser in the channel bandwidth. Similar principles apply to any window manager you like.
  
The last note is to kill the started VNC session. This task needs to be completed on the server side (including from the vncviewer window, once the server is killed, the window will cut off the connection; but this will not cause any damage ). The quick way to view which VNC sessions have been started is to use ps-ax | grep vnc. If you want to end a session, you can use the kill command of Linux, but this will leave some pending signal files, you need to manually delete them later. The cleaner method is usually to use vncserver-kill: 1-but if you want to force kill the user's VNC process from the root account, use the kill command.
  
Desktop On-Call and eComStation
Readers of the "cute Python" column I wrote and the two articles on developerWorks may have been surprised by my occasional reference to OS/2, because the number of people who use it has been gradually reduced in a few years (even within IBM ). My "formal" statement indicates that the OS/2 Warp Workplace Shell is still far ahead of any GUI that has appeared on Linux, Windows, MacOS, or even BeOS. WPS is really good, but the actual reason for my continued use is mainly due to the inertia of this part. Over the past few years, I have built a large toolkit that is familiar to me and suitable for use on OS/2, and they work well with each other. When guiding to other systems, I have never managed to fill all the deficiencies in daily use (90% of happiness still comes from occasional re-boot ).
  
Due to my reluctance, I was excited recently because I received a copy of the eComStation evaluator of the Serenity system, it is an enhancement and rebinding made by a third-party licensor to IBM's Warp 4.5/Workspace on Demand. EComStation (eCS) was released only this year. It includes all the latest patches and a large number of additional tools for "Warp core.
  
One of the tools included with eCS is the IBM product named "Desktop On-Call (DToC. There are also Windows and Linux DToC servers, but it is difficult to buy in the United States. What DToC does is similar to what VNC does. The DToC server is attached to the HTTP protocol (port 80 by default) to provide services for remote desktops over the network (LAN or Internet. The client application of DToC is any Web browser that enables JavaScript and Java. Like using a VNC Java client, a Web browser is basically a connection interface to DToC. In addition, DToC has the same problems as VNC: the locally captured keys, multi-key sequences, and bandwidth/resolution trade-offs.
  
Compared with VNC, DToC has two advantages. Security issues are integrated into DToC, rather than through other layers and transformations that need to be configured separately. Attaching to HTTP means that DToC is easier to pass through the firewall than VNC (but this has advantages and disadvantages ). In addition, you will obtain the file transfer interface within DToC, so as long as DToC is running, you do not need to run a separate FTP, Samba, NFS or similar file transfer server on the server. In terms of disadvantages, DToC feels slow in response compared to VNC-this is not terrible, but a little worse.
  
Another tool associated with eCS is the X server named Hoblink X11. I haven't tried it yet, but when I tried it, this may bring better integration for the OS/2 nodes in my local network (but it is still the best in Linux "good cooperation ).
  
Remote X Window System
The X Window System is a well-known software concept. The first time it was invented in 1984 (a short time before Microsoft Windows 1.0 and just after the first Macintosh) was even more amazing. For most Linux users, the X Window System (or "X11", but not "X Windows ") it may only be the API called by the window manager to display the GUI application locally. But X11 is actually more interesting.
  
X11 always has a client and a server, even when they all run on the same actual machine. X clients and X servers may be the opposite of what people initially think of as servers or clients. X server is a device that is willing to provide display capabilities for underlying applications. X client is a special application that requires an X server to provide it with a place where its visual output is placed.
  
When running on a local workstation, the server and client communicate completely over an internal channel. However, when local and remote machines are involved, the local machine is usually X server, while the remote machine is usually X client. However, sometimes you may want to display some information on the workstation where you are not, and the role may be reversed.
  
The X Window System itself is actually an API called, such as "drawing a Window on these coordinates. To allow the X Window system to do more things, a Window manager is usually run on it, it allows you to move windows, minimize them, and start new X clients.
  
Let's take a look at how to start a remote application (X client) to display it on a local workstation. All the machines used for demonstration are Linux, but other systems with X servers and clients will work in a similar way. First, we need to determine the IP address used by the local machine. ifconfig is a good tool to complete this task:
  
Find the IP address of the local machine (X server)
[Root @ bacchus/root] # ifconfig eth0
Eth0 Link encap: Ethernet HWaddr 00: 48: 54: 83: 82: AD
Inet addr: 192.168.1.102 Bcast: 192.168.1.255 Mask: 255.255.255.0

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.