quarta-feira, janeiro 19, 2005

Sending and receiving "net send" messages in a linuxbox via samba

To send, its quite easy:

smbclient -M hostORuser

then follow the instructions... (type and press CTRL-D)

To receive, everybody tells its necessary to use xmessage or someother stuff like linuxpopup.
I found a quick solution wich needs no more than xterm being installed. And as it comes with probably all distros... its gonna work.

add the following line to /etx/samba/smb.conf in [GLOBAL] section:
message command = DISPLAY=:0.0; xterm -e "cat %s; read"; rm %s

In my system, the messages come as user nobody, so I had to add this user to the list of allowed users to connect to my xserver. I certainly didn't do it the best way, but I know no other. I added this line to my ~/.bashrc:


xhost +local:nobody > /dev/null

and everything works ok...

best regards,
fred