Implementation of two-way message sending and receiving in Windows

Source: Internet
Author: User
Tags net send
Article Title: implementation of two-way message sending and receiving in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
On linux, how does one send a popup message to windows?
Wrote a net script, similar to net send in 2 K
SMB messages can be sent.
  
Save the following script as/usr/local/bin/net
Chmod + x/usr/local/bin/net
  
  
#! /Bin/bash
#/Usr/local/bin/net
  
Case "$1" in
Send)
Echo "$3" | smbclient-I "$2"-m'nmblookup-A "$2" | sed-e '1d'
-E '3,/*/d' | cut-f2 | cut-d'-f1'
;;
*)
Echo "Usage: net send"
Exit 1
Esac
Example:
Net send 192.168.0.1 "hello, workd! "
  
---------------------------- Nukq (yue)
  
In windows, how does one enable two-way message sending and receiving in linux?
  
1. Can I use net send to send messages in linux like 2 k?
A. Yes, easy. echo "hello baby! "| Smbclient-M nukq (computer name)
It's better to install a graphic front-end called LinPopUp :)
  
2. How can I receive messages from other people?
A. A little less easy. First you need to install and run samba (or smbclient is not available ^-^ ),
Then modify smb. conf, which is generally located at/etc/samba/smb. conf.
Add the following content in the [global] section:
A. if you want to send the message to your mailbox
Message command = cat % s | mail root-s "PopMsg from: % f-% m"; rm % s;
B. If you want to add more results
Message command = cat % s | mail root-s "PopMsg form: % f-% m ";
/Usr/local/bin/beep-f800-l100-D100-n-f800-l100-D100-n-f800-l100; rm
% S;
(Note: As a line, beep is a small tool used to send a certain frequency of calls. In this way, someone will send a message to you
When you hear three "beep" voices, and then you enter the mail, is there an email titled "PopMsg from: xxx)
C. If you have installed LinPopUp, let's improve it.
Message command = cat % s | mail root-s "PopMsg form: % f-% m ";/
Usr/local/bin/beep-f800-l100-D100-n-f800-l100-D100-n-f800-l100;
/Usr/local/bin/LinPopUp "% f" "% m" % s; rm % s
(Note: You still need to write a line. Now, you can hear "Doodle" mail. you can also enable LinPopUp to view the history. You can view the previous information and reply directly .. make a LinPopUp shortcut on the desktop, which is too convenient for yiyayiyayi ~~~~)
  
Note: during compilation and installation of LinPopUp, install the * i18n * patches and other patch files in the directory.
Otherwise, Chinese messages cannot be entered or displayed in LinPoUp.
  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.