﻿{"id":344,"date":"2010-11-10T09:43:37","date_gmt":"2010-11-10T01:43:37","guid":{"rendered":"http:\/\/nick.workao.org\/?p=344"},"modified":"2010-11-10T09:43:38","modified_gmt":"2010-11-10T01:43:38","slug":"virtualbox%e7%9a%84vrdp%e8%bf%90%e8%a1%8c%e6%a8%a1%e5%bc%8f","status":"publish","type":"post","link":"http:\/\/nick.txtcc.com\/index.php\/linux\/344","title":{"rendered":"VirtualBox\u7684VRDP\u8fd0\u884c\u6a21\u5f0f"},"content":{"rendered":"<p>\u5176\u5b9e\u6ca1\u4ec0\u4e48\u6df1\u5965\u7684\uff0c\u6240\u8c13VRDP\u8fd0\u884c\u6a21\u5f0f\uff0c\u5c31\u662f\u865a\u62df\u673a\u8fd0\u884c\u7684\u65f6\u5019\uff0c\u6ca1\u6709\u56fe\u5f62\u7a97\u53e3\uff0c\u4f46\u53ef\u4ee5\u7528VirtualBox\u7684RDP\u6a21\u5f0f\u8fdc\u7a0b\u7ba1\u7406\uff0c\u8bf4\u662f\u8fdc\u7a0b\u5176\u5b9e \u5728\u672c\u673a\u4e0a\u7528\u5f88\u65b9\u4fbf\uff0c\u7528\u8d77\u6765\u548cwindows\u4e0b\u7684\u8fdc\u7a0b\u684c\u9762\u4e00\u6837\u3002\u5982\u679c\u865a\u62df\u673a\u4e0a\u5b89\u88c5\u4e86vncserver\u4e4b\u7c7b\u7684\u8fdc\u7a0b\u63a7\u5236\u8f6f\u4ef6\uff0c\u5e76\u4e14\u4ece\u4e3b\u673a\u4e0a\u80fd\u591f\u901a\u8fc7tcp\u8bbf \u95ee\uff0c\u4e5f\u4e00\u6837\u53ef\u4ee5\u7ba1\u7406\u7684\u3002<\/p>\n<p>\u6211\u4f7f\u7528\u7684\u662f\u975e\u5f00\u6e90\u7684VirtualBox\uff0c\u5f00\u6e90\u7248\u672c\u5c11\u4e00\u4e9b\u529f\u80fd\u3002\u4ee5\u4e0b\u64cd\u4f5c\u5728windows\u4e0b\u4e5f\u662f\u53ef\u4ee5\u53c2\u7167\u4f7f\u7528\u7684\u3002<\/p>\n<p>\u542f\u52a8VM\u7684\u547d\u4ee4\uff1a<code>\/usr\/bin\/VBoxManage startvm WinXP -type vrdp<\/code>\uff0c\u9ed8\u8ba4\u662f<code>-type gui<\/code>\u5373\u4ee5\u56fe\u5f62\u754c\u9762\u542f\u52a8\u865a\u62df\u673a\u3002<\/p>\n<p>\u63a7\u5236VM\u6bd4\u5982\u4fdd\u5b58\u72b6\u6001\u5173\u95ed\u7684\u547d\u4ee4\uff1a<code>\/usr\/bin\/VBoxManage controlvm WinXP savestate<\/code>\u3002<\/p>\n<p>\u4ee5\u4e0a\u547d\u4ee4\u4e2d<code>WinXP<\/code>\u662f\u865a\u62df\u673a\u7684\u540d\u79f0\uff0c\u4e5f\u53ef\u4ee5\u7528uuid\u66ff\u4ee3\u3002<\/p>\n<p>\u5f00\u542fVRDP\u540e\u8fdc\u7a0b\u63a7\u5236\u7aef\u53e3\u9ed8\u8ba4\u662f3389\uff0c\u9ed8\u8ba4\u8ba4\u8bc1\u65b9\u5f0f\u662f<code>null<\/code>\uff0c\u5373\u65e0\u8ba4\u8bc1\uff0c\u4efb\u4f55\u4eba\u90fd\u53ef\u4ee5\u8fde\u63a5\u4e0a\u968f\u610f\u63a7\u5236\uff0c\u653e\u5728\u7f51\u7edc\u73af\u5883\u4e0b\u662f\u5f88\u4e0d\u5b89\u5168\u7684\u3002\u8fd8\u6709\u4e00\u79cd\u8ba4\u8bc1\u65b9\u5f0f\u662f<code>external<\/code>\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e3b\u673a\u4e0a\u7684\u7528\u6237\u673a\u5236\u6765\u8ba4\u8bc1\uff0c\u4e0d\u8fc7\u4f7f\u7528\u4e4b\u524d\u8981\u7a0d\u5fae\u4f5c\u4e00\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n<pre><code>cd \/lib\nsudo ln -s libpam.so.0 libpam.so\n<\/code><\/pre>\n<p>\u4e0d\u7136\u8ba4\u8bc1\u65e0\u6cd5\u8fdb\u884c\uff0c\u8fde\u63a5\u95ea\u4e00\u4e0b\u5c31\u5173\u95ed\u4e86\u3002\u8fdc\u7a0b\u684c\u9762\u7684\u5ba2\u6237\u7aef\u5728gnome\u4e2d\u53ef\u4ee5\u7528<code>Terminal Server Client(tsclient)<\/code>\u6216\u8005<code>rdesktop-vrdp -u fwolf -p - localhost<\/code>\u3002<\/p>\n<p>\u8981\u60f3\u968f\u91cd\u542f\u6216\u8005\u5173\u673a\u81ea\u52a8\u5173\u95ed\u865a\u62df\u673a\uff0c\u8981\u7a0d\u5fae\u9ebb\u70e6\u4e00\u4e9b\u4e86\uff0c\u9996\u5148\u5728<code>\/etc\/init.d\/<\/code>\u4e0b\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6<code>fwolfrc<\/code>\uff1a<\/p>\n<pre><code>#! \/bin\/sh \n# Using LSB funtions:\n. \/lib\/lsb\/init-functions\nset -e\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin\nDESC=&quot;Fwolf's Init&quot;\nNAME=fwolfrc\nSCRIPTNAME=\/etc\/init.d\/$NAME\n\n# Function that starts the daemon\/service.\nd_start() {\n    touch \/var\/lock\/subsys\/$NAME\n    log_daemon_msg &quot;Starting $DESC&quot; &quot;$NAME&quot;\n}\n\n# Function that stops the daemon\/service.\nd_stop() {\n    su -c &quot;\/usr\/bin\/VBoxManage controlvm WinXP savestate&quot; fwolf\n    rm \/var\/lock\/subsys\/$NAME\n}\n\n# Function that sends a SIGHUP to the daemon\/service.\ncase &quot;$1&quot; in\n  start)\n        d_start\n    ;;\n  stop)\n        d_stop\n    ;;\n  *)\n    log_warning_msg &quot;Usage: $SCRIPTNAME {start|stop}&quot; &gt;&amp;2\n    exit 3\n    ;;\nesac\n\nexit 0\n<\/code><\/pre>\n<p>\u6211\u4e5f\u662f\u76f4\u63a5\u4ece<code>\/etc\/init.d\/<\/code>\u91cc\u5957\u8fc7\u6765\u4fee\u6539\u7684\uff0c\u8be6\u7ec6\u4fe1\u606f\u53ef\u4ee5\u770b\u53c2\u8003\u6587\u7ae0\u6216\u8005\u5176\u5b83\u5173\u4e8e\u5173\u673a\u81ea\u52a8\u6267\u884c\u811a\u672c\u7684\u8d44\u6599\u3002\u7136\u540e\u628a\u8fd9\u4e2a\u6587\u4ef6ln\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\uff1a<\/p>\n<ul>\n    <li>\/etc\/rc0.d\/K01fwolfrc<\/li>\n    <li>\/etc\/rc6.d\/K01fwolfrc<\/li>\n    <li>\/etc\/rc3.d\/S99fwolfrc<\/li>\n    <li>\/etc\/rc5.d\/S99fwolfrc<\/li>\n<\/ul>\n<p>\u53ef\u4ee5\u770b\u5230\u5f00\u673a\u65f6\u662f\u6700\u540e\u6267\u884c\uff0c\u800c\u5173\u673a\u65f6\u662f\u6700\u5148\u6267\u884c\u3002\u6ce8\u610f\u6211\u4e0a\u9762\u7684\u811a\u672c\u91cc\uff0c\u5728\u5f00\u673a\u662f\u5e76\u6ca1\u6709\u81ea\u52a8\u542f\u52a8\u865a\u62df\u673a\uff0c\u4e60\u60ef\u624b\u5de5\u5f00\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u5176\u5b9e\u6ca1\u4ec0\u4e48\u6df1\u5965\u7684\uff0c\u6240\u8c13VRDP\u8fd0\u884c\u6a21\u5f0f\uff0c\u5c31\u662f\u865a\u62df\u673a\u8fd0\u884c\u7684\u65f6\u5019\uff0c\u6ca1\u6709\u56fe\u5f62\u7a97\u53e3\uff0c\u4f46\u53ef\u4ee5\u7528VirtualBox\u7684RDP\u6a21\u5f0f\u8fdc\u7a0b\u7ba1\u7406\uff0c\u8bf4\u662f\u8fdc\u7a0b\u5176\u5b9e \u5728\u672c\u673a\u4e0a\u7528\u5f88\u65b9\u4fbf\uff0c\u7528\u8d77\u6765\u548cwindows\u4e0b\u7684\u8fdc\u7a0b\u684c\u9762\u4e00\u6837\u3002\u5982&#46;&#46;&#46;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[215,223],"class_list":["post-344","post","type-post","status-publish","format-standard","hentry","category-linux","tag-virtualbox","tag-vrdp"],"_links":{"self":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/comments?post=344"}],"version-history":[{"count":2,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"predecessor-version":[{"id":346,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions\/346"}],"wp:attachment":[{"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/nick.txtcc.com\/index.php\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}