X offers the ability to display content on other hosts

an article added by: Daniel K. at 11282007



In: Categories » Computers and technology » Linux Commands » X offers the ability to display content on other hosts

In Linux tutorial 1, I said that X offers the ability to display content on other hosts’ screens. This makes it possible to log in to a server that has a special program on it and have the display redirected to the screen in front of you. Allowing this to happen is a two-step process. The first step is telling your machine that it should allow connections from another host for X displays. This is done with the xhost command:

    [michael@workbox michael]$ xhost +ungerer
  

where ungerer is the name of the host you want to allow X displays to come from in addition to your own host. Now that you have allowed ungerer to display to your host, log in to ungerer, and set your DISPLAY environment variable like so:

    [michael@ungerer michael]$ DISPLAY="workbox:0"; export DISPLAY

This will redirect all X displays to the host workbox. If you have two hosts to try this with, an easy test to see if it worked is to start a web browser on the remote host and watch it display its content on your host. Neat trick, isn’t it? Once you are done with whatever work is required to allow other hosts to display to your screen, you need to explicitly disallow future connections like so:

    [michael@workbox michael]$ xhost -ungerer

If you want to disallow everyone, you can use the following shortcut:

    [michael@workbox michael]$ xhost -

CAUTION

Issuing the command xhost + is dangerous because it allows anyone to connect to your machine and display things on it. While this most often leads only to practical jokes, the potential for something more serious to happen is there. Be sure to specify from which hosts you allow X connections, and remember to undo it when you are done.

Mail Preferences: mail, pine, and mutt

Like everyone else, Linux folk need to read their e-mail. And as you can imagine, you have plenty of choices as to how. Although there are many GUI-based POP mail readers, this module covers command-line tools.

The one tool that you will always be able to find is called—you guessed it—mail. Simply run mail from the command line like so:

    [michael@workbox michael]$ mail

and you’ll see what mail you have available to read. Because this tool does not require any screen formatting, it is well suited for those instances where you are troubleshooting a host so broken it has no terminal control. To exit the mail program, type q and press ENTER. If you want more information about mail, check out its man page. As you’ll see, for a tool that looks very simple, it actually offers quite a bit of capability. Another popular tool is pine, which actually takes control of your terminal window and makes the display look much nicer. Being a fully menu-driven program where all of your options are always listed on a menu in front of you, pine tends to be a very popular choice for people new to UNIX. From a practical point of view, pine is ideal for communicating with people who use all sorts of other mail tools, since it understands all of the popular standards in use today (such as MIME attachments). The pine program also offers a very powerful filing system with which you can archive your mail easily and find it again at a later date. My personal favorite mail tool is mutt. To quote mutt’s author, “All mail clients suck. This one just sucks less.” mutt is another tool that looks simple on the outside but offers a wealth of capability. Unlike pine, mutt is much less menu-oriented. For folks who are used to the UNIX environment, this is a very welcome feature because it allows for very efficient use. Doubly useful is that mutt offers excellent memory management and can therefore handle extremely large mailboxes. More than once, I’ve used mutt to clean up someone’s mailbox that Outlook choked on. ftp Linux offers a very handy command-line version of the FTP client. Anyone used to theWindows version of the FTP client that runs under command.com will feel right at home with this, since theWindows version adopted the standard commands in use by the UNIX community since the late 70s. To start the FTP client, simply run ftp at the command line like so:

    [michael@workbox michael]$ ftp remotehostname

where remotehostname is the name of the host that you would like to FTP to/from.

legal notice

Our website is not responsible for the information contained by this article. Web-articles is a free articles resource.
Suggestion: If you need fresh, daily updated content for your website, feel free to use our service. Click here for more information.

Useful tools and features

X offers the ability to display content on other hosts  
If you like this article (tutorial), please link to it from your web page using the information above.

related articles

1. The top command is an interactive version of ps
Showing an Interactive List of Processes: top The top command is an interactive version of ps. Instead of giving a static view of what is going on, top refreshes the screen with a list of processes every two to three seconds (user adjustable). From this list, you can reprioritize processes or kill them. Linux tutorial 6-1 shows a top screen. The top program’s main disadvantage is that it’s a CPU hog. On a congested system, this program tends to complicate system management issues. Users start running...

2. Lunux who command who is logged in
Learning Who Is Logged In: who On systems that allow users to log in to other users’ machines or special servers, you will want to know who is logged in. You can generate such a report by using the who command: [michael@workbox michael]$ who The who report looks like this: michael tty1 Jun 14 18:22 rwhite pts/9 Jun 14 18:29 (:0) root pts/11 Jun 14 21:12 (:0) root pts/12 Jun 14 23:38 (:0) A Variation on who: w The w command di...

3. Editing text filesin Linux Red Hat
Editing Text Files Editors are by the far the bulkiest of common tools, but they are also the most useful. Without them, making any kind of change to a text file would be a tremendous undertaking. Regardless of your Linux distribution, you will have gotten a few editors. You should take a few moments to get comfortable with them before you’re busy fighting another problem. NOTE Although all of the editors listed here come with Red Hat 8, not all of them are installed by default. ...

4. Reviewing Linux File System Standards
Reviewing Linux File System Standards One argument you hear regularly against Linux is that there are too many different distributions, and that multiple distributions lead to fragmentation. This fragmentation will eventuate in different, incompatible Linux versions. This is, without a doubt, complete nonsense that plays on “FUD” (Fear, Uncertainty, and Doubt). These types of arguments usually stem from a misunderstanding of the kernel and distributions. However, the Linux community has realized that it h...

5. Linux is built upon the foundation of file systems
File Systems Linux is built upon the foundation of file systems. They are the mechanisms by which the disk gets organized, providing all of the abstraction layers above sectors and cylinders. In this module, you’ll learn about the composition and management of these abstraction layers supported by the default Linux file system, ext2, and its more robust counterpart, ext3. This module covers the many aspects of managing disks. This includes creating partitions, establishing file systems, automating the process ...

6. Mounting and Unmounting Local Disks
Linux’s strong points include its flexibility and the way it lends itself to seamless management of file locations. Partitions are mounted so that they appear as just another subdirectory. Even a substantial number of file systems look, to the user, like one large directory tree. This characteristic is especially helpful to the administrator, who can relocate partitions to various servers but can have the partitions still mounted to the same location in the directory tree; users of the file system need not know abou...

7. The fsck tool short for File System ChecK
Using fsck The fsck tool, short for File System ChecK, is used to diagnose and repair file systems that may have become damaged in the course of daily operations. Such repairs are usually necessary after a system crash in which the system did not get a chance to fully flush all of its internal buffers to disk. (Although this tool’s name bears a striking resemblance to one of the expressions often uttered after a system crash, that this tool is part of the recovery process is strictly coincidence.) Us...