Gentgeen wrote:
> I have seen a number of message on both this list, and on the K12LTSP
> list about "how do I send a message to all/one user logged into the
> server". Well, I know I have seen answers, but I could not find them in
> the archieve, or what I found was really just "peices" of what I really
> wanted/needed. I would love to post this into the LTSP Wiki and into my
> own wiki, but I would like some feedback first, since my bash skills are
> pretty limited. (I tend to take bits and peices from other scipts and
> put them all together to make mine work)
>
>
> # Function to send message to one user
> function msg_one ()
> {
> # need to get the display just for that one user
> display=$(who | grep ^"$username" | awk '{print $2}' | grep -e \\
> ":")
> # if the display comes back as just ":0" that means the user is
> # logged onto the server (at least on my machine)
> if [ "$display" = :0 ]; then
> display="`hostname -f`:0.0"
> fi
> su 2>/dev/null 1>&2 -c "$msgprg -center -timeout 30 -display \\
> $display $message" - $username &
>
Hi Kevin,
It looks like you need to disable xhost security to make this way
work. For some people, that may be fine, but others should note there
is an alternative here:
http://wiki.ltsp.org/twiki/bin/view/Ltsp/SendingPopupMessages
Andrew
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_____________________________________________________________________
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto:
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help, try #ltsp channel on irc.freenode.net