{"id":1091,"date":"2025-08-01T23:29:09","date_gmt":"2025-08-01T15:29:09","guid":{"rendered":"https:\/\/www.jumoon.top\/?p=1091"},"modified":"2026-01-08T22:58:36","modified_gmt":"2026-01-08T14:58:36","slug":"ubuntu-%e8%87%aa%e5%8a%a8%e5%ae%89%e8%a3%85%e6%90%9c%e7%8b%97%e8%be%93%e5%85%a5%e6%b3%95%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/www.jumoon.top\/?p=1091","title":{"rendered":"ubuntu \u81ea\u52a8\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5\u811a\u672c"},"content":{"rendered":"\n<p>\u81ea\u52a8\u4e0b\u8f7d\u5e76\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5\u7684Shell\u811a\u672c\uff0c\u5305\u542b\u4e0b\u8f7d.deb\u5305\u3001\u5b89\u88c5\u4f9d\u8d56\u3001\u914d\u7f6e\u73af\u5883\u7b49\u6b65\u9aa4<\/p>\n\n\n\n<p>\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5c06\u4e0b\u9762\u7684\u811a\u672c\u4fdd\u5b58\u4e3a\u00a0<code>install_sogou.sh<\/code><\/li>\n\n\n\n<li>\u7ed9\u811a\u672c\u6dfb\u52a0\u6267\u884c\u6743\u9650\uff1a<code>chmod +x install_sogou.sh<\/code><\/li>\n\n\n\n<li>\u4f7f\u7528sudo\u8fd0\u884c\u811a\u672c\uff1a<code>sudo .\/install_sogou.sh<\/code><\/li>\n<\/ol>\n\n\n\n<p>\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6b64\u811a\u672c\u9700\u8981\u5728Ubuntu\u7cfb\u7edf\u4e0a\u8fd0\u884c<\/li>\n\n\n\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\u9700\u8981\u91cd\u542f\u7cfb\u7edf<\/li>\n\n\n\n<li>\u811a\u672c\u4f1a\u5b89\u88c5\u5fc5\u8981\u7684\u4f9d\u8d56\u5e76\u81ea\u52a8\u914d\u7f6eFcitx\u8f93\u5165\u6cd5\u6846\u67b6<\/li>\n\n\n\n<li>\u5b89\u88c5\u540e\u53ef\u80fd\u9700\u8981\u624b\u52a8\u5728Fcitx\u914d\u7f6e\u4e2d\u6dfb\u52a0\u641c\u72d7\u8f93\u5165\u6cd5<\/li>\n<\/ul>\n\n\n\n<p>\u5982\u679c\u4e0b\u8f7d\u94fe\u63a5\u5931\u6548\uff0c\u60a8\u9700\u8981\u66f4\u65b0\u811a\u672c\u4e2d\u7684&nbsp;<code>DOWNLOAD_URL<\/code>&nbsp;\u53d8\u91cf\u4e3a\u6700\u65b0\u7684\u4e0b\u8f7d\u5730\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#!\/bin\/bash\n\n# \u641c\u72d7\u8f93\u5165\u6cd5Ubuntu\u5b89\u88c5\u811a\u672c\n# \u9002\u7528\u4e8e amd64 \u67b6\u6784\n\nDOWNLOAD_URL=\"https:\/\/ime-sec.gtimg.com\/202508020924\/b738843fdce37c5bdba65c795a3773c6\/pc\/dl\/gzindex\/1680521603\/sogoupinyin_4.2.1.145_amd64.deb\"\nDEB_FILE=\"sogoupinyin_4.2.1.145_amd64.deb\"\nINSTALL_DIR=\"\/usr\/share\/fcitx-sogoupinyin\"\nFCITX_CONFIG_FILE=\"$HOME\/.config\/fcitx\/config\"\n\n# \u68c0\u67e5\u662f\u5426\u4e3aroot\u7528\u6237\nif &#91; \"$(id -u)\" -ne 0 ]; then\n    echo \"\u8bf7\u4f7f\u7528sudo\u8fd0\u884c\u6b64\u811a\u672c\"\n    exit 1\nfi\n\n# \u66f4\u65b0\u8f6f\u4ef6\u5305\u5217\u8868\necho \"\u6b63\u5728\u66f4\u65b0\u8f6f\u4ef6\u5305\u5217\u8868...\"\napt update > \/dev\/null\n\n# \u5b89\u88c5\u4f9d\u8d56\necho \"\u6b63\u5728\u5b89\u88c5\u4f9d\u8d56...\"\napt install -y fcitx fcitx-config-gtk fcitx-frontend-all fcitx-module-cloudpinyin fcitx-module-x11 fcitx-ui-classic fcitx-ui-light libopencc2 libqtwebkit4 > \/dev\/null\n\n# \u4e0b\u8f7d\u641c\u72d7\u8f93\u5165\u6cd5\u5b89\u88c5\u5305\necho \"\u6b63\u5728\u4e0b\u8f7d\u641c\u72d7\u8f93\u5165\u6cd5...\"\nwget -O \"$DEB_FILE\" \"$DOWNLOAD_URL\" > \/dev\/null 2>&amp;1\n\nif &#91; ! -f \"$DEB_FILE\" ]; then\n    echo \"\u4e0b\u8f7d\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u7f51\u7edc\u8fde\u63a5\u6216URL\u662f\u5426\u6b63\u786e\"\n    exit 1\nfi\n\n# \u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5\necho \"\u6b63\u5728\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5...\"\ndpkg -i \"$DEB_FILE\" > \/dev\/null\n\n# \u4fee\u590d\u53ef\u80fd\u7684\u4f9d\u8d56\u95ee\u9898\napt --fix-broken install -y > \/dev\/null\n\n# \u914d\u7f6e\u73af\u5883\u53d8\u91cf\necho \"\u6b63\u5728\u914d\u7f6e\u73af\u5883\u53d8\u91cf...\"\ncat > \/etc\/profile.d\/sogoupinyin.sh &lt;&lt;EOF\nexport GTK_IM_MODULE=fcitx\nexport QT_IM_MODULE=fcitx\nexport XMODIFIERS=\"@im=fcitx\"\nEOF\n\nsource \/etc\/profile.d\/sogoupinyin.sh\n\n# \u914d\u7f6efcitx\u81ea\u52a8\u542f\u52a8\necho \"\u914d\u7f6efcitx\u81ea\u52a8\u542f\u52a8...\"\nif &#91; ! -d \"$HOME\/.config\/autostart\" ]; then\n    mkdir -p \"$HOME\/.config\/autostart\"\nfi\n\ncat > \"$HOME\/.config\/autostart\/fcitx-autostart.desktop\" &lt;&lt;EOF\n&#91;Desktop Entry]\nType=Application\nName=fcitx-autostart\nExec=fcitx-autostart\nX-GNOME-Autostart-enabled=true\nEOF\n\n# \u521b\u5efa\u914d\u7f6e\u6587\u4ef6\necho \"\u521b\u5efa\u914d\u7f6e\u6587\u4ef6...\"\nif &#91; ! -f \"$FCITX_CONFIG_FILE\" ]; then\n    mkdir -p \"$(dirname \"$FCITX_CONFIG_FILE\")\"\n    cat > \"$FCITX_CONFIG_FILE\" &lt;&lt;EOF\n&#91;Hotkey]\nTriggerKey=CTRL_SPACE\nSwitchKey=Disabled\nIMSwitchKey=Disabled\n\n&#91;Program]\nDelayStart=1\nAutoStart=True\nSkipFirstTimeStartup=False\nEOF\nfi\n\n# \u6e05\u7406\u5b89\u88c5\u5305\necho \"\u6e05\u7406\u5b89\u88c5\u5305...\"\nrm -f \"$DEB_FILE\"\n\necho \"\u5b89\u88c5\u5b8c\u6210\uff01\u8bf7\u91cd\u542f\u7cfb\u7edf\u4ee5\u4f7f\u66f4\u6539\u751f\u6548\u3002\"\necho \"\u91cd\u542f\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u6dfb\u52a0\u641c\u72d7\u8f93\u5165\u6cd5\uff1a\"\necho \"1. \u6253\u5f00Fcitx\u914d\u7f6e (fcitx-config-gtk3)\"\necho \"2. \u70b9\u51fb'+'\u6309\u94ae\u6dfb\u52a0\u8f93\u5165\u6cd5\"\necho \"3. \u53d6\u6d88\u52fe\u9009'\u53ea\u663e\u793a\u5f53\u524d\u8bed\u8a00'\"\necho \"4. \u627e\u5230\u5e76\u6dfb\u52a0\u641c\u72d7\u62fc\u97f3\u8f93\u5165\u6cd5\"\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u52a8\u4e0b\u8f7d\u5e76\u5b89\u88c5\u641c\u72d7\u8f93\u5165\u6cd5\u7684Shell\u811a\u672c\uff0c\u5305\u542b\u4e0b\u8f7d.deb\u5305\u3001\u5b89\u88c5\u4f9d\u8d56\u3001\u914d\u7f6e\u73af\u5883\u7b49\u6b65\u9aa4 \u4f7f\u7528\u65b9\u6cd5\uff1a \u6ce8\u610f\u4e8b\u9879\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-container-style":"default","site-container-layout":"default","site-sidebar-layout":"default","site-transparent-header":"default","disable-article-header":"default","disable-site-header":"default","disable-site-footer":"default","disable-content-area-spacing":"default","footnotes":""},"categories":[19],"tags":[],"class_list":["post-1091","post","type-post","status-publish","format-standard","hentry","category-19"],"_links":{"self":[{"href":"https:\/\/www.jumoon.top\/index.php?rest_route=\/wp\/v2\/posts\/1091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jumoon.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jumoon.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jumoon.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jumoon.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1091"}],"version-history":[{"count":1,"href":"https:\/\/www.jumoon.top\/index.php?rest_route=\/wp\/v2\/posts\/1091\/revisions"}],"predecessor-version":[{"id":1092,"href":"https:\/\/www.jumoon.top\/index.php?rest_route=\/wp\/v2\/posts\/1091\/revisions\/1092"}],"wp:attachment":[{"href":"https:\/\/www.jumoon.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jumoon.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jumoon.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}