Linux‎ > ‎Desktop Tips‎ > ‎

Linux to Linux Communication

posted Oct 30, 2014, 7:15 PM by Joe Bieber   [ updated Oct 30, 2014, 7:15 PM ]
I'm setting here chatting with myself and I like it.

I'm connected to a remote linux box via SSH and VNC testing out different messaging and dialog programs. Here's what I'm playing with.

I wanted to send messages to a remote system and be able to read the response. So I started with xmessage. First I had to be able to  interact with the remote computer's display.

$ export DISPLAY=:0

This will make commands I type, display a GUI to the remote computer's display (as long as it's current display is :0)

$ xmessage -center "Hi remote computer. Click Ok to close me."

This will popup a message with a standard ok button. There are several options to add buttons and do other things.

With the display still exported, I tried zenity. Zenity can display different dialogs and get a range of input from the remote user and is prettier than xmessage.

$ zenity --entry --text "Type something."

This will display a dialog asking for input. The text typed into the dialog on the remote computer will be returned to the local computer. There is a ton of interesting things to do with zenity.

For terminal to terminal chat.

On one computer type this into the terminal.

$ nc -l 55555

this will listen for a connection on port 55555

On the other computer type this into the terminal.


This establishes the connection between the computers and now you chat to your hearts content.

I would elaborate more on these and the fun I had talking with myself, but I'm tired and you can just read the man pages anyway.