{"id":430,"date":"2020-04-14T12:54:41","date_gmt":"2020-04-14T03:54:41","guid":{"rendered":"https:\/\/blog.hgrs.me\/?p=430"},"modified":"2021-08-29T17:16:30","modified_gmt":"2021-08-29T08:16:30","slug":"raspberry-pi-%e3%81%a7-vnc-x11vnc-%e3%82%92%e8%a8%ad%e5%ae%9a%e3%81%97%e3%81%a6%e7%94%bb%e9%9d%a2%e5%85%b1%e6%9c%89%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.hgrs.me\/archives\/430.html","title":{"rendered":"Raspberry Pi \u3067 VNC( x11vnc ) \u3092\u8a2d\u5b9a\u3057\u3066\u753b\u9762\u5171\u6709\u3059\u308b"},"content":{"rendered":"

\u306f\u3058\u3081\u306b<\/h2>\n

\u30e9\u30ba\u30d1\u30a4\u306b\u3092\u64cd\u4f5c\u3059\u308b\u306e\u306b\u3001\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3084\u30ad\u30fc\u30dc\u30fc\u30c9\u3001\u30de\u30a6\u30b9\u3092\u7528\u610f\u3059\u308b\u306e\u304c\u9762\u5012\u306a\u306e\u3067\u3001macOS \u304b\u3089\u753b\u9762\u5171\u6709\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n

x11vnc \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n

x11vnc \u306f VNC \u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u5229\u7528\u3057\u305f\u753b\u9762\u5171\u6709\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/p>\n

Raspbian \u3067\u306f\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n

$ sudo apt install x11vnc<\/code><\/pre>\n

x11vnc \u306e\u8a2d\u5b9a<\/h2>\n

\u753b\u9762\u5171\u6709\u306e\u8a8d\u8a3c\u306b\u4f7f\u3046\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n

$ x11vnc -storepasswd<\/code><\/pre>\n

\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3059\u308b\u3068 Write password to \/home\/<user_name>\/.vnc\/passwd? [y]\/n<\/code> \u3068\u78ba\u8a8d\u3055\u308c\u307e\u3059\u3002\u3053\u3061\u3089\u306f\u6b21\u306b\u8aac\u660e\u3059\u308b\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a\u306b\u4f7f\u7528\u3059\u308b\u306e\u3067 y<\/code> \u3067\u89e3\u7b54\u3057\u307e\u3059\u3002<\/p>\n

\u307e\u305f\u3001Raspberry Pi \u306b\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3092\u63a5\u7d9a\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u753b\u9762\u5171\u6709\u6642\u3001\u305d\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3068\u540c\u3058\u753b\u9762\u3001\u540c\u3058\u89e3\u50cf\u5ea6\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u3002
\n\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3092\u63a5\u7d9a\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3001\u300cRaspberry Pi \u306e\u8a2d\u5b9a\u300d\u306e\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306e\u89e3\u50cf\u5ea6\u304c\u4f7f\u7528\u3055\u308c\u308b\u305f\u3081\u3001\u89e3\u50cf\u5ea6\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306f\u3053\u3061\u3089\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\uff08\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u5909\u66f4\u3059\u308b\u5834\u5408\u306f sudo raspi-config<\/code> > Display Options<\/code> \u304b\u3089\u8a2d\u5b9a\u3057\u307e\u3059\uff09<\/p>\n

\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<\/h2>\n

\u8d77\u52d5\u6642\u306b\u6bce\u56de\u3001\u624b\u52d5\u3067\u7acb\u3061\u4e0a\u3052\u308b\u306e\u3067\u306f\u3001\u3042\u307e\u308a\u610f\u5473\u304c\u306a\u3044\u306e\u3067\u3001\u81ea\u52d5\u8d77\u52d5\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n

\u307e\u305a\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u306e x11vnc.service<\/code> \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092 \/etc\/systemd\/system\/<\/code> \u306b\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n

[Unit]\nDescription=X11vnc\nAfter=multi-user.target\n\n[Service]\nType=simple\nExecStart=\/usr\/bin\/x11vnc -forever -auth guess -rfbauth \/home\/pi\/.vnc\/passwd\n\n[Install]\nWantedBy=multi-user.target<\/code><\/pre>\n

\u3053\u308c\u306f systemd \u3068\u3044\u3046 Raspbian \u3067\u63a1\u7528\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30e2\u30f3\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u306f\u3053\u3053\u3067\u306f\u8aac\u660e\u3057\u307e\u305b\u3093\u304c\u3001x11vnc \u306b\u9650\u3089\u305a\u3001\u81ea\u7531\u306b\u81ea\u52d5\u8d77\u52d5\u306e\u8a2d\u5b9a\u304c\u884c\u3048\u308b\u306e\u3067\u3001\u899a\u3048\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n

\u307e\u305f x11vnc \u306e\u5b9f\u884c\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3053\u3060\u308f\u308a\u306e\u3042\u308b\u65b9\u306f\u4e0a\u8a18\u306e ExecStart<\/code> \u306e\u884c\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u66f8\u304d\u52a0\u3048\u308b\u3053\u3068\u3067\u5b9f\u884c\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n

\u4e0a\u8a18\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307e\u305b\u307e\u3059\u3002<\/p>\n

$ sudo systemctl daemon-reload<\/code><\/pre>\n

\u6b21\u306b\u3001\u8a2d\u5b9a\u304c\u6b63\u3057\u304f\u884c\u3048\u3066\u8d77\u52d5\u3067\u304d\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n

$ sudo systemctl start x11vnc<\/code><\/pre>\n

\u5f8c\u8ff0\u3059\u308b\u63a5\u7d9a\u65b9\u6cd5\u3067\u63a5\u7d9a\u304c\u3067\u304d\u308c\u3070\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u81ea\u52d5\u8d77\u52d5\u3092\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n

$ sudo systemctl enable x11vnc<\/code><\/pre>\n

\u753b\u9762\u5171\u6709\u306e\u63a5\u7d9a<\/h2>\n

macOS \u304b\u3089\u78ba\u8a8d\u3059\u308b\u306b\u306f \u753b\u9762\u5171\u6709.app \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u753b\u9762\u5171\u6709.app \u306f Spotlight \u304b\u3089\u691c\u7d22\u3059\u308b\u3068\u51fa\u3066\u304d\u307e\u3059\u3002<\/p>\n

\u30a2\u30c9\u30ec\u30b9\u306b\u306f Raspberry Pi \u306e\u30db\u30b9\u30c8\u540d\u304b IP \u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n

\u307e\u305f\u306f\u3001Finder \u304b\u3089\u30b5\u30fc\u30d0\u3078\u63a5\u7d9a\uff08 Command + K \uff09\u3092\u3057\u3001vnc:\/\/raspberrypi.local\/<\/code> \u306b\u63a5\u7d9a\u3059\u308b\u3053\u3068\u3067\u3082\u753b\u9762\u5171\u6709\u3092\u958b\u59cb\u3067\u304d\u307e\u3059\u3002<\/p>\n

\u3053\u306e\u969b raspberrypi.local<\/code> \u306e\u90e8\u5206\u306f\u74b0\u5883\u306b\u3088\u3063\u3066 IP \u30a2\u30c9\u30ec\u30b9\u3084\u30db\u30b9\u30c8\u540d\u306b\u9069\u5b9c\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n

\u304a\u308f\u308a\u306b<\/h2>\n

\u3053\u308c\u3067\u30e9\u30ba\u30d1\u30a4\u7528\u306e\u5468\u8fba\u6a5f\u5668\u304c\u306a\u304f\u3066\u3082\u64cd\u4f5c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u306f\u3058\u3081\u306b \u30e9\u30ba\u30d1\u30a4\u306b\u3092\u64cd\u4f5c\u3059\u308b\u306e\u306b\u3001\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u3084\u30ad\u30fc\u30dc\u30fc\u30c9\u3001\u30de\u30a6\u30b9\u3092\u7528\u610f\u3059\u308b\u306e\u304c\u9762\u5012\u306a\u306e\u3067\u3001mac…<\/p>\n","protected":false},"author":1,"featured_media":431,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[40],"_links":{"self":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/430"}],"collection":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/comments?post=430"}],"version-history":[{"count":0,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/posts\/430\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media\/431"}],"wp:attachment":[{"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/media?parent=430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/categories?post=430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hgrs.me\/wp-json\/wp\/v2\/tags?post=430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}