vncserver支持UNIX域套接字 [英] vncserver supports unix domain sockets

查看:143
本文介绍了vncserver支持UNIX域套接字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能帮我找到一个支持UNIX域套接字或任何其他调整的vncserver

can you help me in finding a vncserver that supports UNIX domain socket or any other tweak

tightvnc在/tmp/.X11-unix/X${display_number}下创建一个套接字文件,但我不确定这是否可行

tightvnc creates a socket file under /tmp/.X11-unix/X${display_number} but i'm not sure that this would work

预先感谢

推荐答案

您可以使用Tigervnc或X2go:

You can do it with Tigervnc or X2go:

Tigervnc添加了 -rfbunixpath 的Unix域套接字.

Tigervnc added Unix domain socket with -rfbunixpath.

您可以使用官方构建或您的OS软件包系统以两种方式以更少的方式获得Tigervnc,它们之间也有所不同(对于Debian而言,可能也有所不同):

You can obtain Tigervnc in two ways at less, using the official build or your OS packages system, and they differ a little bit (for Debian at less, maybe other OS's too):

  • 正式版本(首选):

您可以从源代码构建它,也可以使用此处中的二进制文件

you can build it from source or use the binaries from here like that:

curl -sSfL -o tigervnc-1.10.0.x86_64.tar.gz https://bintray.com/tigervnc/stable/download_file?file_path=tigervnc-1.10.0.x86_64.tar.gz
tar xz -f tigervnc-1.10.0.x86_64.tar.gz

然后将其复制到/usr/local或您喜欢的任何位置.

then copy it to /usr/local or where ever you like.

创建一个密码来保护vnc服务器,方法是:vncpasswd

create a password to protect the vnc server with: vncpasswd

运行服务器:

vncserver :1 -geometry 1600x1000 -rfbunixpath /tmp/vnc_myunixSocket -nolisten tcp

例如,您现在可以使用以下方法远程连接ssh:

you can now for example connect with ssh remotely with:

ssh -fx -e none -o ExitOnForwardFailure=yes -L 4321:/tmp/vnc_myunixSocket user@IP & 
vncviewer localhost:4321

  • 使用软件包管理器(Debian apt)

    • using the package manager (Debian apt)

    • Debian的Tigervnc(破坏程序)与官方版本不同,并且其vncserver(perl脚本)有问题,您不能使用Unix套接字,因为它们会检查开放端口,如果找不到,则脚本认为vncserver遇到问题并关闭它.要解决此问题,您可以从该脚本中删除支票或直接使用xtigervnc,而无需使用vncserver脚本,如下所示:

      Tigervnc of Debian (buster) is different than the official build and have a problem in their vncserver (a perl script), you cannot use the Unix socket because they check for an open port and if not found then the script consider that vncserver got a problem and close it. to solve this you can remove the check from that script or use xtigervnc directly without using the vncserver script like that:

      Xtigervnc :1 -auth ~/.Xauthority -geometry 1600x1000 -depth 24 -rfbwait 30000 -rfbauth ~/.vnc/passwd -pn -localhost -SecurityTypes VncAuth -nolisten tcp -rfbunixpath /tmp/vnc_myunixSocket
      

      如您所见,它虽然不好,但是可以用,这就是为什么我更喜欢正式版本.

      as you see it is not nice but it works, that is why I prefer the official build.

      x2go也使用Unix域套接字,并且不需要服务器中的任何开放端口. 我一直使用官方的网站进行安装,但是现在我看到了它也被添加到Debian存储库中.它也可以正常工作,这对于低资源服务器来说更好,因为它在客户端PC中使用X服务器(VNC使用服务器的X,因此会消耗更多资源)

      x2go uses Unix domain socket too, and do not need any open port in the server. I always used the official site to install it, but now I see it was added to Debian repository too. it works fine too, this is better for low resource servers because it use an X server in your client PC (VNC uses the X of the server so consumes more resources)

      这篇关于vncserver支持UNIX域套接字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆