{"id":218553,"date":"2021-05-26T10:20:46","date_gmt":"2021-05-26T02:20:46","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=218553"},"modified":"2021-05-16T15:21:31","modified_gmt":"2021-05-16T07:21:31","slug":"gnu-screen-jq","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/gnu-screen-jq.html","title":{"rendered":"\u4ecb\u7ecd\u4f7f\u7528 GNU Screen \u7684\u5c0f\u6280\u5de7"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5b66\u4e60\u57fa\u672c\u7684 GNU Screen \u7ec8\u7aef\u590d\u7528\u6280\u672f\uff0c\u7136\u540e\u4e0b\u8f7d\u6211\u4eec\u7684\u7ec8\u7aef\u547d\u4ee4\u5907\u5fd8\u5f55\uff0c\u4ee5\u4fbf\u4f60\u80fd\u591f\u719f\u6089\u5e38\u7528\u7684\u5feb\u6377\u65b9\u5f0f\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/a><\/p>\n

\"\"<\/a>
\n\u5b66\u4e60\u57fa\u672c\u7684 GNU Screen \u7ec8\u7aef\u590d\u7528\u6280\u672f\uff0c\u7136\u540e\u4e0b\u8f7d\u6211\u4eec\u7684\u7ec8\u7aef\u547d\u4ee4\u5907\u5fd8\u5f55\uff0c\u4ee5\u4fbf\u4f60\u80fd\u591f\u719f\u6089\u5e38\u7528\u7684\u5feb\u6377\u65b9\u5f0f\u3002<\/p>\n

\u5bf9\u4e8e\u4e00\u822c\u7528\u6237\u800c\u8a00\uff0c\u547d\u4ee4\u884c\u7ec8\u7aef\u7a97\u53e3\u53ef\u80fd\u662f\u4ee4\u4eba\u56f0\u60d1\u548c\u795e\u79d8\u7684\u3002\u4f46\u968f\u7740\u4f60\u5bf9 Linux \u7ec8\u7aef\u7684\u8fdb\u4e00\u6b65\u4e86\u89e3\uff0c\u4f60\u5f88\u5feb\u5c31\u4f1a\u610f\u8bc6\u5230\u5b83\u7684\u9ad8\u6548\u548c\u5f3a\u5927\u3002\u4e0d\u8fc7\uff0c\u4e5f\u4e0d\u9700\u8981\u5f88\u957f\u65f6\u95f4\uff0c\u4f60\u5c31\u4f1a\u60f3\u8ba9\u7ec8\u7aef\u53d8\u5f97\u66f4\u52a0\u9ad8\u6548\uff0c\u9664\u4e86\u5c06\u66f4\u591a\u7684\u7ec8\u7aef\u653e\u5230\u4f60\u7684\u7ec8\u7aef\uff0c\u8fd8\u6709\u4ec0\u4e48\u9ad8\u597d\u7684\u65b9\u6cd5\u80fd\u591f\u63d0\u5347\u4f60\u7684\u7ec8\u7aef\u6548\u7387\u5462\uff1f<\/p>\n

\u7ec8\u7aef\u590d\u7528<\/strong><\/span><\/div>\n

\u7ec8\u7aef\u7684\u8bb8\u591a\u4f18\u70b9\u4e4b\u4e00\u662f\u5b83\u662f\u4e00\u4e2a\u96c6\u4e2d\u63a7\u5236\u7684\u754c\u9762\u3002\u5b83\u662f\u4e00\u4e2a\u80fd\u8ba9\u4f60\u8bbf\u95ee\u6570\u767e\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u7a97\u53e3\uff0c\u800c\u4f60\u4e0e\u6bcf\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u8fdb\u884c\u4ea4\u4e92\u6240\u9700\u8981\u7684\u53ea\u662f\u4e00\u4e2a\u952e\u76d8\u3002\u4f46\u662f\uff0c\u73b0\u4ee3\u8ba1\u7b97\u673a\u51e0\u4e4e\u603b\u662f\u6709\u591a\u4f59\u7684\u5904\u7406\u80fd\u529b\uff0c\u800c\u4e14\u73b0\u4ee3\u8ba1\u7b97\u673a\u4e13\u5bb6\u559c\u6b22\u591a\u4efb\u52a1\u5904\u7406\uff0c\u5bfc\u81f4\u4e00\u4e2a\u7a97\u53e3\u5904\u7406\u6570\u767e\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u80fd\u529b\u662f\u76f8\u5f53\u6709\u9650\u7684\u3002<\/p>\n

\u89e3\u51b3\u8fd9\u4e00\u95ee\u9898\u7684\u5e38\u89c1\u7b54\u6848\u662f\u7ec8\u7aef\u590d\u7528\uff1a\u5373\u5c06\u865a\u62df\u7ec8\u7aef\u53e0\u653e\u5728\u4e00\u8d77\uff0c\u7136\u540e\u5728\u5b83\u4eec\u4e4b\u95f4\u79fb\u52a8\u7684\u80fd\u529b\u3002\u901a\u8fc7\u7ec8\u7aef\u590d\u7528\u5668\uff0c\u4f60\u4fdd\u6301\u4e86\u96c6\u4e2d\u63a7\u5236\uff0c\u4f46\u662f\u5f53\u4f60\u8fdb\u884c\u591a\u4efb\u52a1\u65f6\uff0c\u4f60\u80fd\u591f\u8fdb\u884c\u7ec8\u7aef\u5207\u6362\u3002\u66f4\u597d\u7684\u662f\uff0c\u4f60\u80fd\u591f\u5728\u7ec8\u7aef\u4e2d\u62c6\u5206\u5c4f\u5e55\uff0c\u4f7f\u5f97\u5728\u540c\u4e00\u65f6\u95f4\u663e\u793a\u591a\u4e2a\u5c4f\u5e55\u7a97\u53e3\u3002<\/p>\n

\u9009\u62e9\u5408\u9002\u7684\u590d\u7528\u5668<\/strong><\/span><\/div>\n

\u4e00\u4e9b\u7ec8\u7aef\u63d0\u4f9b\u7c7b\u4f3c\u7684\u529f\u80fd\uff0c\u6709\u6807\u7b7e\u5f0f\u754c\u9762\u548c\u5206\u5272\u5f0f\u89c6\u56fe\uff0c\u4f46\u4e5f\u6709\u7ec6\u5fae\u7684\u5dee\u522b\u3002\u9996\u5148\uff0c\u8fd9\u4e9b\u7ec8\u7aef\u7684\u529f\u80fd\u4f9d\u8d56\u4e8e\u56fe\u5f62\u5316\u7684\u684c\u9762\u73af\u5883\u3002\u5176\u6b21\uff0c\u8bb8\u591a\u56fe\u5f62\u5316\u7684\u7ec8\u7aef\u529f\u80fd\u9700\u8981\u9f20\u6807\u4ea4\u4e92\u6216\u4f7f\u7528\u4e0d\u65b9\u4fbf\u7684\u952e\u76d8\u5feb\u6377\u952e\u3002\u7ec8\u7aef\u590d\u7528\u5668\u7684\u529f\u80fd\u5728\u6587\u672c\u63a7\u5236\u53f0\u4e0a\u548c\u5728\u56fe\u5f62\u684c\u9762\u4e0a\u4e00\u6837\u597d\u7528\uff0c\u800c\u4e14\u952e\u4f4d\u7ed1\u5b9a\u662f\u9488\u5bf9\u5e38\u89c1\u7684\u7ec8\u7aef\u5e8f\u5217\u8bbe\u8ba1\u7684\uff0c\u5f88\u65b9\u4fbf\u3002<\/p>\n

\u73b0\u6709\u4e24\u79cd\u6d41\u884c\u7684\u590d\u7528\u5668\uff1atmux?\u548c?GNU Screen\u3002\u5c3d\u7ba1\u4f60\u4e0e\u5b83\u4eec\u4e92\u52a8\u7684\u65b9\u5f0f\u7565\u6709\u4e0d\u540c\uff0c\u4f46\u5b83\u4eec\u505a\u540c\u6837\u7684\u4e8b\u60c5\uff0c\u800c\u4e14\u5927\u591a\u5177\u6709\u76f8\u540c\u7684\u529f\u80fd\u3002\u8fd9\u7bc7\u6587\u7ae0\u662f GNU Screen \u7684\u5165\u95e8\u6307\u5357\u3002\u5173\u4e8e tmux \u7684\u76f8\u5173\u4ecb\u7ecd\uff0c\u8bf7\u9605\u8bfb Kevin Sonney \u7684tmux \u4ecb\u7ecd\u3002<\/p>\n

\u4f7f\u7528 GNU Screen<\/strong><\/span><\/div>\n

GNU Screen \u7684\u57fa\u672c\u7528\u6cd5\u5f88\u7b80\u5355\uff0c\u901a\u8fc7?screen?\u547d\u4ee4\u542f\u52a8\uff0c\u4f60\u5c06\u8fdb\u5165 Screen \u4f1a\u8bdd\u7684\u7b2c 0 \u4e2a\u7a97\u53e3\u3002\u5728\u4f60\u51b3\u5b9a\u9700\u8981\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\u63d0\u793a\u7b26\u524d\uff0c\u4f60\u53ef\u80fd\u5f88\u96be\u6ce8\u610f\u5230\u6709\u4ec0\u4e48\u53d8\u5316\u3002<\/p>\n

\u5f53\u4e00\u4e2a\u7ec8\u7aef\u7a97\u53e3\u88ab\u67d0\u9879\u6d3b\u52a8\u5360\u7528\uff08\u6bd4\u5982\uff0c\u4f60\u542f\u52a8\u4e86\u6587\u672c\u7f16\u8f91\u5668 Vim<\/span> \u6216 Jove <\/span>\u6216\u8005\u4f60\u5728\u5904\u7406\u97f3\u89c6\u9891\uff0c\u6216\u8fd0\u884c\u6279\u5904\u7406\u4efb\u52a1\uff09\uff0c\u4f60\u53ef\u4ee5\u65b0\u5efa\u4e00\u4e2a\u7a97\u53e3\u3002\u8981\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u7a97\u53e3\uff0c\u6309 Ctrl+A<\/span>\uff0c\u91ca\u653e\uff0c\u7136\u540e\u6309 c<\/span>\u3002\u8fd9\u5c06\u5728\u4f60\u73b0\u6709\u7a97\u53e3\u7684\u57fa\u7840\u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7a97\u53e3\u3002<\/p>\n

\u4f60\u4f1a\u77e5\u9053\u5f53\u524d\u4f60\u662f\u5728\u4e00\u4e2a\u65b0\u7684\u7a97\u53e3\u4e2d\uff0c\u56e0\u4e3a\u4f60\u7684\u7ec8\u7aef\u9664\u4e86\u9ed8\u8ba4\u7684\u63d0\u793a\u7b26\u5916\uff0c\u4f3c\u4e4e\u6ca1\u6709\u4efb\u4f55\u4e1c\u897f\u3002\u5f53\u7136\uff0c\u4f60\u7684\u53e6\u4e00\u4e2a\u7ec8\u7aef\u4ecd\u7136\u5b58\u5728\uff0c\u5b83\u53ea\u662f\u8eb2\u5728\u65b0\u7a97\u53e3\u7684\u540e\u9762\u3002\u8981\u904d\u5386\u6253\u5f00\u7684\u7a97\u53e3\uff0c\u6309 Ctrl+A<\/span>\uff0c\u91ca\u653e\uff0c\u7136\u540e\u6309 n\uff08\u8868\u793a\u4e0b\u4e00\u4e2a\uff09\u6216\u6309 p\uff08\u8868\u793a\u4e0a\u4e00\u4e2a\uff09\u3002\u5728\u53ea\u6253\u5f00\u4e24\u4e2a\u7a97\u53e3\u7684\u60c5\u51b5\u4e0b\uff0c n \u548c p \u7684\u529f\u80fd\u662f\u4e00\u6837\u7684\uff0c\u4f46\u4f60\u53ef\u4ee5\u968f\u65f6\u6253\u5f00\u66f4\u591a\u7684\u7a97\u53e3\uff08Ctrl+A\uff0c\u7136\u540e c \uff09\uff0c\u5e76\u5728\u5b83\u4eec\u4e4b\u95f4\u5207\u6362\u3002<\/p>\n

\u5206\u5c4f<\/strong><\/span><\/div>\n

GNU Screen \u7684\u9ed8\u8ba4\u884c\u4e3a\u66f4\u50cf\u79fb\u52a8\u8bbe\u5907\u7684\u5c4f\u5e55\uff0c\u800c\u4e0d\u662f\u684c\u9762\uff1a\u4f60\u4e00\u6b21\u53ea\u80fd\u770b\u5230\u4e00\u4e2a\u7a97\u53e3\u3002\u5982\u679c\u4f60\u56e0\u4e3a\u559c\u6b22\u591a\u4efb\u52a1\u800c\u4f7f\u7528 GNU Screen \uff0c\u90a3\u4e48\u53ea\u5173\u6ce8\u4e00\u4e2a\u7a97\u53e3\u53ef\u80fd\u770b\u8d77\u6765\u662f\u4e00\u79cd\u9000\u6b65\u3002\u5e78\u8fd0\u7684\u662f\uff0cGNU Screen \u53ef\u4ee5\u8ba9\u4f60\u628a\u7ec8\u7aef\u5206\u6210\u7a97\u53e3\u4e2d\u7684\u7a97\u53e3\u3002<\/p>\n

\u8981\u521b\u5efa\u4e00\u4e2a\u6c34\u5e73\u5206\u5272\u7a97\u53e3\uff0c\u6309 Ctrl+A\uff0c\u7136\u540e\u6309 s \u3002\u8fd9\u5c06\u628a\u4e00\u4e2a\u7a97\u53e3\u7f6e\u4e8e\u53e6\u4e00\u4e2a\u7a97\u53e3\u4e4b\u4e0a\uff0c\u5c31\u50cf\u7a97\u683c\u4e00\u6837\u3002\u7136\u800c\uff0c\u5728\u4f60\u544a\u8bc9\u5b83\u8981\u663e\u793a\u4ec0\u4e48\u4e4b\u524d\uff0c\u5206\u5272\u7684\u7a7a\u95f4\u662f\u6ca1\u6709\u7528\u9014\u7684\u3002\u56e0\u6b64\uff0c\u5728\u521b\u5efa\u4e00\u4e2a\u5206\u5272\u7a97\u540e\uff0c\u4f60\u53ef\u4ee5\u7528 Ctrl+A<\/span> \uff0c\u7136\u540e\u7528 Tab \u79fb\u52a8\u5230\u5206\u5272\u7a97\u4e2d\u3002\u4e00\u65e6\u8fdb\u5165\uff0c\u4f7f\u7528 Ctrl+A<\/span> \u7136\u540e n \u6d4f\u89c8\u6240\u6709\u53ef\u7528\u7684\u7a97\u53e3\uff0c\u76f4\u5230\u4f60\u60f3\u663e\u793a\u7684\u5185\u5bb9\u51fa\u73b0\u5728\u5206\u5272\u7a97\u683c\u4e2d\u3002<\/p>\n

\u4f60\u4e5f\u53ef\u4ee5\u6309 Ctrl+A \u7136\u540e\u6309 | \uff08\u8fd9\u662f\u4e00\u4e2a\u7ba1\u9053\u5b57\u7b26\uff0c\u5728\u5927\u591a\u6570\u952e\u76d8\u4e0a\u901a\u8fc7\u6309\u4e0b shift \u952e\u52a0\u4e0a \\\uff09\u521b\u5efa\u5782\u76f4\u5206\u5272\u7a97\u53e3\u3002<\/p>\n

\u81ea\u5b9a\u4e49 GNU Screen<\/strong><\/span><\/div>\n

GNU Screen \u4f7f\u7528\u57fa\u4e8e Ctrl+A \u7684\u5feb\u6377\u952e\u3002\u6839\u636e\u4f60\u7684\u4e60\u60ef\uff0c\u8fd9\u53ef\u80fd\u4f1a\u8ba9\u4f60\u611f\u89c9\u975e\u5e38\u81ea\u7136\uff0c\u4e5f\u53ef\u80fd\u975e\u5e38\u4e0d\u65b9\u4fbf\uff0c\u56e0\u4e3a\u4f60\u53ef\u80fd\u4f1a\u7528 Ctrl+A \u6765\u79fb\u52a8\u5230\u4e00\u884c\u7684\u5f00\u5934\u3002\u65e0\u8bba\u600e\u6837\uff0cGNU Screen \u5141\u8bb8\u901a\u8fc7 .screenrc<\/span> \u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u5404\u79cd\u5b9a\u5236\u3002\u4f60\u53ef\u4ee5\u7528\u8fd9\u4e2a\u6765\u6539\u53d8\u89e6\u53d1\u952e\u7684\u7ed1\u5b9a\uff08\u79f0\u4e3a \u201c\u8f6c\u4e49\u201d \u952e\u7ed1\u5b9a\uff09\u3002<\/p>\n

escape ^jJ\r\n<\/pre>\n

\u4f60\u8fd8\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u72b6\u6001\u884c\uff0c\u4ee5\u5e2e\u52a9\u4f60\u5728 Screen \u4f1a\u8bdd\u4e2d\u4fdd\u6301\u81ea\u5df1\u4e0d\u8ff7\u5931\u3002<\/p>\n

# status bar, with current window highlighted\r\nhardstatus alwayslastline\r\nhardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m\/%d %{W}%C%A%{g}]'\r\n\r\n# enable 256 colors\r\nattrcolor b \".I\"\r\ntermcapinfo xterm 'Co#256:AB=\\E[48;5;%dm:AF=\\E[38;5;%dm'\r\ndefbce on\r\n<\/pre>\n

\u5728\u6709\u591a\u4e2a\u7a97\u53e3\u6253\u5f00\u7684\u4f1a\u8bdd\u4e2d\uff0c\u6709\u4e00\u4e2a\u65f6\u523b\u63d0\u9192\u54ea\u4e9b\u7a97\u53e3\u5177\u6709\u7126\u70b9\u6d3b\u52a8\uff0c\u54ea\u4e9b\u7a97\u53e3\u6709\u540e\u53f0\u6d3b\u52a8\u7684\u63d0\u9192\u5668\u7279\u522b\u6709\u7528\u3002\u5b83\u7c7b\u4f3c\u4e00\u79cd\u7ec8\u7aef\u7684\u4efb\u52a1\u7ba1\u7406\u5668\u3002<\/p>\n

\u4e0b\u8f7d\u5907\u5fd8\u5355<\/strong><\/span><\/div>\n

\u5f53\u4f60\u5b66\u4e60 GNU Screen \u7684\u4f7f\u7528\u65b9\u6cd5\u65f6\uff0c\u9700\u8981\u8bb0\u4f4f\u5f88\u591a\u65b0\u7684\u952e\u76d8\u547d\u4ee4\u3002\u6709\u4e9b\u547d\u4ee4\u4f60\u9a6c\u4e0a\u5c31\u80fd\u8bb0\u4f4f\uff0c\u4f46\u90a3\u4e9b\u4f60\u4e0d\u5e38\u4f7f\u7528\u7684\u547d\u4ee4\u53ef\u80fd\u5c31\u5f88\u96be\u8bb0\u4f4f\u4e86\u3002\u4f60\u53ef\u4ee5\u6309 Ctrl+A \u7136\u540e\u518d\u6309 ? \u6765\u8bbf\u95ee GNU Screen \u7684\u5e2e\u52a9\u754c\u9762\uff0c\u4f46\u5982\u679c\u4f60\u66f4\u559c\u6b22\u4e00\u4e9b\u53ef\u4ee5\u6253\u5370\u51fa\u6765\u5e76\u653e\u5728\u952e\u76d8\u8fb9\u7684\u4e1c\u897f\uff0c\u8bf7?\u4e0b\u8f7d\u6211\u4eec\u7684 GNU Screen \u5907\u5fd8\u5355\u3002<\/p>\n

\u5b66\u4e60 GNU Screen \u662f\u63d0\u9ad8\u4f60\u4f7f\u7528\u4f60\u6700\u559c\u6b22\u7684?\u7ec8\u7aef\u6a21\u62df\u5668?\u7684\u6548\u7387\u548c\u654f\u6377\u6027\u7684\u4e00\u4e2a\u597d\u65b9\u6cd5\u3002\u8bf7\u8bd5\u4e00\u8bd5\u5427\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5b66\u4e60\u57fa\u672c\u7684 GNU Screen \u7ec8\u7aef\u590d\u7528\u6280\u672f\uff0c\u7136\u540e\u4e0b\u8f7d\u6211\u4eec\u7684\u7ec8\u7aef\u547d\u4ee4\u5907\u5fd8\u5f55\uff0c\u4ee5\u4fbf\u4f60\u80fd\u591f\u719f\u6089\u5e38\u7528\u7684\u5feb\u6377\u65b9\u5f0f\u3002 […]<\/p>\n","protected":false},"author":643,"featured_media":218569,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-218553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/218553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/643"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=218553"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/218553\/revisions"}],"predecessor-version":[{"id":218570,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/218553\/revisions\/218570"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/218569"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=218553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=218553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=218553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}