{"id":355,"date":"2021-03-16T21:35:22","date_gmt":"2021-03-16T12:35:22","guid":{"rendered":"https:\/\/sirius10.dip.jp\/blog\/wordpress\/?p=355"},"modified":"2021-04-18T21:47:47","modified_gmt":"2021-04-18T12:47:47","slug":"retropie2","status":"publish","type":"post","link":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/2021\/03\/16\/355\/","title":{"rendered":"RetroPie(2)"},"content":{"rendered":"\n<p>X-Window \u304b\u3089\u8d77\u52d5\u3057\u305f RetroPie \u306e np2kai<\/p>\n\n\n\n<p>\u3000X-Window \u304b\u3089 RetroPie\uff08\u5b9f\u969b\u306f emulationstation\uff09\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u72b6\u614b\u3060\u3068\u3001np2kai \u3067\u30de\u30a6\u30b9\u304c\u4f7f\u3048\u307e\u305b\u3048\u3093\u3002PC98 \u306e\u30b2\u30fc\u30e0\u3067\u30de\u30a6\u30b9\u304c\u4f7f\u3048\u306a\u3044\u306e\u306f\u4e0d\u4fbf\u306a\u306e\u3067\u3001\u4f7f\u3046\u65b9\u6cd5\u3092\u63a2\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3000\u307e\u305a\u3001np2kai \u306e\u30bd\u30fc\u30b9\u3092\u4fee\u6b63\u3067\u304d\u306a\u3044\u304b\u3092\u8a66\u3057\u307e\u3057\u305f\u3002github \u304b\u3089\u30bd\u30fc\u30b9\u3092 clone \u3057\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"console\">$ git clone https:\/\/github.com\/AZO234\/NP2kai.git<br>$ cd np2kai\/sdl<br>$ make j4<\/p>\n\n\n\n<p>\u3000\u30b3\u30f3\u30d1\u30a4\u30eb\u306f\u3067\u304d\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u30bd\u30fc\u30b9\u3092\u898b\u3066\u3082\u3069\u3053\u3092\u4fee\u6b63\u3059\u308c\u3070\u3088\u3044\u306e\u304b\u308f\u304b\u308a\u307e\u305b\u3093\u3002\u307e\u3042\u3001\u305d\u308c\u306f\u305d\u3046\u3067\u3059\u3002\u306a\u305c X-Window \u4e0b\u3060\u3068\u30de\u30a6\u30b9\u304c\u4f7f\u3048\u306a\u3044\u306e\u304b\u306e\u539f\u56e0\u304c\u308f\u304b\u3063\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u3000\u5225\u306e\u624b\u3092\u8003\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"console\">$ sudo apt-get install wmctrl<\/p>\n\n\n\n<p>\u3000wmctrl \u3067\u30d5\u30a9\u30fc\u30ab\u30b9\u3092\u5f53\u3066\u305f\u3089\u3067\u304d\u308b\u304b\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u3046\u307e\u304f\u884c\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3000X-Window \u306e\u4eee\u60f3\u7aef\u672b\u304b\u3089\u8d77\u52d5\u3057\u3066\u3044\u307e\u3057\u305f\u304c\u3001crtl+alt+F3 \u3067\u4eee\u60f3\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u5207\u308a\u66ff\u3048\u3066\u304b\u3089 emulationstation \u3092\u8d77\u52d5\u3057\u305f\u3089\u3001np2kai \u3067\u30de\u30a6\u30b9\u304c\u4f7f\u3048\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3000\u306a\u308b\u307b\u3069\u3001\u8d77\u52d5\u3059\u308b\u7aef\u672b\u306e\u9055\u3044\u304b\u306a\uff1f<\/p>\n\n\n\n<p>\u3000\u4eee\u60f3\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u5207\u308a\u66ff\u3048\u308b\u30b3\u30de\u30f3\u30c9 cvt \u3068 \u81ea\u52d5\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3088\u3046\u306b\u3001agetty \u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u4f7f\u3046\u4eee\u60f3\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u3059\u304c\u3001tty1 \u306f\u3001\u3059\u3067\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3044\u307e\u3059\u3002tty7 \u3067 X-window \u304c \u52d5\u3044\u3066\u3044\u307e\u3059\u3002\u666e\u901a\u4f7f\u308f\u308c\u306a\u3044 tty8 \u3092\u4f7f\u3046\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3000\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"console\">$ (sudo chvt 8&amp;); sudo LANG=C setsid \/sbin\/agetty &#8211;autologin pi -8 tty8 linux<\/p>\n\n\n\n<p>\u3000chvt 8 \u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u623b\u3063\u3066\u304f\u308b\u307e\u3067\u305d\u3053\u3067\u5f85\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001&amp; \u3092\u4ed8\u3051\u3066\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u52d5\u304b\u3057\u3001agetty \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002setsid \u3092\u4f7f\u3046\u306e\u306f\u3001\u65b0\u3057\u3044\u30d7\u30ed\u30bb\u30b9\u30b0\u30eb\u30fc\u30d7(\u6b63\u78ba\u306b\u306f\u30bb\u30c3\u30b7\u30e7\u30f3)\u3092\u4f5c\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u3046\u307e\u304f\u5207\u308a\u66ff\u308f\u308a\u307e\u3057\u305f\u3002\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"console\">$ tty<br>\/dev\/tty8<\/p>\n\n\n\n<p>\u3000tty8 \u3067\u3059\u306d\u3002emulationstation \u3092\u52d5\u304b\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"console\">$ emulationstation<\/p>\n\n\n\n<p>\u3000np2kai \u3067\u30de\u30a6\u30b9\u304c\u4f7f\u3048\u307e\u3057\u305f\u3002X-window \u306b\u623b\u308b\u306b\u306f\u3001emurationstation \u3092\u7d42\u4e86\u3055\u305b\u3066\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"console\">$ exit<\/p>\n\n\n\n<p>\u3000\u771f\u3063\u6697\u306a\u753b\u9762\u306b\u306a\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u3001alt+F7 \u3092\u62bc\u3059\u3068 X-window \u306b\u623b\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><span style=\"font-size: 17px\" class=\"font-size\">\u4eee\u60f3\u30b3\u30f3\u30bd\u30fc\u30eb\u306e 8 \u756a\u306b\u5207\u308a\u66ff\u3048\u3001tty8 \u3067 agetty \u3092\u52d5\u304b\u3059\u3002<\/span><\/li><li><span style=\"font-size: 17px\" class=\"font-size\">\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u3089\u3001emulationstation \u3092\u52d5\u304b\u3059\u3002emulationstation \u3092\u7d42\u4e86\u3057\u305f\u3089exit \u3057\u3066\u4eee\u60f3\u30b3\u30f3\u30bd\u30fc\u30eb\u306e 7 \u756a\u306b\u5207\u308a\u66ff\u3048\u308b\u3002<\/span><\/li><\/ol>\n\n\n\n<p>\u3000\u4e0a\u8a18\u306e\uff12\u6bb5\u968e\u306e\u624b\u9806\u3067\u884c\u3048\u3070\u826f\u3044\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u30021 \u306f shell \u30b9\u30af\u30ea\u30d7\u30c8\u3067\u5b9f\u73fe\u3057\u30012 \u306f  .bashrc \u3067\u884c\u3048\u3070\u3044\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3000\u6b21\u306e\u5185\u5bb9\u306e shell \u30b9\u30af\u30ea\u30d7\u30c8\u3092 ~\/bin\/emulationstation.sh \u3068\u3057\u3066\u4f5c\u6210\u3057\u3001\u5b9f\u884c\u6a29\u3092\u4e0e\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"console\">$ vi ~\/bin\/emulationstation.sh<\/p>\n\n\n\n<p class=\"file pre\"><code>#!\/bin\/bash\n\ntty=`tty`\nif [ \"${tty}\" == \"\/dev\/tty8\" ]; then\n    fbterm emulationstation\n    setsid bash -c \"(sleep 1; sudo chvt 7)\" &amp;\nelse\n    check=`ps ax | grep ty8 | grep getty`\n    if [ \"${check}\" == \"\" ]; then\n        sudo chvt 8 &amp;\n        sudo LANG=C setsid \/sbin\/agetty --autologin pi -8 tty8 linux\n    else\n        sudo chvt 8\n    fi\nfi<\/code><\/p>\n\n\n\n<p class=\"console\">$ chmod +x ~\/bin\/emulationstation.sh<\/p>\n\n\n\n<p>\u3000\u6b21\u306b ~\/.bashrc \u306e\u6700\u5f8c\u306b\u6b21\u306e\u5185\u5bb9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"file pre\"><code>tty=`tty`\nif [ \"${tty}\" == \"\/dev\/tty8\" ]; then\n    \/home\/pi\/bin\/emulationstation.sh\n    exit\nfi<\/code><\/p>\n\n\n\n<p>\u3000\u3053\u308c\u3067\u3001emulationstation.sh \u3092\u5b9f\u884c\u3059\u308b\u3068 emulationstation \u304c\u8d77\u52d5\u3057\u3001emulationstation \u3092\u7d42\u4e86\u3059\u308b\u3068\u3001X-window \u306b\u623b\u3063\u3066\u304f\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002fbterm \u304b\u3089 emulationstation \u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u306e\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u8a00\u8a9e\u3092 ja_JP.UTF-8 \u306b\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u6587\u5b57\u5316\u3051\u3057\u306a\u3044\u3088\u3046\u306b\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u3000setsid \u30b3\u30de\u30f3\u30c9\u306f\u3001\u521d\u3081\u3066\u77e5\u308a\u307e\u3057\u305f\u3002UNIX \u306f\u307e\u3060\u307e\u3060\u5965\u304c\u6df1\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>X-Window \u304b\u3089\u8d77\u52d5\u3057\u305f RetroPie \u306e np2kai \u3000X-Window \u304b\u3089 RetroPie\uff08\u5b9f\u969b\u306f emulationstation\uff09\u3092\u8d77\u52d5\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u3053\u306e\u72b6\u614b\u3060\u3068\u3001np2kai \u3067\u30de [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-355","post","type-post","status-publish","format-standard","hentry","category-retropie"],"_links":{"self":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=355"}],"version-history":[{"count":8,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"predecessor-version":[{"id":1060,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/355\/revisions\/1060"}],"wp:attachment":[{"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sirius10.net\/blog\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}