The Term Protocol
txconn is designed to ease the redirection of X applications from one host to another. If a user on computer2 wants to display an X application on your screen, you use txconn. Like using tredir, any incoming connections must use your remost host's name or IP address to connect to you.
Because X is outwardly different than normal TCP/IP clients, it needs special handling for redirection. By itself, txconn uses no command line arguments:
remotehost% txconn Xconn bound to screen 9 :9
This means that your home X display can be accessed from the network as remotehost:9, meaning root window 9 on the remotehost. If a user on computer2 wants to send his xclock to your local display, he would type:
computer2% setenv DISPLAY remotehost:9 computer2% xclock &
After a few moments, the xclock he executed will appear on your display.
If you want to display an X application running on your computer to computer2's display, you must use tredir. This is a bit confusing.
linuxbox% tredir 6004 computer2:6000 Redirecting 6004 to computer2:6000 linuxhox% export DISPLAY=localhost:4 linuxbox% xclock &
This may look a bit odd, but what you are doing is redirecting your display :4 (unused by you) to computer2's default display of :0. Ports 6000-6100 represent displays :0 to :100. By redirecting your own display :4 to his :0, any X application on your local machine which uses display :4 will appear on computer2's screen. It's a bit convoluted, but it works effectively.
Because of the nature of term, applications that work with standard TCP/IP will not work without the use of tredir, and even then, they may not always work. For example, it would be impossible to use tredir for an application like NCSA Mosaic because it makes so many different connections to different hosts and services. Other applications, though they use a single network connection, don't work because they use a secondary data port, such as ftp or IRC's DCC protocol. Applications such as this require modification of the actual source code to utilize the term socket. Most popular applications such as Mosaic, lynx, ftp, ncftp and irc have already been modified for use with the term protocol.
If you compile these applications yourself, they must be linked with the term library, libtermnet.a (This library has replaced the old client.a library.) This library contains the needed instructions and symbols for using the term socket.
New developments in term have made it extremely easy for users to modify existing TCP/IP applications for use with term, without the massive source code modifications that were once required. By using drop-in replacements for common socket/networking functions such as connect(), gethostbyname(), and send(),you need only modify the Makenle of an application to make it term-compliant. This drop-in replacement is the libtermnet.a library, and a header file which translates standard networking calls into term-compliant calls. One interesting note is that a termnet-linked binary also works with normal TCP/IP, so if you ever change to SLIP or PPP in the future, your term-compliant binaries will still work!
Only two elements are needed in the Makefile to make a term-compliant binary. In the location where the INCLUDES are defined, you add:
adapting the path for your term source path, of course.
And in the LIBS or LDFLAGS section, you add:
If you have libtermnet.a or the libtermnet.so.2.0.* shared library installed in a common library path, -L/directory/path isn't needed.
Hopefully, after adding these definitions, you end up with,` fully term-compliant binary. There are still a few shortfalls, of course. Many applications use non-standard socket calls, and termnet cannot fully control things like that. Also, the newly integrated (as I write) udp support in term is still very rough.
Applications such as Chimera, lynx, xarchie, rsh/rlogin and fsp are a few examples of successful tennnett~ng, and more are sure to follow.
With the implementation of termnet, the days of manual source-level hacking on most applications is over, and more and more applications that were once too hard to hand-patch term support into will be available to term users.
After term116, the term development was passed on to Bill Riemers (firstname.lastname@example.org). Major additions to term have been introduced, such as udp support, which is getting better and better, and shared libtermnet, which allows easy upgrading of term versions without recompiling term-compliant binaries every single time. The udp support has enabled such applications as ytalk, xarchie and fsp to Work through term.
There are still a lot of things to complete and improve with term, but it's a very successful and very useful tool for people who don't have the resources to run full-blown SLIP or PPP. It is very good, and can only get better.
Liem Bahneman is a student Unix consultant at the University of Washington and is the administrator of the Linux Organization WWW home page. Liem has heen using Linux and term for almost two years and in his free time develops X11 applications in C and tcl/tk.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- ServersCheck's Thermal Imaging Camera Sensor
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- Petros Koutoupis' RapidDisk
- Oracle vs. Google: Round 2
- The FBI and the Mozilla Foundation Lock Horns over Known Security Hole
- Privacy and the New Math
- Ben Rady's Serverless Single Page Apps (The Pragmatic Programmers)
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide