Configuring clients on Linux

 

You can configure the clients on the Linux® operating system to receive informational messages. To configure the clients on Linux, follow these steps:

  1. Enable Samba's messenger support. Edit the smb.conf file so that it contains a message command directive. Here is an example line:
    message command = /bin/bash -c 'echo -e  WinPopup Message from %f on 
    $(date): \n >> /tmp/msg.txt; cat %s >> /tmp/msg.txt; echo -e  
    \n\n >> /tmp/msg.txt; rm %s'

  2. Restart the Samba server. For example, (on Red Hat): /etc/rc.d/init.d/samba restart.

  3. Create a shell script that can read the /tmp/msg.txt file and place the messages into a window in the background. Here is an example bash script:
    #!/bin/bash 
    # Run this script in the background to display a message window where 
    # WinPopup messages are displayed in sequence. Samba must be started 
    # and smb.conf must be configured to append messages to /tmp/msg.txt 
    # remove old messages rm /tmp/msg.txt touch /tmp/msg.txt chmod 666 /tmp/msg.txt 
    rxvt -fb -sb -fn lucidasanstypewriter-bold-14 -sl 2048 -bg red -fg 
    white -title SMB Network Messages -geometry 80x10+150+280 -e tail -f 
    /tmp/msg.txt

    This script creates an rxvt window. If you do not have rxvt installed or want to use an xterm window, substitute xterm instead.

  4. Save the script as tailmsg.sh and be sure to make this an executable file.

  5. Run this file in the background: ./tailmsg.sh &.

 

Parent topic:

Configuring the clients