For example, you may want to send broadcast messages like these:
- "System is going down for maintenance at 5:00pm (in 30 minutes). Please save your work and logoff by 5:00pm."
- "Web surfing will be turned off at 3:30pm (in 10 minutes). Please finish your sessions."
There are several methods for sending broadcast messages.
Note: This page is not about instant messaging (IM) or any interactive communication. This page is about simple, lightweight, one-direction messages.
Note: Messaging is not LTSP specific, but it is helpful on multiusers systems such as Linux terminal servers.
KDE and kwrited
KDE starts
kwrited which responds to messages sent by
wall and
write.
Non-KDE window managers with kwrited
With non-KDE window managers, you should be able to start
kwrited. See
Henry Burrough's e-mail: Broadcast Message under Gnome Success! for some details.
My system (Fedora Core 4, Gnome 2.10, KDE 3.4.3) does not have
kwrited, so I try
kdeinit --no-kded /usr/lib/kde3/kded_kwrited.so. It seems to start, but it doesn't display any messages sent by
wall.
Messaging programs
There are some programs designed for X popup messaging. The Wiki needs descriptions and evaluations for these:
Running xmessage as root
xmesssage is a common program that displays a simple popup message with an OK button (by default). You can run
xmessage as root and specify the X server display of each terminal. The
xmessage approach has a few problems:
- Proper security is not yet figured out.
- You need a list of all active displays (may require writing a script).
- You need to send each message individually (may require writing a script).
xhost Security
xhost defines security access for an X server. You can add
xhost + to users' login scripts, but this allows anyone, anywhere to access their Xserver. Unfortunately, this is a security problem.
Also, the following commands don't seem to help:
-
xhost +root (thinks root is the hostname)
-
xhost +root@localhost (maybe confuses request with NIS)
-
xhost +local:root (allows all non-network local connections)
There may not be a way to allow per-user (namely, just root) access using
xhost.
Xauthority Security
There may be a way to allow root to access users' displays using Xauthority. Here are two possibilities (not tested).
1.
Merging Xauthority data from each user to the root. Does this work, and is there an easy way to do this for all users?
2. Setting the environment variable
XAUTHORITY=~/.Xauthority?
ltsp_msgd
This is a bit of a hack, and not very pretty, but it seems to work.
First, run this command
mkdir -p /srv/ltsp/msg ; chmod 1777 /srv/ltsp/msg
Then put
http://home.bravegnuworld.com/~rjune/ltsp/ltsp_msgd in the users startup scripts.
Last, use
http://home.bravegnuworld.com/~rjune/ltsp/ltsp_msgsend to send a message to a given user.
update
I've been working on this a bit, it relies on sudo now, but you have a bit more control over who can and can't send messages.
http://kc.lumensoftware.com/~rjune/projects/lumen-ltsptools/lumen-ltsptools-0.3.tar.bz2
libnotify
libnotify is a new feature in Linux desktops (such as Fedora Core 5). To make this work, is it necessary to write a command line tool to send out arbitrary text as notifications?
Lead:
Blog: Good old messaging (May 9, 2006)
No, the author states libnotify not designed for one user messaging another.
Teachertool
Teachertool allows you to send short messages to selected terminals.