Auto Xterm..

Auto Xterm..

Post by Philip Matheso » Tue, 10 Feb 1998 04:00:00



Hi,

I have a RedHat 5.0 machine that does PPP for two NT boxes. My Linux
machine sits in the closet and I administer it remotely. I use a program
called Xwin32 and telnet to do this. I telnet in and run a script that
opens and Xterm on my NT machine.

I would like to write a script that opens an xterm and then displays the
output of 'tail /var/log/messages' continuously. This would be cool. I
always need to look at that file.

I can handle the looping part.. I just need to know how to open an xterm
and then send the output of a cammand to it. I've tried various things
and none seem to work.

Thanks,

--
Philip J. Matheson
NCATT Software Engineer
University of Idaho
Moscow, Idaho

 
 
 

Auto Xterm..

Post by Lee Sau Da » Thu, 12 Feb 1998 04:00:00


    Philip> I can handle the looping part.. I just need to know how to
    Philip> open an xterm and then send the output of a cammand to
    Philip> it. I've tried various things and none seem to work.

Doesn't "xterm -e tail -f /var/log/messages" do all that you want?

--

.----------------------------------------------------------------------------.

`----------------------------------------------------------------------------'

 
 
 

Auto Xterm..

Post by Richard Morre » Thu, 12 Feb 1998 04:00:00



> Hi,

> I have a RedHat 5.0 machine that does PPP for two NT boxes. My Linux
> machine sits in the closet and I administer it remotely. I use a program
> called Xwin32 and telnet to do this. I telnet in and run a script that
> opens and Xterm on my NT machine.

> I would like to write a script that opens an xterm and then displays the
> output of 'tail /var/log/messages' continuously. This would be cool. I
> always need to look at that file.

> I can handle the looping part.. I just need to know how to open an xterm
> and then send the output of a cammand to it. I've tried various things
> and none seem to work.

I think what you require is something a little different from what you propose.  Try:

xterm -e tail -f /var/log/messages &

From the xterm man page:

     -e program [ arguments ... ]
             This option specifies the program (and  its  command
             line  arguments)  to be run in the xterm window.  It
             also sets the window title and icon name to  be  the
             basename of the program being executed if neither -T
             nor -n are given on the command line.  This must  be
             the last option on the command line.

And from the tail man page:

     -f              Follow. If the input-file is not a pipe, the
                    program  will not terminate after the line of
                    the input-file  has  been  copied,  but  will
                    enter  an endless loop, wherein it sleeps for
                    a second and then attempts to read  and  copy
                    further records from the input-file.  Thus it
                    may be used to monitor the growth of  a  file
                    that is being written by some other process.

--
Richard Morrell - CS Undergraduate, University of Edinburgh
 -----------------------------------------------------------------

 -----------------------------------------------------------------

 
 
 

1. nis, nfs, autofs: auto.master, auto.misc, auto.home help please

I have nfs, nis working correctly.  I know this because I can mount my
server /home directory from the client, and also from the client, I can
access the passwd and group files from my nis server.  All this is fairly
easy to set up.  The problem I cannot resolve at this time is being able
to login to my server's home directories from the client machine.  It
logs into the / directory instead.  Here is what I know:

There are various packages like autofs and amd to take care of what I
want to do.  I am trying to do this with autofs.  My setup (yes I posted
several days ago, but the NIS HOWTO doesn't help me with this) is a
Debian server, with a Redhat 7.2 and Solaris 8 client.  I have read many
posts about these files:

/etc/auto.master
/etc/auto.misc
/etc/auto.home

and various other files.  I also have read the AutoFS HOWTO at:
http://www.linux-consulting.com/AutoFS/autofs-HOWTO.html

While it contains examples for autofs, I do not understand them fully,
otherwise, I would not be writing this now.  My questions are:

If /etc/auto.master contains (according to the auto.master manpage:

/home     /etc/auto.home

does the auto.master file reside on the client, server or both?  Also, is
the /home in this referring to the server's /home which I want to mount
on the clients /mnt/home?

I also am not sure what /etc/auto.misc is for, and where it lives, along
with /etc/auto.home.  My server's home directories are on my /home
partition and I can see them from my client machines on /mnt/home.
However, I can not figure out how to use autofs to take care of mounting
them when a user logs in.  The user must cd /mnt/home, and this is what I
want to automate.  I am sorry if my questions annoy anyone.  I want to
learn, and once I learn, I can also help other people.  Thank you.

Bob Gamble

2. TurboChip 133 & Linux (questions...)

3. How can I auto-reboot a SUN, then auto-login, then auto-start a program?

4. Wireless networking

5. How to auto-reboot a SUN, then auto-login, then auto-start a program?

6. where get all the files loaded by a http request.

7. Maddening loss of xterm's auto-wraparound under AIX

8. Motherboard with Inte

9. disabling auto-wraparound in xterm?

10. xterm auto-open: how?

11. Why does AIX's xterm always lose the "auto wraparound" attribute?

12. auto start programs, release xterm.

13. Xterm and auto-wraparound