{"id":27922,"date":"2025-04-19T21:46:06","date_gmt":"2025-04-19T13:46:06","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/27922.html"},"modified":"2025-04-19T21:46:06","modified_gmt":"2025-04-19T13:46:06","slug":"%e6%9c%8d%e5%8a%a1%e5%99%a8%e5%9b%be%e5%bd%a2%e5%8c%96%e6%98%be%e7%a4%ba%ef%bc%9ax11vnc%e9%85%8d%e7%bd%ae%e7%ae%80%e6%98%8e%e6%95%99%e7%a8%8b%e6%9a%a8%e8%b8%a9%e5%9d%91%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/27922.html","title":{"rendered":"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0"},"content":{"rendered":"<h3>\u914d\u7f6ex11&#xff1a;\u4e00\u4e2a\u8fdc\u7a0b\u7684\u56fe\u5f62\u5316\u4f20\u8f93\u534f\u8bae<\/h3>\n<h4>\u5728\u670d\u52a1\u5668\u4e0a&#xff1a;<\/h4>\n<p>sudo vim \/etc\/ssh\/sshd_config<\/p>\n<p>\u4fee\u6539\u914d\u7f6e&#xff1a;<\/p>\n<p>AllowAgentForwarding yes<br \/>\nAllowTcpForwarding yes<br \/>\nX11Forwarding yes<br \/>\nX11DisplayOffset 10<br \/>\nX11UseLocalhost no <\/p>\n<p>\u91cd\u542fsshd service<\/p>\n<p>sudo service sshd restart <\/p>\n<h4>\u00a0\u5728\u672c\u5730&#xff1a;<\/h4>\n<p>\u8bbe\u7f6e&#xff5e;\/.ssh\/config<\/p>\n<p>Host &lt;host_name&gt;<br \/>\n  HostName &lt;ip&gt;<br \/>\n  User &lt;user_name&gt;<br \/>\n  ForwardX11 yes<br \/>\n  ForwardX11Trusted yes<br \/>\n  ForwardAgent yes <\/p>\n<h4>\u6d4b\u8bd5&#xff1a;<\/h4>\n<p>\u53ef\u4ee5\u5c1d\u8bd5ssh &lt;host_name&gt;\u770b\u80fd\u5426\u8fde\u63a5\u5230\u8fdc\u7a0b<\/p>\n<\/p>\n<h3>\u914d\u7f6ex11vnc&#xff1a;\u4e00\u4e2a\u4f20\u8f93\u7684\u5ba2\u670d\u7aef<\/h3>\n<p>&#8211; \u5982\u679c\u5df2\u7ecf\u6709\u684c\u9762\u3001\u4f46\u9700\u8981\u8fdc\u7a0b\u8bbf\u95ee\u684c\u9762&#xff1a;<\/p>\n<h4>\u5728\u670d\u52a1\u5668\u4e0a&#xff1a;<\/h4>\n<p>1. \u5b89\u88c5x11vnc\u4ee5\u53ca\u5fc5\u8981dependency<\/p>\n<p>sudo apt-get install x11vnc net-tools <\/p>\n<p>2. \u8fd0\u884cx11vnc\u00a0<\/p>\n<p>x11vnc -display $DISPLAY -rfbport 5900 <\/p>\n<p>&#8211; \u5982\u679c\u6ca1\u6709\u684c\u9762&#xff0c;\u90a3\u4e48\u9700\u8981\u81ea\u5df1\u5efa\u4e00\u4e2a\u865a\u62df\u684c\u9762<\/p>\n<h4>\u5728\u670d\u52a1\u5668\u4e0a&#xff1a;<\/h4>\n<p>1. \u5b89\u88c5x11vnc\u4ee5\u53ca\u5fc5\u8981dependency<\/p>\n<p>sudo apt-get install x11vnc net-tools xvfb fluxbox <\/p>\n<p>2. \u8bbe\u7f6e$DISPLAY\u53c2\u6570<\/p>\n<p>export DISPLAY&#061;:7 # \u53ef\u4ee5\u4e3a\u5176\u4ed6\u6570&#xff0c;just an example<\/p>\n<p># \u4e3a\u4e86\u4e4b\u540e\u7684\u65b9\u4fbf\u53ef\u4ee5\u5199\u5165~\/.bashrc\u4e2d<br \/>\necho export DISPLAY&#061;:7 &gt;&gt; ~\/.bashrc<br \/>\nsource ~\/.bashrc <\/p>\n<p>3. \u65b0\u5efa\u865a\u62df\u684c\u9762<\/p>\n<p>Xvfb $DISPLAY -screen 0 1920x1080x24 &amp;<br \/>\nfluxbox &amp; <\/p>\n<p>4. \u8fd0\u884cx11vnc<\/p>\n<p>x11vnc -display $DISPLAY -rfbport 5900 <\/p>\n<h4>\u5728\u672c\u5730\u4e0a&#xff1a;<\/h4>\n<p>\u901a\u8fc7real vnc\u00a0\u5b89\u88c5VNC Reviewer&#xff0c;\u8f93\u5165\u5730\u5740&lt;ip&gt;:5900 \u8bbf\u95ee<\/p>\n<h4>\u6d4b\u8bd5&#xff1a;<\/h4>\n<p>\u5728\u670d\u52a1\u5668\u4e0a\u8dd1&#xff1a;<\/p>\n<p>xeyes <\/p>\n<p>\u5e94\u8be5\u80fd\u5728real vnc\u4e2d\u770b\u5230\u4e24\u53ea\u773c\u775b&#x1f440;<\/p>\n<\/p>\n<h3>\u5e38\u89c1\u95ee\u9898&#xff1a;<\/h3>\n<p>1. $DISPLAY\u5df2\u7ecf\u88ab\u4f7f\u7528&#xff0c;\u6216\u8005\u66fe\u7ecf\u88ab\u4f7f\u7528\u8fc7<\/p>\n<p>$ Xvfb $DISPLAY -screen 0 1920x1080x24<br \/>\n(EE)<br \/>\nFatal server error:<br \/>\n(EE) Server is already active for display 7<br \/>\n        If this server is no longer running, remove \/tmp\/.X7-lock<br \/>\n        and start again.<br \/>\n(EE)  <\/p>\n<p>\u8bbe\u7f6e$DISPLAY\u4e3a\u5176\u4ed6\u503c\u6216\u8005\u5220\u6389\/tmp\/.X7-lock<\/p>\n<p>rm \/tmp\/.X7-lock <\/p>\n<p>2. x server\u5df2\u5728\u8fd0\u884c<\/p>\n<p>$ Xvfb $DISPLAY -screen 0 1920x1080x24<br \/>\n_XSERVTransSocketUNIXCreateListener: &#8230;SocketCreateListener() failed<br \/>\n_XSERVTransMakeAllCOTSServerListeners: server already running<br \/>\n(EE)<br \/>\nFatal server error:<br \/>\n(EE) Cannot establish any listening sockets &#8211; Make sure an X server isn&#039;t already running(EE) <\/p>\n<p>\u5220\u6389\u5df2\u6709\u7684\u8fdb\u7a0b<\/p>\n<p>$ ps -aux | grep Xvfb<br \/>\nuser     485583  0.0  0.1 213840 71628 pts\/23   S&#043;   19:52   0:00 Xvfb :4 -screen 0 1920x1080x24<br \/>\nuser     506709  0.0  0.0  12628  2304 pts\/2    S&#043;   20:09   0:00 grep &#8211;color&#061;auto Xvfb<\/p>\n<p>$ kill -9 485583 <\/p>\n<p>3. \u5f85\u8865\u5145<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.9k\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u5982\u4f55\u5728vscode\u8fde\u63a5\u8fdc\u7a0b\u3001\u540c\u65f6\u83b7\u5f97\u56fe\u5f62\u5316\u663e\u793a_x11vnc server\u914d\u7f6e<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,77,76,43,44],"topic":[],"class_list":["post-27922","post","type-post","status-publish","format-standard","hentry","category-server","tag-linux","tag-ssh","tag-vscode","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/27922.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.9k\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u5982\u4f55\u5728vscode\u8fde\u63a5\u8fdc\u7a0b\u3001\u540c\u65f6\u83b7\u5f97\u56fe\u5f62\u5316\u663e\u793a_x11vnc server\u914d\u7f6e\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/27922.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T13:46:06+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/27922.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/27922.html\",\"name\":\"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T13:46:06+00:00\",\"dateModified\":\"2025-04-19T13:46:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/27922.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/27922.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/27922.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/27922.html","og_locale":"zh_CN","og_type":"article","og_title":"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.9k\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf10\u6b21\u3002\u5982\u4f55\u5728vscode\u8fde\u63a5\u8fdc\u7a0b\u3001\u540c\u65f6\u83b7\u5f97\u56fe\u5f62\u5316\u663e\u793a_x11vnc server\u914d\u7f6e","og_url":"https:\/\/www.wsisp.com\/helps\/27922.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T13:46:06+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/27922.html","url":"https:\/\/www.wsisp.com\/helps\/27922.html","name":"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T13:46:06+00:00","dateModified":"2025-04-19T13:46:06+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/27922.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/27922.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/27922.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u670d\u52a1\u5668\u56fe\u5f62\u5316\u663e\u793a\uff1ax11vnc\u914d\u7f6e\u7b80\u660e\u6559\u7a0b\u66a8\u8e29\u5751\u8bb0"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/27922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=27922"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/27922\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=27922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=27922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=27922"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=27922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}