Skip to content

How to have socat open a listening socket in the file system?

Dear Lazyweb, can anybody with some advanced socat-foo tell me the command line needed to have socat create a socket in the local file system and to listen on it, so that I can have Virtualbox connect a virtual serial console to it?

The material available on socat on the web is sparse, and virtualbox-related docs usually contain "tick the create pipe option", which is not helpful here since I would like to see the first output the virtual machine prints to its serial port. It would be vastly more useful to have the socket already created with socat listening so that I can immediately see what is being printed to the socket.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

mru on :

socat UNIX-LISTEN:/tmp/socat-socket - and for the other direction: socat - UNIX-CONNECT:/tmp/socat-socket

Marc 'Zugschlus' Haber on :

Thanks, that's it. Could have thought about that (vs. UNIX domain socket) myself. Thanks for helping.

Richard on :

Once I run :

"socat UNIX-LISTEN:/tmp/com1_socket TCP-LISTEN:8040"

I get connection refused. I went ahead and gave everyone read,write and exec permissions to rule it out.

I'm running Fedora 11

Add Comment

Markdown format allowed
Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
Form options