{"id":1932,"date":"2019-09-01T17:20:04","date_gmt":"2019-09-02T01:20:04","guid":{"rendered":"http:\/\/wonghoi.humgar.com\/blog\/?p=1932"},"modified":"2019-09-01T17:20:04","modified_gmt":"2019-09-02T01:20:04","slug":"x11vnc-for-linux-setup-notes","status":"publish","type":"post","link":"https:\/\/wonghoi.humgar.com\/blog\/2019\/09\/01\/x11vnc-for-linux-setup-notes\/","title":{"rendered":"X11VNC for Linux setup notes"},"content":{"rendered":"<p>x11vnc is a relatively smooth experience, but there are quite a few common use cases that would have been automated away if it&#8217;s a Windows program, namely have it start as a service on boot (before logging in)<\/p>\n<p>It&#8217;s from<a href=\"https:\/\/askubuntu.com\/users\/298348\/babelmonk\"> babelmonk&#8217;s solution<\/a> on StackExchange. Paraphrased here to make it easier to understand:<\/p>\n<p>After installation, create the password file with -storepasswd switch AND specify the where you want the password saved as an optional argument, and I prefer \/etc\/x11vnc.pass:<\/p>\n<pre><code>sudo x11vnc -storepasswd {your password goes here} \/etc\/x11vnc.pass\r\n<\/code><\/pre>\n<p>which will be read by\u00a0<code>-rfbauth<\/code>\u00a0switch for the x11vnc program.<\/p>\n<hr \/>\n<p>Build your own (systemctl) service by creating <code>\/etc\/systemd\/system\/x11vnc.service<\/code>:<\/p>\n<pre><code>[Unit]\r\nDescription=\"x11vnc\"\r\nRequires=display-manager.service\r\nAfter=display-manager.service\r\n\r\n[Service]\r\nExecStart=\/usr\/bin\/x11vnc -xkb -noxrecord -noxfixes -noxdamage -display :0 -auth guess -rfbauth \/etc\/x11vnc.pass\r\nExecStop=\/usr\/bin\/killall x11vnc\r\nRestart=on-failure\r\nRestart-sec=2\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/code><\/pre>\n<p>Then, start with:<\/p>\n<pre><code>sudo systemctl daemon-reload\r\nsudo systemctl start x11vnc\r\n<\/code><\/pre>\n<p>Enable the service (if not already done by previous commands) so it will start on boot<\/p>\n<pre><code>sudo systemctl enable x11vnc<\/code><\/pre>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1932\" class=\"pvc_stats all  \" data-element-id=\"1932\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>x11vnc is a relatively smooth experience, but there are quite a few common use cases that would have been automated away if it&#8217;s a Windows program, namely have it start as a service on boot (before logging in) It&#8217;s from &hellip; <a href=\"https:\/\/wonghoi.humgar.com\/blog\/2019\/09\/01\/x11vnc-for-linux-setup-notes\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1932\" class=\"pvc_stats all  \" data-element-id=\"1932\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/wonghoi.humgar.com\/blog\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[39,6],"tags":[],"class_list":["post-1932","post","type-post","status-publish","format-standard","hentry","category-linux","category-note-to-self"],"_links":{"self":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1932","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/comments?post=1932"}],"version-history":[{"count":1,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1932\/revisions"}],"predecessor-version":[{"id":1933,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/posts\/1932\/revisions\/1933"}],"wp:attachment":[{"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/media?parent=1932"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/categories?post=1932"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wonghoi.humgar.com\/blog\/wp-json\/wp\/v2\/tags?post=1932"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}