Is there a VNC server that listens to a Unix socket instead of a TCP port?

3

I am trying to find a VNC server that can listen on a Unix domain socket instead of a TCP port (normally 5900).

I have not found any VNC server software supporting this. I do know what domain sockets are and want to use server and client on the same box. I know it's a weird requirement. I have a client for it. I modified one to support Unix sockets.

Does anyone know of a VNC server that supports Unix sockets?

agentsmith.android

Posted 2012-08-06T23:33:13.917

Reputation: 31

Question was closed 2012-08-07T02:06:07.067

tigervnc added this option: −rfbunixpath path

Specifies the path of a Unix domain socket on which Xvnc listens for connections from viewers, instead of listening on a TCP port. – Badr Elmers – 2019-11-22T11:31:07.240

Isn't there a server configuration setting that controls this? – martineau – 2012-08-07T00:01:44.813

@martineau: Is there? I went thru it once. Please, let me know if there is one. – agentsmith.android – 2012-08-07T00:07:37.067

Sorry, I was mistaken. – martineau – 2012-08-07T00:14:24.287

Answers

2

You may be able to use socat to forward a UNIX domain socket to a TCP port. It is very flexible and lets you forward just about any source to any target.

Fran

Posted 2012-08-06T23:33:13.917

Reputation: 4 774

Little more clarification. I want to use domain sockets because I need to use vncserver and client on the same host and there is no point in going thru network stack when you can have domain sockets. If I use socat, will vncserver avoid going thru network stack? If yes can you give a short example. Thanks. – agentsmith.android – 2012-08-07T00:38:37.737

1Try this syntax: socat UNIX-LISTEN:/tmp/vlc TCP:localhost:9999. This listens for a client to connect to a UNIX domain socket (at pathname /tmp/vlc) and when the connection happens, forwards traffic bidirectionally to TCP port 9999 on host localhost. See the man page for socat for variations. This does not avoid traffic going through the network stack, but no traffic leaves your host. – Fran – 2012-08-07T01:16:40.457

thanks. But I am looking at domain sockets for avoiding network stack. – agentsmith.android – 2012-08-07T01:26:02.807