Re: [SLUG] splash messages to another user using vnc

From: Ian C. Blenke (icblenke@nks.net)
Date: Tue Jun 25 2002 - 21:48:06 EDT


On Tue, 2002-06-25 at 20:45, Matthew Moen wrote:
> I'm assuming you're talking about having popups on a linux terminal.
> (There's some mechanism with smbclient to do this with windows.) For
> *nix, you can use xmessage (man xmessage), but you'll need to have
> access rights to the X-server you want to pop ups on. Check your
> distro's documentation on enabling that.
>
> Thus spake patrick grantham on the 25 day of the 06 month in the year 2002:
>
> > I use vnc (when the wife boots me off the box) to use my Linux box sometimes.
> > Is there a way to send a pop-up message to anuther terminal (without using
> > email.)?

To send a message to another Unix terminal:

        $ who
        yourwife pts/0 Jun 25 16:47 (localhost)
        $ echo "message" | write yourwife

If that user is logged in multiple times, you may specify a specific
terminal to use:

        $ who
        yourwife pts/0 Jun 25 16:47 (localhost)
        yourwife pts/1 Jun 25 16:48 (localhost)
        yourwife pts/2 Jun 25 16:49 (localhost)
        $ echo "message" | write yourwife pts/1

Your wife may stop any writes to her pty (/dev/pts/1, or whatever it
might be) with:

        $ mesg n

Which does little more than:

        $ chmod g-w `tty`

effectively removing group write permission to her pty (/dev/pts/1).

If you are root, you can send a Write ALL (wall) to everyone on the
system telling them of something critical that is going to happen.

        $ echo 'System needs to reboot in 1 hour, sorry' | wall

Those are both old-school Unix commands.

If you wish to pop up an X-window box, Matthew is right. The easiest
(and most generally available) method is to use xmessage. The trick,
however, is to set your display appropriately and login as her:

        $ su - root
        Password:
        # su - yourwife -c xmessage -display :0.0 0 \
                -nearmouse "What about dinner?"

This requires that:

        1. You know the display yourwife is using (:0.0)
        2. You have root on the box.
        3a. You can "become" yourwife
        or
        3b. Your wife's display is open to the world
        or
        3c. You can read yourwife's ~/.Xauthority file

If yourwife leaves her keyboard unattended, this opens her display up
for anyone in the world to connect to:

        $ xhost +

If you have read-permission to yourwife's ~/.Xauthoritfy file:

        $ xauth merge ~yourwife/.Xauthority
        $ xmessage -display :0.0

If you just want to see what she's doing, you can spy on her with:

        $ xwd -root -display :0.0 | xwud

Or, if you're really obstinate, you can use x0rfbserver and
remote-control her running X11 desktop with VNC:

        http://www.hexonet.de/software/x0rfbserver/

Enjoy.

ObDisclaimer: I am not responsible for putting you in the doghouse.

- Ian C. Blenke <icblenke@nks.net>



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 13:02:00 EDT