[{"data":1,"prerenderedAt":3982},["ShallowReactive",2],{"wiki-page-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi":3,"wiki-doc-items-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi":3912,"language-switcher-data-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi":3966,"wiki-i18n-paths-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi":3981},{"id":4,"title":5,"body":6,"canonicalPath":3893,"chapter":3894,"chapterSort":3895,"date":3896,"description":12,"docI18nKey":3897,"docKey":3898,"docRoot":3899,"docTitle":3900,"extension":3901,"i18nKey":3902,"isBlogPost":3903,"isWikiDoc":35,"isWikiIndex":3903,"layout":3904,"legacyPath":3904,"locale":3905,"localeSlug":3906,"meta":3907,"navigation":35,"path":3893,"seo":3908,"sourcePath":3909,"sourceStem":3902,"stem":3910,"wikiDepth":32,"__hash__":3911},"content/_i18n/en-us/wiki/2024-03-30-Linux教程/ch6-其他可选配置.md","Other optional configurations",{"type":7,"value":8,"toc":3877},"minimark",[9,13,18,89,92,96,99,110,125,128,161,164,173,187,190,222,227,244,251,254,272,285,288,300,303,315,321,325,328,331,336,339,343,346,351,356,359,363,366,373,384,478,485,488,503,508,513,764,774,777,789,793,801,806,839,873,876,880,885,895,898,901,908,934,939,944,947,980,990,994,1015,1018,1031,1036,1053,1058,1061,1065,1072,1075,1078,1130,1133,1151,1153,1166,1186,1191,1195,1198,1204,1209,1252,1255,1260,1264,1269,1272,1279,1282,1287,1321,1436,1443,1448,1451,1458,1467,1473,1480,1485,1488,1493,1498,1500,1504,1508,1511,1544,1548,1563,1567,1570,1606,1609,1653,1658,1661,1688,1693,1696,1701,1713,1716,1720,1723,1729,1737,1740,1798,1801,1806,1811,1814,1818,1825,1828,1831,1835,1838,1841,1844,1870,1873,1876,2022,2025,2062,2065,2075,2079,2082,2087,2112,2135,2138,2141,2146,2149,2230,2235,2238,2258,2263,2266,2270,2274,2277,2283,2286,2362,2365,2370,2373,2378,2383,2403,2406,2409,2412,2418,2423,2428,2431,2436,2441,2444,2457,2460,2465,2470,2478,2481,2494,2500,2507,2512,2519,2526,2540,2545,2557,2562,2565,2570,2574,2577,2589,2592,2926,2937,2941,2944,2947,2951,2957,2962,3066,3071,3076,3079,3140,3145,3149,3152,3196,3199,3202,3236,3239,3242,3260,3263,3279,3282,3298,3302,3308,3311,3316,3321,3337,3342,3346,3349,3354,3368,3371,3376,3381,3385,3388,3391,3397,3402,3405,3410,3415,3426,3429,3453,3460,3495,3498,3594,3597,3602,3605,3610,3615,3626,3705,3710,3713,3730,3734,3737,3826,3831,3835,3838,3845,3848,3853,3858,3861,3868,3873],[10,11,12],"p",{},"Based on your own needs, select the corresponding functions to configure.",[14,15,17],"h3",{"id":16},"switch-between-kdes-wayland-and-x11","Switch between KDE's Wayland and X11",[19,20,25],"pre",{"className":21,"code":22,"language":23,"meta":24,"style":24},"language-bash shiki shiki-themes github-light github-dark","\n# Ubuntu\nsudo apt install plasma-workspace-x11 plasma-workspace-wayland\n\n# Fedora，Rocky\nsudo dnf install plasma-workspace-x11 plasma-workspace-wayland\n","bash","",[26,27,28,37,44,64,69,75],"code",{"__ignoreMap":24},[29,30,33],"span",{"class":31,"line":32},"line",1,[29,34,36],{"emptyLinePlaceholder":35},true,"\n",[29,38,40],{"class":31,"line":39},2,[29,41,43],{"class":42},"sJ8bj","# Ubuntu\n",[29,45,47,51,55,58,61],{"class":31,"line":46},3,[29,48,50],{"class":49},"sScJk","sudo",[29,52,54],{"class":53},"sZZnC"," apt",[29,56,57],{"class":53}," install",[29,59,60],{"class":53}," plasma-workspace-x11",[29,62,63],{"class":53}," plasma-workspace-wayland\n",[29,65,67],{"class":31,"line":66},4,[29,68,36],{"emptyLinePlaceholder":35},[29,70,72],{"class":31,"line":71},5,[29,73,74],{"class":42},"# Fedora，Rocky\n",[29,76,78,80,83,85,87],{"class":31,"line":77},6,[29,79,50],{"class":49},[29,81,82],{"class":53}," dnf",[29,84,57],{"class":53},[29,86,60],{"class":53},[29,88,63],{"class":53},[10,90,91],{},"Then restart. At the bottom left of the KDE login screen, you can choose between X11 and Wayland!",[14,93,95],{"id":94},"modify-dns","Modify DNS",[10,97,98],{},"Using NetworkManager (most recommended, suitable for most modern distributions) This is the most flexible method. NetworkManager is the default network management tool for most mainstream distributions such as Ubuntu, Fedora, and CentOS.",[100,101,102],"ol",{},[103,104,105,106,109],"li",{},"Modify the global configuration file (applies to all connections): create or edit the ",[26,107,108],{},"/etc/NetworkManager/conf.d/dns.conf"," file:",[19,111,113],{"className":21,"code":112,"language":23,"meta":24,"style":24},"sudo nano /etc/NetworkManager/conf.d/dns.conf\n",[26,114,115],{"__ignoreMap":24},[29,116,117,119,122],{"class":31,"line":32},[29,118,50],{"class":49},[29,120,121],{"class":53}," nano",[29,123,124],{"class":53}," /etc/NetworkManager/conf.d/dns.conf\n",[10,126,127],{},"Add the following content:",[19,129,131],{"className":21,"code":130,"language":23,"meta":24,"style":24},"[main]dns=none\nsystemd-resolved=falserc-manager=unmanaged\n",[26,132,133,146],{"__ignoreMap":24},[29,134,135,139,143],{"class":31,"line":32},[29,136,138],{"class":137},"sVt8B","[main]dns",[29,140,142],{"class":141},"szBVR","=",[29,144,145],{"class":53},"none\n",[29,147,148,151,153,156,158],{"class":31,"line":39},[29,149,150],{"class":137},"systemd-resolved",[29,152,142],{"class":141},[29,154,155],{"class":137},"falserc-manager",[29,157,142],{"class":141},[29,159,160],{"class":53},"unmanaged\n",[10,162,163],{},"This tells NetworkManager not to manage DNS settings.",[100,165,166],{"start":39},[103,167,168,169,172],{},"Create a static resolv.conf file: edit the ",[26,170,171],{},"/etc/resolv.conf"," file (create it if it doesn't exist):",[19,174,176],{"className":21,"code":175,"language":23,"meta":24,"style":24},"sudo nano /etc/resolv.conf\n",[26,177,178],{"__ignoreMap":24},[29,179,180,182,184],{"class":31,"line":32},[29,181,50],{"class":49},[29,183,121],{"class":53},[29,185,186],{"class":53}," /etc/resolv.conf\n",[10,188,189],{},"Add the DNS server you want, for example:",[19,191,193],{"className":21,"code":192,"language":23,"meta":24,"style":24},"nameserver 223.5.5.5\nnameserver 119.29.29.29\noptions timeout:1 attempts:2\n",[26,194,195,204,211],{"__ignoreMap":24},[29,196,197,200],{"class":31,"line":32},[29,198,199],{"class":49},"nameserver",[29,201,203],{"class":202},"sj4cs"," 223.5.5.5\n",[29,205,206,208],{"class":31,"line":39},[29,207,199],{"class":49},[29,209,210],{"class":202}," 119.29.29.29\n",[29,212,213,216,219],{"class":31,"line":46},[29,214,215],{"class":49},"options",[29,217,218],{"class":53}," timeout:1",[29,220,221],{"class":53}," attempts:2\n",[100,223,224],{"start":46},[103,225,226],{},"Prevent file from being overwritten: To prevent other system services from overwriting this file, set it as immutable:",[19,228,230],{"className":21,"code":229,"language":23,"meta":24,"style":24},"sudo chattr +i /etc/resolv.conf\n",[26,231,232],{"__ignoreMap":24},[29,233,234,236,239,242],{"class":31,"line":32},[29,235,50],{"class":49},[29,237,238],{"class":53}," chattr",[29,240,241],{"class":53}," +i",[29,243,186],{"class":53},[10,245,246,247,250],{},"(To modify this file, first use ",[26,248,249],{},"sudo chattr -i /etc/resolv.conf"," to unlock it)",[10,252,253],{},"Restart NetworkManager:",[19,255,257],{"className":21,"code":256,"language":23,"meta":24,"style":24},"sudo systemctl restart NetworkManager\n",[26,258,259],{"__ignoreMap":24},[29,260,261,263,266,269],{"class":31,"line":32},[29,262,50],{"class":49},[29,264,265],{"class":53}," systemctl",[29,267,268],{"class":53}," restart",[29,270,271],{"class":53}," NetworkManager\n",[100,273,274],{"start":66},[103,275,276,277,280,281,284],{},"Use ",[26,278,279],{},"resolvectl"," or ",[26,282,283],{},"systemd-resolve"," to check if it was successful (most recommended).",[10,286,287],{},"This is the most direct method to view the system's default DNS configuration.",[19,289,291],{"className":21,"code":290,"language":23,"meta":24,"style":24},"resolvectl status\n",[26,292,293],{"__ignoreMap":24},[29,294,295,297],{"class":31,"line":32},[29,296,279],{"class":49},[29,298,299],{"class":53}," status\n",[10,301,302],{},"Or (for older systems)",[19,304,306],{"className":21,"code":305,"language":23,"meta":24,"style":24},"systemd-resolve --status\n",[26,307,308],{"__ignoreMap":24},[29,309,310,312],{"class":31,"line":32},[29,311,283],{"class":49},[29,313,314],{"class":202}," --status\n",[10,316,317],{},[318,319],"img",{"alt":24,"src":320},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image271.webp",[14,322,324],{"id":323},"screenshot-shortcut-key","Screenshot shortcut key",[10,326,327],{},"KDE's built-in screenshot tool is incredibly useful, and it can also record the screen. However, OBS is more professional for screen recording, so we generally only use this screenshot tool for taking screenshots.",[10,329,330],{},"QQ and WeChat screenshots still have some minor issues under Wayland as of 2025, so we chose KDE's built-in screenshot tool.",[10,332,333],{},[318,334],{"alt":24,"src":335},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image272.webp",[10,337,338],{},"Here, in the custom shortcut key for capturing a rectangular area, simply enter the shortcut key you want to use.",[14,340,342],{"id":341},"search-tool","Search tool",[10,344,345],{},"KDE's built-in search tool is also very useful for quickly opening the application you want. Just like this, so we'll also set up a shortcut key to invoke it.",[10,347,348],{},[318,349],{"alt":24,"src":350},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image273.webp",[10,352,353],{},[318,354],{"alt":24,"src":355},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image274.webp",[10,357,358],{},"The Meta key is the Windows key, with a Microsoft logo on it.",[14,360,362],{"id":361},"disable-selinux","Disable SELinux",[10,364,365],{},"There's no need to enable this on a personal computer — it's just asking for trouble. On Android, however, it's fine to turn it on.",[10,367,368,369,372],{},"Fedora currently has this enabled by default (",[26,370,371],{},"enforcing"," mode), so it needs to be turned off.",[10,374,375,376,379,380,383],{},"There are two ways to disable it: ",[26,377,378],{},"disabled"," and ",[26,381,382],{},"permissive"," modes. Below are the differences between these two modes:",[385,386,387,404],"table",{},[388,389,390],"thead",{},[391,392,393,398,401],"tr",{},[394,395,397],"th",{"align":396},"left","Features",[394,399,400],{"align":396},"Disabled mode",[394,402,403],{"align":396},"Permissive mode",[405,406,407,419,430,441,452,467],"tbody",{},[391,408,409,413,416],{},[410,411,412],"td",{"align":396},"SELinux kernel module status",[410,414,415],{"align":396},"Completely disable SELinux, kernel module does not run.",[410,417,418],{"align":396},"The SELinux kernel module is functioning normally, but it only logs violations without blocking access.",[391,420,421,424,427],{},[410,422,423],{"align":396},"Access control policy",[410,425,426],{"align":396},"No policy is enforced, and all access is permitted.",[410,428,429],{"align":396},"Check the policy and record violations, but will not block operation 36.",[391,431,432,435,438],{},[410,433,434],{"align":396},"Logging",[410,436,437],{"align":396},"Do not generate SELinux-related audit logs37.",[410,439,440],{"align":396},"Log all policy violations to /var/log/audit/audit.log.",[391,442,443,446,449],{},[410,444,445],{"align":396},"Safety",[410,447,448],{"align":396},"Minimal, fully relying on traditional Linux DAC (Discretionary Access Control)28.",[410,450,451],{"align":396},"Higher than Disabled mode, provides a debugging environment while retaining log analysis capabilities.",[391,453,454,457,460],{},[410,455,456],{"align":396},"Switching method",[410,458,459],{"align":396},"You must modify the configuration file /etc/selinux/config and restart the system34.",[410,461,462,463,466],{"align":396},"You can temporarily switch it using the command ",[26,464,465],{},"setenforce 0"," without needing to reboot.",[391,468,469,472,475],{},[410,470,471],{"align":396},"Applicable Scenarios",[410,473,474],{"align":396},"Only for completely avoiding SELinux compatibility issues (such as with outdated software); long-term use is not recommended.",[410,476,477],{"align":396},"Used for debugging strategies, troubleshooting permission issues, or testing SELinux rules during development.",[10,479,480,481,484],{},"Due to Disabled mode, SELinux is completely turned off, and kernel modules are not loaded. All process and file access is controlled solely by traditional Linux user/group permissions (such as ",[26,482,483],{},"rwx","). Therefore, we choose Permissive mode, in which SELinux policies are loaded normally but only violations are logged (e.g., when a process attempts to access an unauthorized file).",[10,486,487],{},"Below is the tutorial for the modification mode:",[19,489,491],{"className":21,"code":490,"language":23,"meta":24,"style":24},"sudo vim /etc/selinux/config\n",[26,492,493],{"__ignoreMap":24},[29,494,495,497,500],{"class":31,"line":32},[29,496,50],{"class":49},[29,498,499],{"class":53}," vim",[29,501,502],{"class":53}," /etc/selinux/config\n",[10,504,505],{},[318,506],{"alt":24,"src":507},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image275.webp",[10,509,510],{},[318,511],{"alt":24,"src":512},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image276.webp",[19,514,518],{"className":515,"code":516,"language":517,"meta":24,"style":24},"language-yaml shiki shiki-themes github-light github-dark","\n# This file controls the state of SELinux on the system. \n\n# SELINUX= can take one of these three values: \n\n#     enforcing - SELinux security policy is enforced. \n\n#     permissive - SELinux prints warnings instead of enforcing. \n\n#     disabled - No SELinux policy is loaded. \n\n# See also: \n\n# https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-selinux/#getting-started-with-selinux-selinux-states-and-modes \n# \n\n# NOTE: In earlier Fedora kernel builds, SELINUX=disabled would also \n\n# fully disable SELinux during boot. If you need a system with SELinux \n\n# fully disabled instead of SELinux running with no policy loaded, you \n\n# need to pass selinux=0 to the kernel command line. You can use grubby \n\n# to persistently set the bootloader to boot with selinux=0: \n# \n\n#    grubby --update-kernel ALL --args selinux=0 \n# \n\n# To revert back to SELinux enabled: \n# \n\n#    grubby --update-kernel ALL --remove-args selinux \n# \nSELINUX=permissive \n\n# SELINUXTYPE= can take one of these three values: \n\n#     targeted - Targeted processes are protected, \n\n#     minimum - Modification of targeted policy. Only selected processes are protected. \n\n#     mls - Multi Level Security protection. \nSELINUXTYPE=targeted\n\n","yaml",[26,519,520,524,529,533,538,542,547,552,558,563,569,574,580,585,591,597,602,608,613,619,624,630,635,641,646,652,657,662,668,673,678,684,689,694,700,705,714,719,725,730,736,741,747,752,758],{"__ignoreMap":24},[29,521,522],{"class":31,"line":32},[29,523,36],{"emptyLinePlaceholder":35},[29,525,526],{"class":31,"line":39},[29,527,528],{"class":42},"# This file controls the state of SELinux on the system. \n",[29,530,531],{"class":31,"line":46},[29,532,36],{"emptyLinePlaceholder":35},[29,534,535],{"class":31,"line":66},[29,536,537],{"class":42},"# SELINUX= can take one of these three values: \n",[29,539,540],{"class":31,"line":71},[29,541,36],{"emptyLinePlaceholder":35},[29,543,544],{"class":31,"line":77},[29,545,546],{"class":42},"#     enforcing - SELinux security policy is enforced. \n",[29,548,550],{"class":31,"line":549},7,[29,551,36],{"emptyLinePlaceholder":35},[29,553,555],{"class":31,"line":554},8,[29,556,557],{"class":42},"#     permissive - SELinux prints warnings instead of enforcing. \n",[29,559,561],{"class":31,"line":560},9,[29,562,36],{"emptyLinePlaceholder":35},[29,564,566],{"class":31,"line":565},10,[29,567,568],{"class":42},"#     disabled - No SELinux policy is loaded. \n",[29,570,572],{"class":31,"line":571},11,[29,573,36],{"emptyLinePlaceholder":35},[29,575,577],{"class":31,"line":576},12,[29,578,579],{"class":42},"# See also: \n",[29,581,583],{"class":31,"line":582},13,[29,584,36],{"emptyLinePlaceholder":35},[29,586,588],{"class":31,"line":587},14,[29,589,590],{"class":42},"# https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-selinux/#getting-started-with-selinux-selinux-states-and-modes \n",[29,592,594],{"class":31,"line":593},15,[29,595,596],{"class":42},"# \n",[29,598,600],{"class":31,"line":599},16,[29,601,36],{"emptyLinePlaceholder":35},[29,603,605],{"class":31,"line":604},17,[29,606,607],{"class":42},"# NOTE: In earlier Fedora kernel builds, SELINUX=disabled would also \n",[29,609,611],{"class":31,"line":610},18,[29,612,36],{"emptyLinePlaceholder":35},[29,614,616],{"class":31,"line":615},19,[29,617,618],{"class":42},"# fully disable SELinux during boot. If you need a system with SELinux \n",[29,620,622],{"class":31,"line":621},20,[29,623,36],{"emptyLinePlaceholder":35},[29,625,627],{"class":31,"line":626},21,[29,628,629],{"class":42},"# fully disabled instead of SELinux running with no policy loaded, you \n",[29,631,633],{"class":31,"line":632},22,[29,634,36],{"emptyLinePlaceholder":35},[29,636,638],{"class":31,"line":637},23,[29,639,640],{"class":42},"# need to pass selinux=0 to the kernel command line. You can use grubby \n",[29,642,644],{"class":31,"line":643},24,[29,645,36],{"emptyLinePlaceholder":35},[29,647,649],{"class":31,"line":648},25,[29,650,651],{"class":42},"# to persistently set the bootloader to boot with selinux=0: \n",[29,653,655],{"class":31,"line":654},26,[29,656,596],{"class":42},[29,658,660],{"class":31,"line":659},27,[29,661,36],{"emptyLinePlaceholder":35},[29,663,665],{"class":31,"line":664},28,[29,666,667],{"class":42},"#    grubby --update-kernel ALL --args selinux=0 \n",[29,669,671],{"class":31,"line":670},29,[29,672,596],{"class":42},[29,674,676],{"class":31,"line":675},30,[29,677,36],{"emptyLinePlaceholder":35},[29,679,681],{"class":31,"line":680},31,[29,682,683],{"class":42},"# To revert back to SELinux enabled: \n",[29,685,687],{"class":31,"line":686},32,[29,688,596],{"class":42},[29,690,692],{"class":31,"line":691},33,[29,693,36],{"emptyLinePlaceholder":35},[29,695,697],{"class":31,"line":696},34,[29,698,699],{"class":42},"#    grubby --update-kernel ALL --remove-args selinux \n",[29,701,703],{"class":31,"line":702},35,[29,704,596],{"class":42},[29,706,708,711],{"class":31,"line":707},36,[29,709,710],{"class":53},"SELINUX=permissive",[29,712,713],{"class":137}," \n",[29,715,717],{"class":31,"line":716},37,[29,718,36],{"emptyLinePlaceholder":35},[29,720,722],{"class":31,"line":721},38,[29,723,724],{"class":42},"# SELINUXTYPE= can take one of these three values: \n",[29,726,728],{"class":31,"line":727},39,[29,729,36],{"emptyLinePlaceholder":35},[29,731,733],{"class":31,"line":732},40,[29,734,735],{"class":42},"#     targeted - Targeted processes are protected, \n",[29,737,739],{"class":31,"line":738},41,[29,740,36],{"emptyLinePlaceholder":35},[29,742,744],{"class":31,"line":743},42,[29,745,746],{"class":42},"#     minimum - Modification of targeted policy. Only selected processes are protected. \n",[29,748,750],{"class":31,"line":749},43,[29,751,36],{"emptyLinePlaceholder":35},[29,753,755],{"class":31,"line":754},44,[29,756,757],{"class":42},"#     mls - Multi Level Security protection. \n",[29,759,761],{"class":31,"line":760},45,[29,762,763],{"class":53},"SELINUXTYPE=targeted\n",[10,765,766,769,770,773],{},[26,767,768],{},"SELINUXTYPE"," is about modifying SELinux policies. The ",[26,771,772],{},"targeted"," policy is SELinux's default policy, which primarily enforces mandatory access control on high-risk network services (such as Apache, MySQL, SSH), while other non-critical processes continue to use traditional Linux user/group permissions (DAC). This design strikes a balance between security and usability, so no modification is needed.",[10,775,776],{},"Just restart.",[19,778,780],{"className":21,"code":779,"language":23,"meta":24,"style":24},"sudo reboot\n",[26,781,782],{"__ignoreMap":24},[29,783,784,786],{"class":31,"line":32},[29,785,50],{"class":49},[29,787,788],{"class":53}," reboot\n",[14,790,792],{"id":791},"uefi-boot-interface-refind","UEFI boot interface rEFInd",[10,794,795],{},[796,797,798],"a",{"href":798,"rel":799},"https://www.bilibili.com/video/BV1qh411Q7d4",[800],"nofollow",[802,803,805],"h4",{"id":804},"install-refind","Install rEFInd",[19,807,809],{"className":21,"code":808,"language":23,"meta":24,"style":24},"\n# Ubuntu\nsudo apt update\nsudo apt install refind\n",[26,810,811,815,819,828],{"__ignoreMap":24},[29,812,813],{"class":31,"line":32},[29,814,36],{"emptyLinePlaceholder":35},[29,816,817],{"class":31,"line":39},[29,818,43],{"class":42},[29,820,821,823,825],{"class":31,"line":46},[29,822,50],{"class":49},[29,824,54],{"class":53},[29,826,827],{"class":53}," update\n",[29,829,830,832,834,836],{"class":31,"line":66},[29,831,50],{"class":49},[29,833,54],{"class":53},[29,835,57],{"class":53},[29,837,838],{"class":53}," refind\n",[19,840,842],{"className":21,"code":841,"language":23,"meta":24,"style":24},"\n# Fedora\nsudo dnf makecache\nsudo dnf install rEFInd\n",[26,843,844,848,853,862],{"__ignoreMap":24},[29,845,846],{"class":31,"line":32},[29,847,36],{"emptyLinePlaceholder":35},[29,849,850],{"class":31,"line":39},[29,851,852],{"class":42},"# Fedora\n",[29,854,855,857,859],{"class":31,"line":46},[29,856,50],{"class":49},[29,858,82],{"class":53},[29,860,861],{"class":53}," makecache\n",[29,863,864,866,868,870],{"class":31,"line":66},[29,865,50],{"class":49},[29,867,82],{"class":53},[29,869,57],{"class":53},[29,871,872],{"class":53}," rEFInd\n",[10,874,875],{},"Note: If you have installed three operating systems, try to install rEFInd on the first system of the Linux partition.",[802,877,879],{"id":878},"confirm-whether-refind-was-installed-successfully","Confirm whether refind was installed successfully.",[10,881,882],{},[318,883],{"alt":24,"src":884},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image277.webp",[10,886,887,888,891,892],{},"As shown in the figure, in the ",[26,889,890],{},"/boot/efi/EFI"," folder, there is a ",[26,893,894],{},"refind.",[10,896,897],{},"If you don't have this refind file, you'll need to install it manually.",[10,899,900],{},"Manual Installation Method One:",[10,902,903,904,907],{},"Find the ",[26,905,906],{},"/usr/share/rEFInd/"," folder and check if there is a refind-install inside it. Simply run the command below.",[19,909,911],{"className":21,"code":910,"language":23,"meta":24,"style":24},"cd /usr/share/rEFInd/\nsudo ./refind-install\nsudo reboot\n",[26,912,913,921,928],{"__ignoreMap":24},[29,914,915,918],{"class":31,"line":32},[29,916,917],{"class":202},"cd",[29,919,920],{"class":53}," /usr/share/rEFInd/\n",[29,922,923,925],{"class":31,"line":39},[29,924,50],{"class":49},[29,926,927],{"class":53}," ./refind-install\n",[29,929,930,932],{"class":31,"line":46},[29,931,50],{"class":49},[29,933,788],{"class":53},[10,935,936],{},[318,937],{"alt":24,"src":938},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image278.webp",[10,940,941],{},[318,942],{"alt":24,"src":943},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image279.webp",[10,945,946],{},"Manual Installation Method Two:",[19,948,950],{"className":21,"code":949,"language":23,"meta":24,"style":24},"cd /usr/share/rEFInd/\nsudo cp -r /usr/share/rEFInd/refind /boot/efi/EFI/\nsudo reboot\n",[26,951,952,958,974],{"__ignoreMap":24},[29,953,954,956],{"class":31,"line":32},[29,955,917],{"class":202},[29,957,920],{"class":53},[29,959,960,962,965,968,971],{"class":31,"line":39},[29,961,50],{"class":49},[29,963,964],{"class":53}," cp",[29,966,967],{"class":202}," -r",[29,969,970],{"class":53}," /usr/share/rEFInd/refind",[29,972,973],{"class":53}," /boot/efi/EFI/\n",[29,975,976,978],{"class":31,"line":46},[29,977,50],{"class":49},[29,979,788],{"class":53},[10,981,982,983,985,986,989],{},"After installation, you can check the ",[26,984,890],{}," folder to see if ",[26,987,988],{},"refind"," is present.",[802,991,993],{"id":992},"configure-refindconf","Configure refind.conf",[19,995,997],{"className":21,"code":996,"language":23,"meta":24,"style":24},"cd /boot/efi/EFI/refind\nsudo vim ./refind.conf\n",[26,998,999,1006],{"__ignoreMap":24},[29,1000,1001,1003],{"class":31,"line":32},[29,1002,917],{"class":202},[29,1004,1005],{"class":53}," /boot/efi/EFI/refind\n",[29,1007,1008,1010,1012],{"class":31,"line":39},[29,1009,50],{"class":49},[29,1011,499],{"class":53},[29,1013,1014],{"class":53}," ./refind.conf\n",[10,1016,1017],{},"Add at the last line: (If you don't know how to use the vim editor, look it up on Baidu yourself)",[19,1019,1021],{"className":21,"code":1020,"language":23,"meta":24,"style":24},"dont_scan_dirs ESP:/EFI/boot,EFI/ubuntu,EFI/boot,EFI/deepin_os,EFI/UOS,EFI/fedora\n",[26,1022,1023],{"__ignoreMap":24},[29,1024,1025,1028],{"class":31,"line":32},[29,1026,1027],{"class":49},"dont_scan_dirs",[29,1029,1030],{"class":53}," ESP:/EFI/boot,EFI/ubuntu,EFI/boot,EFI/deepin_os,EFI/UOS,EFI/fedora\n",[10,1032,1033],{},[318,1034],{"alt":24,"src":1035},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image280.webp",[19,1037,1039],{"className":21,"code":1038,"language":23,"meta":24,"style":24},"sduo reboot\n#如果使用refind-install安装的refind,默认自动将rEFInd启动项作为第一项，如果没有进BIOS手动配置\n",[26,1040,1041,1048],{"__ignoreMap":24},[29,1042,1043,1046],{"class":31,"line":32},[29,1044,1045],{"class":49},"sduo",[29,1047,788],{"class":53},[29,1049,1050],{"class":31,"line":39},[29,1051,1052],{"class":42},"#如果使用refind-install安装的refind,默认自动将rEFInd启动项作为第一项，如果没有进BIOS手动配置\n",[10,1054,1055],{},[318,1056],{"alt":24,"src":1057},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image281.webp",[10,1059,1060],{},"Done!!!",[802,1062,1064],{"id":1063},"beautify","Beautify",[10,1066,1067,1068],{},"rEFInd-glassy theme: ",[796,1069,1070],{"href":1070,"rel":1071},"https://pan.baidu.com/s/1HgfXG3m4j57VIk4k6inI-g",[800],[10,1073,1074],{},"Extraction code: zimo",[10,1076,1077],{},"Remember to extract it.",[19,1079,1081],{"className":21,"code":1080,"language":23,"meta":24,"style":24},"cd /boot/efi/EFI/refind\nmkdir -p ./themes\n\n# 你把美化包解压到哪里了，就cd到哪里\ncd ~/Downloads\nsudo cp -r ./rEFInd-glassy /boot/efi/EFI/refind/themes\n",[26,1082,1083,1089,1100,1104,1109,1116],{"__ignoreMap":24},[29,1084,1085,1087],{"class":31,"line":32},[29,1086,917],{"class":202},[29,1088,1005],{"class":53},[29,1090,1091,1094,1097],{"class":31,"line":39},[29,1092,1093],{"class":49},"mkdir",[29,1095,1096],{"class":202}," -p",[29,1098,1099],{"class":53}," ./themes\n",[29,1101,1102],{"class":31,"line":46},[29,1103,36],{"emptyLinePlaceholder":35},[29,1105,1106],{"class":31,"line":66},[29,1107,1108],{"class":42},"# 你把美化包解压到哪里了，就cd到哪里\n",[29,1110,1111,1113],{"class":31,"line":71},[29,1112,917],{"class":202},[29,1114,1115],{"class":53}," ~/Downloads\n",[29,1117,1118,1120,1122,1124,1127],{"class":31,"line":77},[29,1119,50],{"class":49},[29,1121,964],{"class":53},[29,1123,967],{"class":202},[29,1125,1126],{"class":53}," ./rEFInd-glassy",[29,1128,1129],{"class":53}," /boot/efi/EFI/refind/themes\n",[10,1131,1132],{},"Then",[19,1134,1135],{"className":21,"code":996,"language":23,"meta":24,"style":24},[26,1136,1137,1143],{"__ignoreMap":24},[29,1138,1139,1141],{"class":31,"line":32},[29,1140,917],{"class":202},[29,1142,1005],{"class":53},[29,1144,1145,1147,1149],{"class":31,"line":39},[29,1146,50],{"class":49},[29,1148,499],{"class":53},[29,1150,1014],{"class":53},[10,1152,1017],{},[19,1154,1156],{"className":21,"code":1155,"language":23,"meta":24,"style":24},"include themes/rEFInd-glassy/theme.conf\n",[26,1157,1158],{"__ignoreMap":24},[29,1159,1160,1163],{"class":31,"line":32},[29,1161,1162],{"class":49},"include",[29,1164,1165],{"class":53}," themes/rEFInd-glassy/theme.conf\n",[19,1167,1169],{"className":21,"code":1168,"language":23,"meta":24,"style":24},"\n# 重新启动电脑\nsudo reboot\n",[26,1170,1171,1175,1180],{"__ignoreMap":24},[29,1172,1173],{"class":31,"line":32},[29,1174,36],{"emptyLinePlaceholder":35},[29,1176,1177],{"class":31,"line":39},[29,1178,1179],{"class":42},"# 重新启动电脑\n",[29,1181,1182,1184],{"class":31,"line":46},[29,1183,50],{"class":49},[29,1185,788],{"class":53},[10,1187,1188],{},[318,1189],{"alt":24,"src":1190},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image282.webp",[14,1192,1194],{"id":1193},"kde-theme","KDE theme",[10,1196,1197],{},"First, download a theme you like from the KDE Store, then extract it.",[10,1199,1200],{},[796,1201,1202],{"href":1202,"rel":1203},"https://store.kde.org/",[800],[10,1205,1206],{},[318,1207],{"alt":24,"src":1208},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image283.webp",[19,1210,1212],{"className":21,"code":1211,"language":23,"meta":24,"style":24},"\n# cd进主题的文件夹\ncd ~/Downloads\n\n# 把主题文件复制到KDE的主题\nsudo cp -r ./Apple.BigSur.Dark.P6 /usr/share/plasma/look-and-feel\n",[26,1213,1214,1218,1223,1229,1233,1238],{"__ignoreMap":24},[29,1215,1216],{"class":31,"line":32},[29,1217,36],{"emptyLinePlaceholder":35},[29,1219,1220],{"class":31,"line":39},[29,1221,1222],{"class":42},"# cd进主题的文件夹\n",[29,1224,1225,1227],{"class":31,"line":46},[29,1226,917],{"class":202},[29,1228,1115],{"class":53},[29,1230,1231],{"class":31,"line":66},[29,1232,36],{"emptyLinePlaceholder":35},[29,1234,1235],{"class":31,"line":71},[29,1236,1237],{"class":42},"# 把主题文件复制到KDE的主题\n",[29,1239,1240,1242,1244,1246,1249],{"class":31,"line":77},[29,1241,50],{"class":49},[29,1243,964],{"class":53},[29,1245,967],{"class":202},[29,1247,1248],{"class":53}," ./Apple.BigSur.Dark.P6",[29,1250,1251],{"class":53}," /usr/share/plasma/look-and-feel\n",[10,1253,1254],{},"Once you enter the settings, you'll see it. If you can't see it, just restart your computer.",[10,1256,1257],{},[318,1258],{"alt":24,"src":1259},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image284.webp",[14,1261,1263],{"id":1262},"self-starting-applications-and-scripts","Self-starting Applications and Scripts",[10,1265,1266],{},[318,1267],{"alt":24,"src":1268},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image285.webp",[10,1270,1271],{},"In the upper right corner, you can add scripts and applications. Before adding a script, make sure it has executable permissions. You can also choose to run scripts at startup and shutdown.",[10,1273,1274,1275,1278],{},"Example: Take the docker_x11 command ",[26,1276,1277],{},"xhost +local:docker"," as an example.",[10,1280,1281],{},"First, find a folder to store the scripts. You can create one yourself in the home partition.",[10,1283,1284],{},[318,1285],{"alt":24,"src":1286},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image286.webp",[19,1288,1290],{"className":21,"code":1289,"language":23,"meta":24,"style":24},"touch docker_x11.bash\nsudo chmod a+x ./docker_x11.bash\nsudo vim ./docker_x11.bash\n",[26,1291,1292,1300,1313],{"__ignoreMap":24},[29,1293,1294,1297],{"class":31,"line":32},[29,1295,1296],{"class":49},"touch",[29,1298,1299],{"class":53}," docker_x11.bash\n",[29,1301,1302,1304,1307,1310],{"class":31,"line":39},[29,1303,50],{"class":49},[29,1305,1306],{"class":53}," chmod",[29,1308,1309],{"class":53}," a+x",[29,1311,1312],{"class":53}," ./docker_x11.bash\n",[29,1314,1315,1317,1319],{"class":31,"line":46},[29,1316,50],{"class":49},[29,1318,499],{"class":53},[29,1320,1312],{"class":53},[19,1322,1324],{"className":21,"code":1323,"language":23,"meta":24,"style":24},"#!/bin/bash\n# 等待 X Server 就绪（最多等 10 秒）\nfor i in {1..10}; do\n    if [ -n \"$DISPLAY\" ] && xset q >/dev/null 2>&1; then\n        /usr/bin/xhost +local:docker\n        exit 0\n    fi\n    sleep 1\ndone\n",[26,1325,1326,1331,1336,1359,1402,1410,1418,1423,1431],{"__ignoreMap":24},[29,1327,1328],{"class":31,"line":32},[29,1329,1330],{"class":42},"#!/bin/bash\n",[29,1332,1333],{"class":31,"line":39},[29,1334,1335],{"class":42},"# 等待 X Server 就绪（最多等 10 秒）\n",[29,1337,1338,1341,1344,1347,1350,1353,1356],{"class":31,"line":46},[29,1339,1340],{"class":141},"for",[29,1342,1343],{"class":137}," i ",[29,1345,1346],{"class":141},"in",[29,1348,1349],{"class":137}," {",[29,1351,1352],{"class":49},"1..10}",[29,1354,1355],{"class":137},"; ",[29,1357,1358],{"class":141},"do\n",[29,1360,1361,1364,1367,1370,1373,1376,1379,1382,1385,1388,1391,1394,1397,1399],{"class":31,"line":66},[29,1362,1363],{"class":141},"    if",[29,1365,1366],{"class":137}," [ ",[29,1368,1369],{"class":141},"-n",[29,1371,1372],{"class":53}," \"",[29,1374,1375],{"class":137},"$DISPLAY",[29,1377,1378],{"class":53},"\"",[29,1380,1381],{"class":137}," ] && ",[29,1383,1384],{"class":49},"xset",[29,1386,1387],{"class":53}," q",[29,1389,1390],{"class":141}," >",[29,1392,1393],{"class":53},"/dev/null",[29,1395,1396],{"class":141}," 2>&1",[29,1398,1355],{"class":137},[29,1400,1401],{"class":141},"then\n",[29,1403,1404,1407],{"class":31,"line":71},[29,1405,1406],{"class":49},"        /usr/bin/xhost",[29,1408,1409],{"class":53}," +local:docker\n",[29,1411,1412,1415],{"class":31,"line":77},[29,1413,1414],{"class":202},"        exit",[29,1416,1417],{"class":202}," 0\n",[29,1419,1420],{"class":31,"line":549},[29,1421,1422],{"class":141},"    fi\n",[29,1424,1425,1428],{"class":31,"line":554},[29,1426,1427],{"class":49},"    sleep",[29,1429,1430],{"class":202}," 1\n",[29,1432,1433],{"class":31,"line":560},[29,1434,1435],{"class":141},"done\n",[10,1437,1438,1439,1442],{},"In the vim editor, use ",[26,1440,1441],{},":wq"," to save and exit.",[10,1444,1445],{},[318,1446],{"alt":24,"src":1447},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image287.webp",[10,1449,1450],{},"In KDE 6 settings, find Autostart, then add a login script, not a logout script.",[10,1452,1453,1454],{},"🟢 ",[1455,1456,1457],"strong",{},"Login Script",[1459,1460,1461],"ul",{},[103,1462,1463,1466],{},[1455,1464,1465],{},"When does it execute?"," It runs automatically when a user logs into the system (e.g., via terminal, TTY, or SSH).",[10,1468,1469,1470],{},"🔴 ",[1455,1471,1472],{},"Logout Script",[1459,1474,1475],{},[103,1476,1477,1479],{},[1455,1478,1465],{}," It runs automatically when the user exits the shell or logs out of the login session.",[10,1481,1482],{},[318,1483],{"alt":24,"src":1484},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image288.webp",[10,1486,1487],{},"Just find the script file and add it in.",[10,1489,1490],{},[318,1491],{"alt":24,"src":1492},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image289.webp",[10,1494,1495],{},[318,1496],{"alt":24,"src":1497},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image290.webp",[10,1499,776],{},[14,1501,1503],{"id":1502},"switching-from-bash-to-zsh","Switching from Bash to Zsh",[802,1505,1507],{"id":1506},"what-is-a-shell","What is a shell?",[10,1509,1510],{},"Simply put, the shell is the medium through which you interact with applications. Typically, you enter the application you want to use along with its arguments into the shell. The shell then searches for the application you want to invoke in the PATH, parses the arguments, and passes them in. Finally, it returns the results to you.",[10,1512,1513,1514,1517,1518,1520,1521,1524,1525,1528,1529,1532,1533,1536,1537,1539,1540,1543],{},"If you are using the bash shell, you are most likely using some Linux distribution. Currently, most ",[26,1515,1516],{},"linux"," distributions still use ",[26,1519,23],{}," as the default shell. ",[26,1522,1523],{},"Windows"," uses ",[26,1526,1527],{},"Powershell"," by default. Starting from ",[26,1530,1531],{},"Catalina",", ",[26,1534,1535],{},"MacOS"," has switched its default shell from ",[26,1538,23],{}," to ",[26,1541,1542],{},"zsh",".",[802,1545,1547],{"id":1546},"what-are-the-advantages-of-zsh","What are the advantages of zsh?",[10,1549,1550,1551,1532,1553,1555,1556,1559,1560,1562],{},"Compared to ",[26,1552,23],{},[26,1554,1542],{}," has a vast plugin community and mature plugin management frameworks like ",[26,1557,1558],{},"oh my zsh",", which makes extending ",[26,1561,1542],{},"'s functionality extremely easy. You can manage zsh plugins just like you manage vim plugins.",[802,1564,1566],{"id":1565},"zsh-installation-and-configuration","zsh installation and configuration",[10,1568,1569],{},"First, check what shell you're currently using (usually it's bash).",[19,1571,1573],{"className":21,"code":1572,"language":23,"meta":24,"style":24},"echo $SHELL  # 应该会显示/usr/bin/bash\n\n# 或\necho $0      # 应该显示 \"-bash\"\n",[26,1574,1575,1586,1590,1595],{"__ignoreMap":24},[29,1576,1577,1580,1583],{"class":31,"line":32},[29,1578,1579],{"class":202},"echo",[29,1581,1582],{"class":137}," $SHELL  ",[29,1584,1585],{"class":42},"# 应该会显示/usr/bin/bash\n",[29,1587,1588],{"class":31,"line":39},[29,1589,36],{"emptyLinePlaceholder":35},[29,1591,1592],{"class":31,"line":46},[29,1593,1594],{"class":42},"# 或\n",[29,1596,1597,1599,1603],{"class":31,"line":66},[29,1598,1579],{"class":202},[29,1600,1602],{"class":1601},"s4XuR"," $0",[29,1604,1605],{"class":42},"      # 应该显示 \"-bash\"\n",[10,1607,1608],{},"Now let's install zsh.",[19,1610,1612],{"className":21,"code":1611,"language":23,"meta":24,"style":24},"\n# Debian系\nsudo apt install zsh\n\n#红帽系\nsudo dnf install zsh\n",[26,1613,1614,1618,1623,1634,1638,1643],{"__ignoreMap":24},[29,1615,1616],{"class":31,"line":32},[29,1617,36],{"emptyLinePlaceholder":35},[29,1619,1620],{"class":31,"line":39},[29,1621,1622],{"class":42},"# Debian系\n",[29,1624,1625,1627,1629,1631],{"class":31,"line":46},[29,1626,50],{"class":49},[29,1628,54],{"class":53},[29,1630,57],{"class":53},[29,1632,1633],{"class":53}," zsh\n",[29,1635,1636],{"class":31,"line":66},[29,1637,36],{"emptyLinePlaceholder":35},[29,1639,1640],{"class":31,"line":71},[29,1641,1642],{"class":42},"#红帽系\n",[29,1644,1645,1647,1649,1651],{"class":31,"line":77},[29,1646,50],{"class":49},[29,1648,82],{"class":53},[29,1650,57],{"class":53},[29,1652,1633],{"class":53},[10,1654,1655],{},[318,1656],{"alt":24,"src":1657},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image291.webp",[10,1659,1660],{},"Confirm whether the installation was successful.",[19,1662,1664],{"className":21,"code":1663,"language":23,"meta":24,"style":24},"\n# 查看shell版本\nbash --version\nzsh --version\n",[26,1665,1666,1670,1675,1682],{"__ignoreMap":24},[29,1667,1668],{"class":31,"line":32},[29,1669,36],{"emptyLinePlaceholder":35},[29,1671,1672],{"class":31,"line":39},[29,1673,1674],{"class":42},"# 查看shell版本\n",[29,1676,1677,1679],{"class":31,"line":46},[29,1678,23],{"class":49},[29,1680,1681],{"class":202}," --version\n",[29,1683,1684,1686],{"class":31,"line":66},[29,1685,1542],{"class":49},[29,1687,1681],{"class":202},[10,1689,1690],{},[318,1691],{"alt":24,"src":1692},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image292.webp",[10,1694,1695],{},"How do I configure zsh?",[10,1697,1698,1699,1543],{},"It's pretty much the same as ",[26,1700,23],{},[10,1702,1703,1705,1706,1709,1710,1543],{},[26,1704,1542],{},"'s global configuration file is located at ",[26,1707,1708],{},"/etc/zsh.zshc",", and the single-user configuration file is located at ",[26,1711,1712],{},"~/.zshrc",[10,1714,1715],{},"But it is not recommended to modify any files right now, as we have a more elegant configuration approach:",[802,1717,1719],{"id":1718},"oh-my-zsh","oh my zsh!",[10,1721,1722],{},"Project address:",[10,1724,1725],{},[796,1726,1727],{"href":1727,"rel":1728},"https://github.com/ohmyzsh/ohmyzsh",[800],[10,1730,1731,1733,1734,1736],{},[26,1732,1558],{}," is currently the most popular ",[26,1735,1542],{}," plugin management tool, comparable to vim-plug or Vundle in Vim.",[10,1738,1739],{},"Install oh my zsh",[19,1741,1743],{"className":21,"code":1742,"language":23,"meta":24,"style":24},"\n# 方式一（可能需要科学上网）\nsh -c \"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n\n# 方式二\nsh -c \"$(curl -fsSL https://install.ohmyz.sh/)\"\n",[26,1744,1745,1749,1754,1774,1778,1783],{"__ignoreMap":24},[29,1746,1747],{"class":31,"line":32},[29,1748,36],{"emptyLinePlaceholder":35},[29,1750,1751],{"class":31,"line":39},[29,1752,1753],{"class":42},"# 方式一（可能需要科学上网）\n",[29,1755,1756,1759,1762,1765,1768,1771],{"class":31,"line":46},[29,1757,1758],{"class":49},"sh",[29,1760,1761],{"class":202}," -c",[29,1763,1764],{"class":53}," \"$(",[29,1766,1767],{"class":49},"curl",[29,1769,1770],{"class":202}," -fsSL",[29,1772,1773],{"class":53}," https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)\"\n",[29,1775,1776],{"class":31,"line":66},[29,1777,36],{"emptyLinePlaceholder":35},[29,1779,1780],{"class":31,"line":71},[29,1781,1782],{"class":42},"# 方式二\n",[29,1784,1785,1787,1789,1791,1793,1795],{"class":31,"line":77},[29,1786,1758],{"class":49},[29,1788,1761],{"class":202},[29,1790,1764],{"class":53},[29,1792,1767],{"class":49},[29,1794,1770],{"class":202},[29,1796,1797],{"class":53}," https://install.ohmyz.sh/)\"\n",[10,1799,1800],{},"The image below shows an option to set zsh as the default shell now.",[10,1802,1803],{},[318,1804],{"alt":24,"src":1805},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image293.webp",[10,1807,1808],{},[318,1809],{"alt":24,"src":1810},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image294.webp",[10,1812,1813],{},"As shown in the image above, the installation was successful.",[802,1815,1817],{"id":1816},"configure-oh-my-zsh","Configure oh my zsh",[10,1819,1820,1821,1824],{},"Now check the ",[26,1822,1823],{},".zshrc"," file, and you'll find that Oh My Zsh has already configured almost everything for you.",[10,1826,1827],{},"If you want to use plugins, you can find the plugins section and add them there.",[10,1829,1830],{},"Here is my .zshrc for your reference.",[802,1832,1834],{"id":1833},"customize-a-unique-zsh","Customize a unique zsh",[10,1836,1837],{},"Remember in the previous post I mentioned it's not recommended to modify .zshrc. This is because after using the Oh My Zsh framework, Oh My Zsh creates a ~/oh-my-zsh directory to store related files. Inside it, there is a folder named custom where we can place our configuration scripts. Oh My Zsh will automatically load the vim scripts in this directory.",[10,1839,1840],{},"Basic support for bash configuration commands. For example, the blogger migrated the bashrc script to zsh without making any changes.",[10,1842,1843],{},"I created a script named myshrc.zsh to store configurations. The file is provided below for your reference.",[19,1845,1847],{"className":21,"code":1846,"language":23,"meta":24,"style":24},"cd /home/用户名/.oh-my-zsh/custom\ntouch ./myshrc.zsh\nvim ./myshrc.zsh\n",[26,1848,1849,1856,1863],{"__ignoreMap":24},[29,1850,1851,1853],{"class":31,"line":32},[29,1852,917],{"class":202},[29,1854,1855],{"class":53}," /home/用户名/.oh-my-zsh/custom\n",[29,1857,1858,1860],{"class":31,"line":39},[29,1859,1296],{"class":49},[29,1861,1862],{"class":53}," ./myshrc.zsh\n",[29,1864,1865,1868],{"class":31,"line":46},[29,1866,1867],{"class":49},"vim",[29,1869,1862],{"class":53},[10,1871,1872],{},"Simply copy all the custom settings you added in your ~/.bashrc file into this file.",[10,1874,1875],{},"For example, mine:",[19,1877,1879],{"className":21,"code":1878,"language":23,"meta":24,"style":24},"\n# 配置CUDA\nexport PATH=/usr/local/cuda/bin:$PATH\nexport LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH\n\n# 配置ROS-DISTRO\nexport ROSDISTRO_INDEX_URL=https://mirrors.bfsu.edu.cn/rosdistro/index-v4.yaml\n\n# 配置ROS1 Noetic\n\n# source /opt/ros/noetic/setup.zsh\n\n# export ROS_MASTER_URI=http://localhost:11311\n\n# export ROS_HOSTNAME=localhost\n\n# export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/home/tungchiahui/UserFloder/MySource/ROS_WS/gazebo_models:/home/tungchiahui/UserFloder/MySource/ROS_WS/ign_models\n\n# 配置ROS2 Humble\nsource /opt/ros/humble/setup.zsh\nexport ROS_DOMAIN_ID=6\nexport IGN_GAZEBO_RESOURCE_PATH=$IGN_GAZEBO_RESOURCE_PATH:/home/tungchiahui/UserFloder/MySource/ROS_WS/gazebo_models:/home/tungchiahui/UserFloder/MySource/ROS_WS/ign_models\n",[26,1880,1881,1885,1890,1903,1915,1919,1924,1936,1940,1945,1949,1954,1958,1963,1967,1972,1976,1981,1985,1990,1998,2010],{"__ignoreMap":24},[29,1882,1883],{"class":31,"line":32},[29,1884,36],{"emptyLinePlaceholder":35},[29,1886,1887],{"class":31,"line":39},[29,1888,1889],{"class":42},"# 配置CUDA\n",[29,1891,1892,1895,1898,1900],{"class":31,"line":46},[29,1893,1894],{"class":141},"export",[29,1896,1897],{"class":137}," PATH",[29,1899,142],{"class":141},[29,1901,1902],{"class":137},"/usr/local/cuda/bin:$PATH\n",[29,1904,1905,1907,1910,1912],{"class":31,"line":66},[29,1906,1894],{"class":141},[29,1908,1909],{"class":137}," LD_LIBRARY_PATH",[29,1911,142],{"class":141},[29,1913,1914],{"class":137},"/usr/local/cuda/lib64:$LD_LIBRARY_PATH\n",[29,1916,1917],{"class":31,"line":71},[29,1918,36],{"emptyLinePlaceholder":35},[29,1920,1921],{"class":31,"line":77},[29,1922,1923],{"class":42},"# 配置ROS-DISTRO\n",[29,1925,1926,1928,1931,1933],{"class":31,"line":549},[29,1927,1894],{"class":141},[29,1929,1930],{"class":137}," ROSDISTRO_INDEX_URL",[29,1932,142],{"class":141},[29,1934,1935],{"class":137},"https://mirrors.bfsu.edu.cn/rosdistro/index-v4.yaml\n",[29,1937,1938],{"class":31,"line":554},[29,1939,36],{"emptyLinePlaceholder":35},[29,1941,1942],{"class":31,"line":560},[29,1943,1944],{"class":42},"# 配置ROS1 Noetic\n",[29,1946,1947],{"class":31,"line":565},[29,1948,36],{"emptyLinePlaceholder":35},[29,1950,1951],{"class":31,"line":571},[29,1952,1953],{"class":42},"# source /opt/ros/noetic/setup.zsh\n",[29,1955,1956],{"class":31,"line":576},[29,1957,36],{"emptyLinePlaceholder":35},[29,1959,1960],{"class":31,"line":582},[29,1961,1962],{"class":42},"# export ROS_MASTER_URI=http://localhost:11311\n",[29,1964,1965],{"class":31,"line":587},[29,1966,36],{"emptyLinePlaceholder":35},[29,1968,1969],{"class":31,"line":593},[29,1970,1971],{"class":42},"# export ROS_HOSTNAME=localhost\n",[29,1973,1974],{"class":31,"line":599},[29,1975,36],{"emptyLinePlaceholder":35},[29,1977,1978],{"class":31,"line":604},[29,1979,1980],{"class":42},"# export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/home/tungchiahui/UserFloder/MySource/ROS_WS/gazebo_models:/home/tungchiahui/UserFloder/MySource/ROS_WS/ign_models\n",[29,1982,1983],{"class":31,"line":610},[29,1984,36],{"emptyLinePlaceholder":35},[29,1986,1987],{"class":31,"line":615},[29,1988,1989],{"class":42},"# 配置ROS2 Humble\n",[29,1991,1992,1995],{"class":31,"line":621},[29,1993,1994],{"class":202},"source",[29,1996,1997],{"class":53}," /opt/ros/humble/setup.zsh\n",[29,1999,2000,2002,2005,2007],{"class":31,"line":626},[29,2001,1894],{"class":141},[29,2003,2004],{"class":137}," ROS_DOMAIN_ID",[29,2006,142],{"class":141},[29,2008,2009],{"class":202},"6\n",[29,2011,2012,2014,2017,2019],{"class":31,"line":632},[29,2013,1894],{"class":141},[29,2015,2016],{"class":137}," IGN_GAZEBO_RESOURCE_PATH",[29,2018,142],{"class":141},[29,2020,2021],{"class":137},"$IGN_GAZEBO_RESOURCE_PATH:/home/tungchiahui/UserFloder/MySource/ROS_WS/gazebo_models:/home/tungchiahui/UserFloder/MySource/ROS_WS/ign_models\n",[10,2023,2024],{},"Then you can refresh the current terminal environment.",[19,2026,2028],{"className":21,"code":2027,"language":23,"meta":24,"style":24},"\n# 刷新环境\nsource ~/.zshrc\n\n# 检查自己的配置是否生效\necho $LD_LIBRARY_PATH \n",[26,2029,2030,2034,2039,2046,2050,2055],{"__ignoreMap":24},[29,2031,2032],{"class":31,"line":32},[29,2033,36],{"emptyLinePlaceholder":35},[29,2035,2036],{"class":31,"line":39},[29,2037,2038],{"class":42},"# 刷新环境\n",[29,2040,2041,2043],{"class":31,"line":46},[29,2042,1994],{"class":202},[29,2044,2045],{"class":53}," ~/.zshrc\n",[29,2047,2048],{"class":31,"line":66},[29,2049,36],{"emptyLinePlaceholder":35},[29,2051,2052],{"class":31,"line":71},[29,2053,2054],{"class":42},"# 检查自己的配置是否生效\n",[29,2056,2057,2059],{"class":31,"line":77},[29,2058,1579],{"class":202},[29,2060,2061],{"class":137}," $LD_LIBRARY_PATH\n",[10,2063,2064],{},"Corresponding to my configuration above, the following will be printed by echo, indicating success.",[19,2066,2068],{"className":21,"code":2067,"language":23,"meta":24,"style":24},"/usr/local/cuda/lib64:/usr/local/cuda/lib64: \n",[26,2069,2070],{"__ignoreMap":24},[29,2071,2072],{"class":31,"line":32},[29,2073,2074],{"class":49},"/usr/local/cuda/lib64:/usr/local/cuda/lib64:\n",[802,2076,2078],{"id":2077},"switch-the-default-shell","Switch the default shell.",[10,2080,2081],{},"If you select \"yes\" in the image below, you won't need to reconfigure it.",[10,2083,2084],{},[318,2085],{"alt":24,"src":2086},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image295.webp",[19,2088,2090],{"className":21,"code":2089,"language":23,"meta":24,"style":24},"chsh -s $(which zsh)\n",[26,2091,2092],{"__ignoreMap":24},[29,2093,2094,2097,2100,2103,2106,2109],{"class":31,"line":32},[29,2095,2096],{"class":49},"chsh",[29,2098,2099],{"class":202}," -s",[29,2101,2102],{"class":137}," $(",[29,2104,2105],{"class":202},"which",[29,2107,2108],{"class":53}," zsh",[29,2110,2111],{"class":137},")\n",[19,2113,2115],{"className":21,"code":2114,"language":23,"meta":24,"style":24},"echo $SHELL  # 应输出 \"/usr/bin/zsh\"\necho $0      # 若显示 \"-zsh\"，表示已生效\n",[26,2116,2117,2126],{"__ignoreMap":24},[29,2118,2119,2121,2123],{"class":31,"line":32},[29,2120,1579],{"class":202},[29,2122,1582],{"class":137},[29,2124,2125],{"class":42},"# 应输出 \"/usr/bin/zsh\"\n",[29,2127,2128,2130,2132],{"class":31,"line":39},[29,2129,1579],{"class":202},[29,2131,1602],{"class":1601},[29,2133,2134],{"class":42},"      # 若显示 \"-zsh\"，表示已生效\n",[10,2136,2137],{},"Done!",[10,2139,2140],{},"If you find that it cannot be set as default here, as shown in the image below:",[10,2142,2143],{},[318,2144],{"alt":24,"src":2145},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image296.webp",[10,2147,2148],{},"Then use the following command to force the modification:",[19,2150,2152],{"className":21,"code":2151,"language":23,"meta":24,"style":24},"\n# 强制修改\nsudo usermod -s /usr/bin/zsh tungchiahui(用户名)\n\n# 验证\ngrep tungchiahui(用户名) /etc/passwd  # 检查是否显示 \"/usr/bin/zsh\"\n\n# 重启\nsudo reboot\n",[26,2153,2154,2158,2163,2186,2190,2195,2215,2219,2224],{"__ignoreMap":24},[29,2155,2156],{"class":31,"line":32},[29,2157,36],{"emptyLinePlaceholder":35},[29,2159,2160],{"class":31,"line":39},[29,2161,2162],{"class":42},"# 强制修改\n",[29,2164,2165,2167,2170,2172,2175,2178,2181,2184],{"class":31,"line":46},[29,2166,50],{"class":49},[29,2168,2169],{"class":53}," usermod",[29,2171,2099],{"class":202},[29,2173,2174],{"class":53}," /usr/bin/zsh",[29,2176,2177],{"class":53}," tungchiahui",[29,2179,2180],{"class":137},"(",[29,2182,2183],{"class":49},"用户名",[29,2185,2111],{"class":137},[29,2187,2188],{"class":31,"line":66},[29,2189,36],{"emptyLinePlaceholder":35},[29,2191,2192],{"class":31,"line":71},[29,2193,2194],{"class":42},"# 验证\n",[29,2196,2197,2200,2202,2204,2206,2209,2212],{"class":31,"line":77},[29,2198,2199],{"class":49},"grep",[29,2201,2177],{"class":53},[29,2203,2180],{"class":137},[29,2205,2183],{"class":49},[29,2207,2208],{"class":137},") ",[29,2210,2211],{"class":53},"/etc/passwd",[29,2213,2214],{"class":42},"  # 检查是否显示 \"/usr/bin/zsh\"\n",[29,2216,2217],{"class":31,"line":549},[29,2218,36],{"emptyLinePlaceholder":35},[29,2220,2221],{"class":31,"line":554},[29,2222,2223],{"class":42},"# 重启\n",[29,2225,2226,2228],{"class":31,"line":560},[29,2227,50],{"class":49},[29,2229,788],{"class":53},[10,2231,2232],{},[318,2233],{"alt":24,"src":2234},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image297.webp",[10,2236,2237],{},"Verify after restart",[19,2239,2240],{"className":21,"code":2114,"language":23,"meta":24,"style":24},[26,2241,2242,2250],{"__ignoreMap":24},[29,2243,2244,2246,2248],{"class":31,"line":32},[29,2245,1579],{"class":202},[29,2247,1582],{"class":137},[29,2249,2125],{"class":42},[29,2251,2252,2254,2256],{"class":31,"line":39},[29,2253,1579],{"class":202},[29,2255,1602],{"class":1601},[29,2257,2134],{"class":42},[10,2259,2260],{},[318,2261],{"alt":24,"src":2262},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image298.webp",[10,2264,2265],{},"All done again!",[802,2267,2269],{"id":2268},"plugin-tutorial","Plugin tutorial",[2271,2272,2273],"h5",{"id":2273},"powerlevel10k",[10,2275,2276],{},"This plugin beautifies zsh, with the advantage of having minimal impact on terminal performance and being relatively fast.",[10,2278,2279],{},[796,2280,2281],{"href":2281,"rel":2282},"https://github.com/romkatv/powerlevel10k",[800],[10,2284,2285],{},"Install powerlevel10k",[19,2287,2289],{"className":21,"code":2288,"language":23,"meta":24,"style":24},"\n# 国外用户\ngit clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k\necho 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc\n\n# 国内用户\ngit clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ~/powerlevel10k\necho 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc\n",[26,2290,2291,2295,2300,2317,2330,2334,2339,2352],{"__ignoreMap":24},[29,2292,2293],{"class":31,"line":32},[29,2294,36],{"emptyLinePlaceholder":35},[29,2296,2297],{"class":31,"line":39},[29,2298,2299],{"class":42},"# 国外用户\n",[29,2301,2302,2305,2308,2311,2314],{"class":31,"line":46},[29,2303,2304],{"class":49},"git",[29,2306,2307],{"class":53}," clone",[29,2309,2310],{"class":202}," --depth=1",[29,2312,2313],{"class":53}," https://github.com/romkatv/powerlevel10k.git",[29,2315,2316],{"class":53}," ~/powerlevel10k\n",[29,2318,2319,2321,2324,2327],{"class":31,"line":66},[29,2320,1579],{"class":202},[29,2322,2323],{"class":53}," 'source ~/powerlevel10k/powerlevel10k.zsh-theme'",[29,2325,2326],{"class":141}," >>",[29,2328,2329],{"class":53},"~/.zshrc\n",[29,2331,2332],{"class":31,"line":71},[29,2333,36],{"emptyLinePlaceholder":35},[29,2335,2336],{"class":31,"line":77},[29,2337,2338],{"class":42},"# 国内用户\n",[29,2340,2341,2343,2345,2347,2350],{"class":31,"line":549},[29,2342,2304],{"class":49},[29,2344,2307],{"class":53},[29,2346,2310],{"class":202},[29,2348,2349],{"class":53}," https://gitee.com/romkatv/powerlevel10k.git",[29,2351,2316],{"class":53},[29,2353,2354,2356,2358,2360],{"class":31,"line":554},[29,2355,1579],{"class":202},[29,2357,2323],{"class":53},[29,2359,2326],{"class":141},[29,2361,2329],{"class":53},[10,2363,2364],{},"Download fonts",[10,2366,2367],{},[318,2368],{"alt":24,"src":2369},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image299.webp",[10,2371,2372],{},"Please provide the Markdown fragment you'd like me to translate.",[10,2374,2375],{},[318,2376],{"alt":24,"src":2377},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image300.webp",[10,2379,2380],{},[318,2381],{"alt":24,"src":2382},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image301.webp",[19,2384,2386],{"className":21,"code":2385,"language":23,"meta":24,"style":24},"\n# 刷新当前环境变量\nsource ~/.zshrc\n",[26,2387,2388,2392,2397],{"__ignoreMap":24},[29,2389,2390],{"class":31,"line":32},[29,2391,36],{"emptyLinePlaceholder":35},[29,2393,2394],{"class":31,"line":39},[29,2395,2396],{"class":42},"# 刷新当前环境变量\n",[29,2398,2399,2401],{"class":31,"line":46},[29,2400,1994],{"class":202},[29,2402,2045],{"class":53},[10,2404,2405],{},"Check here whether all icons are displaying correctly. If they are not, it indicates a font issue. Close the terminal and reopen it to see if the font problem persists.",[10,2407,2408],{},"Okay, keep going with y.",[10,2410,2411],{},"It is recommended to refer to the configuration in this tutorial.",[10,2413,2414],{},[796,2415,2416],{"href":2416,"rel":2417},"https://www.bilibili.com/video/BV1dX4y127JL",[800],[10,2419,2420],{},[318,2421],{"alt":24,"src":2422},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image302.webp",[10,2424,2425],{},[318,2426],{"alt":24,"src":2427},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image303.webp",[10,2429,2430],{},"Below is what it looks like once configured:",[10,2432,2433],{},[318,2434],{"alt":24,"src":2435},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image304.webp",[10,2437,2438],{},[318,2439],{"alt":24,"src":2440},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image305.webp",[10,2442,2443],{},"If you want to reconfigure, enter:",[19,2445,2447],{"className":21,"code":2446,"language":23,"meta":24,"style":24},"p10k configure\n",[26,2448,2449],{"__ignoreMap":24},[29,2450,2451,2454],{"class":31,"line":32},[29,2452,2453],{"class":49},"p10k",[29,2455,2456],{"class":53}," configure\n",[10,2458,2459],{},"If VSCode icons are not displaying completely, follow the steps below.",[10,2461,2462],{},[318,2463],{"alt":24,"src":2464},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image306.webp",[10,2466,2467],{},[318,2468],{"alt":24,"src":2469},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image307.webp",[100,2471,2472],{},[103,2473,2474,2475],{},"Search ",[26,2476,2477],{},"Terminal › Integrated: Font Family",[10,2479,2480],{},"Enter a font name that supports Nerd Font, for example:",[19,2482,2484],{"className":21,"code":2483,"language":23,"meta":24,"style":24},"MesloLGS NF\n",[26,2485,2486],{"__ignoreMap":24},[29,2487,2488,2491],{"class":31,"line":32},[29,2489,2490],{"class":49},"MesloLGS",[29,2492,2493],{"class":53}," NF\n",[10,2495,2180,2496,2499],{},[26,2497,2498],{},"MesloLGS NF"," must be placed at the very beginning)",[100,2501,2502],{"start":39},[103,2503,2504],{},[1455,2505,2506],{},"Basic ligature support",[10,2508,2474,2509],{},[26,2510,2511],{},"Terminal › Integrated: Font Ligatures",[10,2513,2514,2515,2518],{},"Check ",[26,2516,2517],{},"Enabled"," (allow font rendering of special ligature characters)",[100,2520,2521],{"start":46},[103,2522,2523],{},[1455,2524,2525],{},"Ensure GPU acceleration is enabled",[1459,2527,2528,2533],{},[103,2529,2474,2530],{},[26,2531,2532],{},"Terminal › Integrated: Gpu Acceleration",[103,2534,2535,2536,2539],{},"Set to ",[26,2537,2538],{},"on"," (improve rendering performance)",[10,2541,2542],{},[1455,2543,2544],{},"If GPU acceleration causes issues",[1459,2546,2547,2554],{},[103,2548,2549,2550,2553],{},"Try setting it to ",[26,2551,2552],{},"off"," and then restart the terminal.",[103,2555,2556],{},"Check whether Fallback Ligatures are in effect.",[10,2558,2559],{},[318,2560],{"alt":24,"src":2561},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image308.webp",[10,2563,2564],{},"Just reopen the terminal (GPU settings require restarting the terminal).",[10,2566,2567],{},[318,2568],{"alt":24,"src":2569},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image309.webp",[14,2571,2573],{"id":2572},"add-color-to-the-terminal","Add color to the terminal",[10,2575,2576],{},"If there is no color in your terminal text, add this. Some distributions like Rocky Linux have no color by default, while out-of-the-box distributions such as Fedora and Ubuntu generally have color by default.",[19,2578,2580],{"className":21,"code":2579,"language":23,"meta":24,"style":24},"vim ~/.bashrc\n",[26,2581,2582],{"__ignoreMap":24},[29,2583,2584,2586],{"class":31,"line":32},[29,2585,1867],{"class":49},[29,2587,2588],{"class":53}," ~/.bashrc\n",[10,2590,2591],{},"Place the following content at the very bottom of the file and save it.",[19,2593,2595],{"className":21,"code":2594,"language":23,"meta":24,"style":24},"# =========================================================\n# Fedora / Ubuntu style colored bash prompt\n# =========================================================\n\n# Enable color support\ncase \"$TERM\" in\n    xterm-color|*-256color) color_prompt=yes;;\nesac\n\n# Git branch function\nparse_git_branch() {\n    git branch 2>/dev/null | sed -n '/^\\*/s/^\\* //p'\n}\n\nif [ \"$color_prompt\" = yes ]; then\n    if [ \"$EUID\" -eq 0 ]; then\n        # root prompt (red)\n        PS1='\\[\\e[1;31m\\]\\u@\\h\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[1;33m\\]$(parse_git_branch)\\[\\e[0m\\]\\$ '\n    else\n        # normal user prompt (green)\n        PS1='\\[\\e[1;32m\\]\\u@\\h\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[1;33m\\]$(parse_git_branch)\\[\\e[0m\\]\\$ '\n    fi\nelse\n    PS1='\\u@\\h:\\w\\$ '\nfi\n\n# Enable colored commands\nalias ls='ls --color=auto'\nalias ll='ls -lh --color=auto'\nalias la='ls -A --color=auto'\n\nalias grep='grep --color=auto'\nalias diff='diff --color=auto'\nalias ip='ip -color=auto'\n\nexport CLICOLOR=1\n\n",[26,2596,2597,2602,2607,2611,2615,2620,2635,2661,2666,2670,2675,2683,2711,2716,2720,2742,2766,2771,2781,2786,2791,2800,2804,2809,2819,2824,2828,2833,2846,2858,2870,2874,2886,2898,2910,2914],{"__ignoreMap":24},[29,2598,2599],{"class":31,"line":32},[29,2600,2601],{"class":42},"# =========================================================\n",[29,2603,2604],{"class":31,"line":39},[29,2605,2606],{"class":42},"# Fedora / Ubuntu style colored bash prompt\n",[29,2608,2609],{"class":31,"line":46},[29,2610,2601],{"class":42},[29,2612,2613],{"class":31,"line":66},[29,2614,36],{"emptyLinePlaceholder":35},[29,2616,2617],{"class":31,"line":71},[29,2618,2619],{"class":42},"# Enable color support\n",[29,2621,2622,2625,2627,2630,2632],{"class":31,"line":77},[29,2623,2624],{"class":141},"case",[29,2626,1372],{"class":53},[29,2628,2629],{"class":137},"$TERM",[29,2631,1378],{"class":53},[29,2633,2634],{"class":141}," in\n",[29,2636,2637,2641,2644,2647,2650,2653,2655,2658],{"class":31,"line":549},[29,2638,2640],{"class":2639},"sA_wV","    xterm-color",[29,2642,2643],{"class":141},"|*",[29,2645,2646],{"class":2639},"-256color",[29,2648,2649],{"class":141},")",[29,2651,2652],{"class":137}," color_prompt",[29,2654,142],{"class":141},[29,2656,2657],{"class":53},"yes",[29,2659,2660],{"class":137},";;\n",[29,2662,2663],{"class":31,"line":554},[29,2664,2665],{"class":141},"esac\n",[29,2667,2668],{"class":31,"line":560},[29,2669,36],{"emptyLinePlaceholder":35},[29,2671,2672],{"class":31,"line":565},[29,2673,2674],{"class":42},"# Git branch function\n",[29,2676,2677,2680],{"class":31,"line":571},[29,2678,2679],{"class":49},"parse_git_branch",[29,2681,2682],{"class":137},"() {\n",[29,2684,2685,2688,2691,2694,2696,2699,2702,2705,2708],{"class":31,"line":576},[29,2686,2687],{"class":49},"    git",[29,2689,2690],{"class":53}," branch",[29,2692,2693],{"class":141}," 2>",[29,2695,1393],{"class":53},[29,2697,2698],{"class":141}," |",[29,2700,2701],{"class":49}," sed",[29,2703,2704],{"class":202}," -n",[29,2706,2707],{"class":53}," '/^\\*/s/^\\*",[29,2709,2710],{"class":53}," //p'\n",[29,2712,2713],{"class":31,"line":582},[29,2714,2715],{"class":137},"}\n",[29,2717,2718],{"class":31,"line":587},[29,2719,36],{"emptyLinePlaceholder":35},[29,2721,2722,2725,2727,2729,2732,2734,2737,2740],{"class":31,"line":593},[29,2723,2724],{"class":141},"if",[29,2726,1366],{"class":137},[29,2728,1378],{"class":53},[29,2730,2731],{"class":137},"$color_prompt",[29,2733,1378],{"class":53},[29,2735,2736],{"class":141}," =",[29,2738,2739],{"class":137}," yes ]; ",[29,2741,1401],{"class":141},[29,2743,2744,2746,2748,2750,2753,2755,2758,2761,2764],{"class":31,"line":599},[29,2745,1363],{"class":141},[29,2747,1366],{"class":137},[29,2749,1378],{"class":53},[29,2751,2752],{"class":137},"$EUID",[29,2754,1378],{"class":53},[29,2756,2757],{"class":141}," -eq",[29,2759,2760],{"class":202}," 0",[29,2762,2763],{"class":137}," ]; ",[29,2765,1401],{"class":141},[29,2767,2768],{"class":31,"line":604},[29,2769,2770],{"class":42},"        # root prompt (red)\n",[29,2772,2773,2776,2778],{"class":31,"line":610},[29,2774,2775],{"class":137},"        PS1",[29,2777,142],{"class":141},[29,2779,2780],{"class":53},"'\\[\\e[1;31m\\]\\u@\\h\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[1;33m\\]$(parse_git_branch)\\[\\e[0m\\]\\$ '\n",[29,2782,2783],{"class":31,"line":615},[29,2784,2785],{"class":141},"    else\n",[29,2787,2788],{"class":31,"line":621},[29,2789,2790],{"class":42},"        # normal user prompt (green)\n",[29,2792,2793,2795,2797],{"class":31,"line":626},[29,2794,2775],{"class":137},[29,2796,142],{"class":141},[29,2798,2799],{"class":53},"'\\[\\e[1;32m\\]\\u@\\h\\[\\e[0m\\]:\\[\\e[1;34m\\]\\w\\[\\e[1;33m\\]$(parse_git_branch)\\[\\e[0m\\]\\$ '\n",[29,2801,2802],{"class":31,"line":632},[29,2803,1422],{"class":141},[29,2805,2806],{"class":31,"line":637},[29,2807,2808],{"class":141},"else\n",[29,2810,2811,2814,2816],{"class":31,"line":643},[29,2812,2813],{"class":137},"    PS1",[29,2815,142],{"class":141},[29,2817,2818],{"class":53},"'\\u@\\h:\\w\\$ '\n",[29,2820,2821],{"class":31,"line":648},[29,2822,2823],{"class":141},"fi\n",[29,2825,2826],{"class":31,"line":654},[29,2827,36],{"emptyLinePlaceholder":35},[29,2829,2830],{"class":31,"line":659},[29,2831,2832],{"class":42},"# Enable colored commands\n",[29,2834,2835,2838,2841,2843],{"class":31,"line":664},[29,2836,2837],{"class":141},"alias",[29,2839,2840],{"class":137}," ls",[29,2842,142],{"class":141},[29,2844,2845],{"class":53},"'ls --color=auto'\n",[29,2847,2848,2850,2853,2855],{"class":31,"line":670},[29,2849,2837],{"class":141},[29,2851,2852],{"class":137}," ll",[29,2854,142],{"class":141},[29,2856,2857],{"class":53},"'ls -lh --color=auto'\n",[29,2859,2860,2862,2865,2867],{"class":31,"line":675},[29,2861,2837],{"class":141},[29,2863,2864],{"class":137}," la",[29,2866,142],{"class":141},[29,2868,2869],{"class":53},"'ls -A --color=auto'\n",[29,2871,2872],{"class":31,"line":680},[29,2873,36],{"emptyLinePlaceholder":35},[29,2875,2876,2878,2881,2883],{"class":31,"line":686},[29,2877,2837],{"class":141},[29,2879,2880],{"class":137}," grep",[29,2882,142],{"class":141},[29,2884,2885],{"class":53},"'grep --color=auto'\n",[29,2887,2888,2890,2893,2895],{"class":31,"line":691},[29,2889,2837],{"class":141},[29,2891,2892],{"class":137}," diff",[29,2894,142],{"class":141},[29,2896,2897],{"class":53},"'diff --color=auto'\n",[29,2899,2900,2902,2905,2907],{"class":31,"line":696},[29,2901,2837],{"class":141},[29,2903,2904],{"class":137}," ip",[29,2906,142],{"class":141},[29,2908,2909],{"class":53},"'ip -color=auto'\n",[29,2911,2912],{"class":31,"line":702},[29,2913,36],{"emptyLinePlaceholder":35},[29,2915,2916,2918,2921,2923],{"class":31,"line":707},[29,2917,1894],{"class":141},[29,2919,2920],{"class":137}," CLICOLOR",[29,2922,142],{"class":141},[29,2924,2925],{"class":202},"1\n",[19,2927,2929],{"className":21,"code":2928,"language":23,"meta":24,"style":24},"source ~/.bashrc\n",[26,2930,2931],{"__ignoreMap":24},[29,2932,2933,2935],{"class":31,"line":32},[29,2934,1994],{"class":202},[29,2936,2588],{"class":53},[14,2938,2940],{"id":2939},"flatpak-software-management-tool","Flatpak software management tool",[10,2942,2943],{},"Flatpak is similar to package management tools like apt and dnf, allowing you to install software. However, it does not install basic system-level software, but rather applications like QQ and QQ Music.",[10,2945,2946],{},"When your apt or dnf doesn't have a certain piece of software, you can check Flathub to see if it's available there.",[802,2948,2950],{"id":2949},"install-flatpak","Install Flatpak",[10,2952,2953],{},[796,2954,2955],{"href":2955,"rel":2956},"https://flatpak.org/",[800],[100,2958,2959],{},[103,2960,2961],{},"Ubuntu",[19,2963,2965],{"className":21,"code":2964,"language":23,"meta":24,"style":24},"\n# 安装flatpak\nsudo apt update && sudo apt install flatpak\n\n# 先添加官方国外源\nflatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo\n\n# 再修改为中科大镜像源\nsudo flatpak remote-modify flathub --url=https://mirrors.ustc.edu.cn/flathub\n\n# 查看仓库详情\nflatpak remotes --show-details\n",[26,2966,2967,2971,2976,2997,3001,3006,3023,3027,3032,3047,3051,3056],{"__ignoreMap":24},[29,2968,2969],{"class":31,"line":32},[29,2970,36],{"emptyLinePlaceholder":35},[29,2972,2973],{"class":31,"line":39},[29,2974,2975],{"class":42},"# 安装flatpak\n",[29,2977,2978,2980,2982,2985,2988,2990,2992,2994],{"class":31,"line":46},[29,2979,50],{"class":49},[29,2981,54],{"class":53},[29,2983,2984],{"class":53}," update",[29,2986,2987],{"class":137}," && ",[29,2989,50],{"class":49},[29,2991,54],{"class":53},[29,2993,57],{"class":53},[29,2995,2996],{"class":53}," flatpak\n",[29,2998,2999],{"class":31,"line":66},[29,3000,36],{"emptyLinePlaceholder":35},[29,3002,3003],{"class":31,"line":71},[29,3004,3005],{"class":42},"# 先添加官方国外源\n",[29,3007,3008,3011,3014,3017,3020],{"class":31,"line":77},[29,3009,3010],{"class":49},"flatpak",[29,3012,3013],{"class":53}," remote-add",[29,3015,3016],{"class":202}," --if-not-exists",[29,3018,3019],{"class":53}," flathub",[29,3021,3022],{"class":53}," https://dl.flathub.org/repo/flathub.flatpakrepo\n",[29,3024,3025],{"class":31,"line":549},[29,3026,36],{"emptyLinePlaceholder":35},[29,3028,3029],{"class":31,"line":554},[29,3030,3031],{"class":42},"# 再修改为中科大镜像源\n",[29,3033,3034,3036,3039,3042,3044],{"class":31,"line":560},[29,3035,50],{"class":49},[29,3037,3038],{"class":53}," flatpak",[29,3040,3041],{"class":53}," remote-modify",[29,3043,3019],{"class":53},[29,3045,3046],{"class":202}," --url=https://mirrors.ustc.edu.cn/flathub\n",[29,3048,3049],{"class":31,"line":565},[29,3050,36],{"emptyLinePlaceholder":35},[29,3052,3053],{"class":31,"line":571},[29,3054,3055],{"class":42},"# 查看仓库详情\n",[29,3057,3058,3060,3063],{"class":31,"line":576},[29,3059,3010],{"class":49},[29,3061,3062],{"class":53}," remotes",[29,3064,3065],{"class":202}," --show-details\n",[10,3067,3068],{},[318,3069],{"alt":24,"src":3070},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image310.webp",[100,3072,3073],{"start":39},[103,3074,3075],{},"Fedora",[10,3077,3078],{},"Fedora already comes with it.",[19,3080,3082],{"className":21,"code":3081,"language":23,"meta":24,"style":24},"\n# 先添加官方国外源\nflatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo\n\n# 再修改为中科大镜像源\nsudo flatpak remote-modify flathub --url=https://mirrors.ustc.edu.cn/flathub\n\n# 查看仓库详情\nflatpak remotes --show-details\n",[26,3083,3084,3088,3092,3104,3108,3112,3124,3128,3132],{"__ignoreMap":24},[29,3085,3086],{"class":31,"line":32},[29,3087,36],{"emptyLinePlaceholder":35},[29,3089,3090],{"class":31,"line":39},[29,3091,3005],{"class":42},[29,3093,3094,3096,3098,3100,3102],{"class":31,"line":46},[29,3095,3010],{"class":49},[29,3097,3013],{"class":53},[29,3099,3016],{"class":202},[29,3101,3019],{"class":53},[29,3103,3022],{"class":53},[29,3105,3106],{"class":31,"line":66},[29,3107,36],{"emptyLinePlaceholder":35},[29,3109,3110],{"class":31,"line":71},[29,3111,3031],{"class":42},[29,3113,3114,3116,3118,3120,3122],{"class":31,"line":77},[29,3115,50],{"class":49},[29,3117,3038],{"class":53},[29,3119,3041],{"class":53},[29,3121,3019],{"class":53},[29,3123,3046],{"class":202},[29,3125,3126],{"class":31,"line":549},[29,3127,36],{"emptyLinePlaceholder":35},[29,3129,3130],{"class":31,"line":554},[29,3131,3055],{"class":42},[29,3133,3134,3136,3138],{"class":31,"line":560},[29,3135,3010],{"class":49},[29,3137,3062],{"class":53},[29,3139,3065],{"class":202},[10,3141,3142],{},[318,3143],{"alt":24,"src":3144},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image311.webp",[802,3146,3148],{"id":3147},"font-issue-resolution","Font Issue Resolution",[10,3150,3151],{},"Because Flatpak is sandboxed, it often lacks fonts. Install fonts first.",[19,3153,3155],{"className":21,"code":3154,"language":23,"meta":24,"style":24},"#Ubuntu\nsudo apt install google-noto-sans-cjk-fonts google-noto-serif-cjk-fonts\n\n# Fedora\nsudo dnf install google-noto-sans-cjk-fonts google-noto-serif-cjk-fonts\n",[26,3156,3157,3162,3176,3180,3184],{"__ignoreMap":24},[29,3158,3159],{"class":31,"line":32},[29,3160,3161],{"class":42},"#Ubuntu\n",[29,3163,3164,3166,3168,3170,3173],{"class":31,"line":39},[29,3165,50],{"class":49},[29,3167,54],{"class":53},[29,3169,57],{"class":53},[29,3171,3172],{"class":53}," google-noto-sans-cjk-fonts",[29,3174,3175],{"class":53}," google-noto-serif-cjk-fonts\n",[29,3177,3178],{"class":31,"line":46},[29,3179,36],{"emptyLinePlaceholder":35},[29,3181,3182],{"class":31,"line":66},[29,3183,852],{"class":42},[29,3185,3186,3188,3190,3192,3194],{"class":31,"line":71},[29,3187,50],{"class":49},[29,3189,82],{"class":53},[29,3191,57],{"class":53},[29,3193,3172],{"class":53},[29,3195,3175],{"class":53},[10,3197,3198],{},"Actually, this font is called:\nNoto Sans CJK / Noto Serif CJK\nIt also includes:\nI am sorry, I cannot process this request. The input appears to be a language label (\"Chinese (Simplified + Traditional)\") rather than a Markdown fragment to translate. Please provide the actual Markdown content you need translated.\nJapanese (JP)\nKorean (KR)",[10,3200,3201],{},"Then set Flatpak's font access permissions (override) so that all Flatpak applications can \"see\" these fonts:",[19,3203,3205],{"className":21,"code":3204,"language":23,"meta":24,"style":24},"sudo flatpak override --filesystem=/usr/share/fonts\nsudo flatpak override --filesystem=~/.local/share/fonts\n",[26,3206,3207,3219],{"__ignoreMap":24},[29,3208,3209,3211,3213,3216],{"class":31,"line":32},[29,3210,50],{"class":49},[29,3212,3038],{"class":53},[29,3214,3215],{"class":53}," override",[29,3217,3218],{"class":202}," --filesystem=/usr/share/fonts\n",[29,3220,3221,3223,3225,3227,3230,3233],{"class":31,"line":39},[29,3222,50],{"class":49},[29,3224,3038],{"class":53},[29,3226,3215],{"class":53},[29,3228,3229],{"class":202}," --filesystem=",[29,3231,3232],{"class":141},"~",[29,3234,3235],{"class":202},"/.local/share/fonts\n",[10,3237,3238],{},"If you have previously installed Flatpak software, the above operations will not take effect on already installed software.\nUsing QQ Music as an example, we need to make it take effect.",[10,3240,3241],{},"Enter the Flatpak sandbox environment. This command lets you enter the QQ Music sandbox terminal, just like \"entering a container.\"\nThe paths inside are isolated from the main system.",[19,3243,3245],{"className":21,"code":3244,"language":23,"meta":24,"style":24},"flatpak run --command=bash com.qq.QQmusic\n",[26,3246,3247],{"__ignoreMap":24},[29,3248,3249,3251,3254,3257],{"class":31,"line":32},[29,3250,3010],{"class":49},[29,3252,3253],{"class":53}," run",[29,3255,3256],{"class":202}," --command=bash",[29,3258,3259],{"class":53}," com.qq.QQmusic\n",[10,3261,3262],{},"Delete the old fontconfig cache. Flatpak caches font indexes within its own sandbox.\nAfter deleting the old cache, the new fonts can be recognized again.",[19,3264,3266],{"className":21,"code":3265,"language":23,"meta":24,"style":24},"rm -rvf ~/.var/app/com.qq.QQmusic/cache/fontconfig/\n",[26,3267,3268],{"__ignoreMap":24},[29,3269,3270,3273,3276],{"class":31,"line":32},[29,3271,3272],{"class":49},"rm",[29,3274,3275],{"class":202}," -rvf",[29,3277,3278],{"class":53}," ~/.var/app/com.qq.QQmusic/cache/fontconfig/\n",[10,3280,3281],{},"Rebuild the font cache. This step forces a rescan of the font paths (including /usr/share/fonts and user font paths).\nGenerate a new cache file to fix the display issue.",[19,3283,3285],{"className":21,"code":3284,"language":23,"meta":24,"style":24},"fc-cache -f -v\n",[26,3286,3287],{"__ignoreMap":24},[29,3288,3289,3292,3295],{"class":31,"line":32},[29,3290,3291],{"class":49},"fc-cache",[29,3293,3294],{"class":202}," -f",[29,3296,3297],{"class":202}," -v\n",[802,3299,3301],{"id":3300},"install-the-software","Install the software",[10,3303,3304],{},[796,3305,3306],{"href":3306,"rel":3307},"https://flathub.org/",[800],[10,3309,3310],{},"Go to the official website above to search for the software and download it.",[10,3312,3313],{},[318,3314],{"alt":24,"src":3315},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image312.webp",[10,3317,3318],{},[318,3319],{"alt":24,"src":3320},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image313.webp",[19,3322,3324],{"className":21,"code":3323,"language":23,"meta":24,"style":24},"flatpak install flathub com.obsproject.Studio\n",[26,3325,3326],{"__ignoreMap":24},[29,3327,3328,3330,3332,3334],{"class":31,"line":32},[29,3329,3010],{"class":49},[29,3331,57],{"class":53},[29,3333,3019],{"class":53},[29,3335,3336],{"class":53}," com.obsproject.Studio\n",[10,3338,3339],{},[318,3340],{"alt":24,"src":3341},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image314.webp",[802,3343,3345],{"id":3344},"run-the-software","Run the software",[10,3347,3348],{},"Method 1 (Official)",[10,3350,3351],{},[318,3352],{"alt":24,"src":3353},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image315.webp",[19,3355,3356],{"className":21,"code":3323,"language":23,"meta":24,"style":24},[26,3357,3358],{"__ignoreMap":24},[29,3359,3360,3362,3364,3366],{"class":31,"line":32},[29,3361,3010],{"class":49},[29,3363,57],{"class":53},[29,3365,3019],{"class":53},[29,3367,3336],{"class":53},[10,3369,3370],{},"Method 2 (just run it as a regular software)",[10,3372,3373],{},[318,3374],{"alt":24,"src":3375},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image316.webp",[10,3377,3378],{},[318,3379],{"alt":24,"src":3380},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image317.webp",[14,3382,3384],{"id":3383},"appimage","Appimage",[10,3386,3387],{},"For example, QQ Music only provides deb and AppImage formats, but not RPM packages (this is the case for version 1.1.7; RPM support may come later. The developers really dropped the ball by not even providing an RPM.) So if I want to install QQ Music on Fedora, I either use AppImage or choose Flatpak (I'll go with AppImage here).",[10,3389,3390],{},"First, download the AppImage.",[10,3392,3393],{},[796,3394,3395],{"href":3395,"rel":3396},"https://y.qq.com/download/download.html",[800],[10,3398,3399],{},[318,3400],{"alt":24,"src":3401},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image318.webp",[10,3403,3404],{},"Go download a QQ Music icon from Google (since Google allows downloading transparent icons).",[10,3406,3407],{},[318,3408],{"alt":24,"src":3409},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image319.webp",[10,3411,3412],{},[318,3413],{"alt":24,"src":3414},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image320.webp",[10,3416,3417,3418,3421,3422,3425],{},"Put them in a folder under ",[26,3419,3420],{},"/home/用户名"," (you can decide the name yourself; for example, I use the ",[26,3423,3424],{},"/home/tungchiahui/UserFloder/Applications/qqmusic/"," folder).",[10,3427,3428],{},"First, grant QQ Music execution permissions.",[19,3430,3432],{"className":21,"code":3431,"language":23,"meta":24,"style":24},"cd ~/UserFloder/Applications/qqmusic\nsudo chmod +x ./qqmusic-1.1.7.AppImage\n",[26,3433,3434,3441],{"__ignoreMap":24},[29,3435,3436,3438],{"class":31,"line":32},[29,3437,917],{"class":202},[29,3439,3440],{"class":53}," ~/UserFloder/Applications/qqmusic\n",[29,3442,3443,3445,3447,3450],{"class":31,"line":39},[29,3444,50],{"class":49},[29,3446,1306],{"class":53},[29,3448,3449],{"class":53}," +x",[29,3451,3452],{"class":53}," ./qqmusic-1.1.7.AppImage\n",[10,3454,3455,3456,3459],{},"Configure ",[1455,3457,3458],{},"shortcuts"," for QQ Music:",[19,3461,3463],{"className":21,"code":3462,"language":23,"meta":24,"style":24},"cd ~/.local/share/applications/\ntouch ./qqmusic.desktop\nvim ./qqmusic.desktop\nsudo chmod +x ./qqmusic.desktop\n",[26,3464,3465,3472,3479,3485],{"__ignoreMap":24},[29,3466,3467,3469],{"class":31,"line":32},[29,3468,917],{"class":202},[29,3470,3471],{"class":53}," ~/.local/share/applications/\n",[29,3473,3474,3476],{"class":31,"line":39},[29,3475,1296],{"class":49},[29,3477,3478],{"class":53}," ./qqmusic.desktop\n",[29,3480,3481,3483],{"class":31,"line":46},[29,3482,1867],{"class":49},[29,3484,3478],{"class":53},[29,3486,3487,3489,3491,3493],{"class":31,"line":66},[29,3488,50],{"class":49},[29,3490,1306],{"class":53},[29,3492,3449],{"class":53},[29,3494,3478],{"class":53},[10,3496,3497],{},"Here is the content:",[19,3499,3501],{"className":21,"code":3500,"language":23,"meta":24,"style":24},"[Desktop Entry]\nName=QQ音乐\nExec=/home/tungchiahui/UserFloder/Applications/qqmusic/qqmusic-1.1.7.AppImage\nIcon=/home/tungchiahui/UserFloder/Applications/qqmusic/QQ_Music2023.svg\nType=Application\nCategories=Audio;Music;Player;\nComment=QQ Music Client for Linux\n",[26,3502,3503,3508,3518,3528,3538,3548,3572],{"__ignoreMap":24},[29,3504,3505],{"class":31,"line":32},[29,3506,3507],{"class":137},"[Desktop Entry]\n",[29,3509,3510,3513,3515],{"class":31,"line":39},[29,3511,3512],{"class":137},"Name",[29,3514,142],{"class":141},[29,3516,3517],{"class":53},"QQ音乐\n",[29,3519,3520,3523,3525],{"class":31,"line":46},[29,3521,3522],{"class":137},"Exec",[29,3524,142],{"class":141},[29,3526,3527],{"class":53},"/home/tungchiahui/UserFloder/Applications/qqmusic/qqmusic-1.1.7.AppImage\n",[29,3529,3530,3533,3535],{"class":31,"line":66},[29,3531,3532],{"class":137},"Icon",[29,3534,142],{"class":141},[29,3536,3537],{"class":53},"/home/tungchiahui/UserFloder/Applications/qqmusic/QQ_Music2023.svg\n",[29,3539,3540,3543,3545],{"class":31,"line":71},[29,3541,3542],{"class":137},"Type",[29,3544,142],{"class":141},[29,3546,3547],{"class":53},"Application\n",[29,3549,3550,3553,3555,3558,3561,3564,3566,3569],{"class":31,"line":77},[29,3551,3552],{"class":137},"Categories",[29,3554,142],{"class":141},[29,3556,3557],{"class":53},"Audio",[29,3559,3560],{"class":137},";",[29,3562,3563],{"class":49},"Music",[29,3565,3560],{"class":137},[29,3567,3568],{"class":49},"Player",[29,3570,3571],{"class":137},";\n",[29,3573,3574,3577,3579,3582,3585,3588,3591],{"class":31,"line":549},[29,3575,3576],{"class":137},"Comment",[29,3578,142],{"class":141},[29,3580,3581],{"class":53},"QQ",[29,3583,3584],{"class":49}," Music",[29,3586,3587],{"class":53}," Client",[29,3589,3590],{"class":53}," for",[29,3592,3593],{"class":53}," Linux\n",[10,3595,3596],{},"Now you can find the software and open it. If you can't find it, please restart — some less advanced distributions don't refresh the icon list very quickly.",[10,3598,3599],{},[318,3600],{"alt":24,"src":3601},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image321.webp",[10,3603,3604],{},"If QQ Music crashes, this is just a problem with the QQ Music software itself. Follow the steps shown in the image below.",[10,3606,3607],{},[318,3608],{"alt":24,"src":3609},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image322.webp",[10,3611,3612],{},[318,3613],{"alt":24,"src":3614},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image323.webp",[10,3616,3617,3618,3621,3622,3625],{},"If you are not using KDE, you can also directly modify ",[26,3619,3620],{},"qqmuic.desktop",": add ",[26,3623,3624],{},"--no-sandbox"," at the end of exec.",[19,3627,3629],{"className":21,"code":3628,"language":23,"meta":24,"style":24},"[Desktop Entry]\nName=QQ音乐\nExec=/home/tungchiahui/UserFloder/Applications/qqmusic/qqmusic-1.1.7.AppImage --no-sandbox\nIcon=/home/tungchiahui/UserFloder/Applications/qqmusic/QQ_Music2023.svg\nType=Application\nCategories=Audio;Music;Player;\nComment=QQ Music Client for Linux\n",[26,3630,3631,3635,3643,3655,3663,3671,3689],{"__ignoreMap":24},[29,3632,3633],{"class":31,"line":32},[29,3634,3507],{"class":137},[29,3636,3637,3639,3641],{"class":31,"line":39},[29,3638,3512],{"class":137},[29,3640,142],{"class":141},[29,3642,3517],{"class":53},[29,3644,3645,3647,3649,3652],{"class":31,"line":46},[29,3646,3522],{"class":137},[29,3648,142],{"class":141},[29,3650,3651],{"class":53},"/home/tungchiahui/UserFloder/Applications/qqmusic/qqmusic-1.1.7.AppImage",[29,3653,3654],{"class":49}," --no-sandbox\n",[29,3656,3657,3659,3661],{"class":31,"line":66},[29,3658,3532],{"class":137},[29,3660,142],{"class":141},[29,3662,3537],{"class":53},[29,3664,3665,3667,3669],{"class":31,"line":71},[29,3666,3542],{"class":137},[29,3668,142],{"class":141},[29,3670,3547],{"class":53},[29,3672,3673,3675,3677,3679,3681,3683,3685,3687],{"class":31,"line":77},[29,3674,3552],{"class":137},[29,3676,142],{"class":141},[29,3678,3557],{"class":53},[29,3680,3560],{"class":137},[29,3682,3563],{"class":49},[29,3684,3560],{"class":137},[29,3686,3568],{"class":49},[29,3688,3571],{"class":137},[29,3690,3691,3693,3695,3697,3699,3701,3703],{"class":31,"line":549},[29,3692,3576],{"class":137},[29,3694,142],{"class":141},[29,3696,3581],{"class":53},[29,3698,3584],{"class":49},[29,3700,3587],{"class":53},[29,3702,3590],{"class":53},[29,3704,3593],{"class":53},[10,3706,3707],{},[318,3708],{"alt":24,"src":3709},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image324.webp",[10,3711,3712],{},"If QQ Music is missing fonts, please install the font (this font supports multiple languages).",[19,3714,3716],{"className":21,"code":3715,"language":23,"meta":24,"style":24},"sudo dnf install google-noto-sans-cjk-fonts google-noto-serif-cjk-fonts\n",[26,3717,3718],{"__ignoreMap":24},[29,3719,3720,3722,3724,3726,3728],{"class":31,"line":32},[29,3721,50],{"class":49},[29,3723,82],{"class":53},[29,3725,57],{"class":53},[29,3727,3172],{"class":53},[29,3729,3175],{"class":53},[14,3731,3733],{"id":3732},"modify-the-hostname","Modify the HOSTNAME",[10,3735,3736],{},"For example, I want to change it to Dell-G15-5511.",[19,3738,3740],{"className":21,"code":3739,"language":23,"meta":24,"style":24},"sudo hostnamectl set-hostname \"Dell-G15-5511\"\n\nhostnamectl | grep \"Static hostname\"      # 验证静态主机名\n\nsudo systemctl restart systemd-hostnamed  # 重启主机名服务\nsudo systemctl restart NetworkManager      # 重启网络服务\nsudo reboot\n\necho $HOSTNAME           # 验证主机名\n",[26,3741,3742,3755,3759,3774,3778,3792,3806,3812,3816],{"__ignoreMap":24},[29,3743,3744,3746,3749,3752],{"class":31,"line":32},[29,3745,50],{"class":49},[29,3747,3748],{"class":53}," hostnamectl",[29,3750,3751],{"class":53}," set-hostname",[29,3753,3754],{"class":53}," \"Dell-G15-5511\"\n",[29,3756,3757],{"class":31,"line":39},[29,3758,36],{"emptyLinePlaceholder":35},[29,3760,3761,3764,3766,3768,3771],{"class":31,"line":46},[29,3762,3763],{"class":49},"hostnamectl",[29,3765,2698],{"class":141},[29,3767,2880],{"class":49},[29,3769,3770],{"class":53}," \"Static hostname\"",[29,3772,3773],{"class":42},"      # 验证静态主机名\n",[29,3775,3776],{"class":31,"line":66},[29,3777,36],{"emptyLinePlaceholder":35},[29,3779,3780,3782,3784,3786,3789],{"class":31,"line":71},[29,3781,50],{"class":49},[29,3783,265],{"class":53},[29,3785,268],{"class":53},[29,3787,3788],{"class":53}," systemd-hostnamed",[29,3790,3791],{"class":42},"  # 重启主机名服务\n",[29,3793,3794,3796,3798,3800,3803],{"class":31,"line":77},[29,3795,50],{"class":49},[29,3797,265],{"class":53},[29,3799,268],{"class":53},[29,3801,3802],{"class":53}," NetworkManager",[29,3804,3805],{"class":42},"      # 重启网络服务\n",[29,3807,3808,3810],{"class":31,"line":549},[29,3809,50],{"class":49},[29,3811,788],{"class":53},[29,3813,3814],{"class":31,"line":554},[29,3815,36],{"emptyLinePlaceholder":35},[29,3817,3818,3820,3823],{"class":31,"line":560},[29,3819,1579],{"class":202},[29,3821,3822],{"class":137}," $HOSTNAME           ",[29,3824,3825],{"class":42},"# 验证主机名\n",[10,3827,3828],{},[318,3829],{"alt":24,"src":3830},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image325.webp",[14,3832,3834],{"id":3833},"delete-the-application-configuration","Delete the application configuration.",[10,3836,3837],{},"Some application configurations are problematic, so you can delete their cache.",[10,3839,3840,3841,3844],{},"The cache is stored in the ",[26,3842,3843],{},"~/.config"," folder.",[10,3846,3847],{},"For example, VScode is having issues:",[10,3849,3850],{},[318,3851],{"alt":24,"src":3852},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image326.webp",[10,3854,3855],{},[318,3856],{"alt":24,"src":3857},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image327.webp",[10,3859,3860],{},"Deleting it like this ends it.",[10,3862,3863,3864,3867],{},"And the following ",[26,3865,3866],{},"~/.vscode"," is an extension.",[10,3869,3870],{},[318,3871],{"alt":24,"src":3872},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image328.webp",[3874,3875,3876],"style",{},"html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sA_wV, html code.shiki .sA_wV{--shiki-default:#032F62;--shiki-dark:#DBEDFF}",{"title":24,"searchDepth":39,"depth":39,"links":3878},[3879,3880,3881,3882,3883,3884,3885,3886,3887,3888,3889,3890,3891,3892],{"id":16,"depth":46,"text":17},{"id":94,"depth":46,"text":95},{"id":323,"depth":46,"text":324},{"id":341,"depth":46,"text":342},{"id":361,"depth":46,"text":362},{"id":791,"depth":46,"text":792},{"id":1193,"depth":46,"text":1194},{"id":1262,"depth":46,"text":1263},{"id":1502,"depth":46,"text":1503},{"id":2572,"depth":46,"text":2573},{"id":2939,"depth":46,"text":2940},{"id":3383,"depth":46,"text":3384},{"id":3732,"depth":46,"text":3733},{"id":3833,"depth":46,"text":3834},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi","6",6000000,"2024-03-30","wiki/2024-03-30-linux-jiao-cheng","en-us:2024-03-30-linux-jiao-cheng","/en-us/wiki/2024-03-30-linux-jiao-cheng","Linux教程","md","wiki/2024-03-30-Linux教程/ch6-其他可选配置",false,null,"en-US","en-us",{},{"title":5,"description":12},"/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi","_i18n/en-us/wiki/2024-03-30-Linux教程/ch6-其他可选配置","hxbWYVj2olQXfnvhN0_K83rPrng7uf-rP8hL9aUdUXE",[3913,3919,3925,3931,3937,3943,3944,3950,3956,3962],{"path":3914,"stem":3915,"title":3916,"date":3896,"chapter":3917,"chapterSort":3918,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch1-fa-xing-ban-tui-jian","_i18n/en-us/wiki/2024-03-30-Linux教程/ch1-发行版推荐","Distribution Recommendations","1",1000000,{"path":3920,"stem":3921,"title":3922,"date":3896,"chapter":3923,"chapterSort":3924,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch2-linux-zhuang-ji-jiao-cheng","_i18n/en-us/wiki/2024-03-30-Linux教程/ch2-Linux装机教程","Linux Installation Tutorial","2",2000000,{"path":3926,"stem":3927,"title":3928,"date":3896,"chapter":3929,"chapterSort":3930,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch3-an-zhuang-bi-bei-pei-zhi","_i18n/en-us/wiki/2024-03-30-Linux教程/ch3-安装必备配置","Install required configuration","3",3000000,{"path":3932,"stem":3933,"title":3934,"date":3896,"chapter":3935,"chapterSort":3936,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch4-ming-ling-jiao-cheng-chang-qi-ji-lei","_i18n/en-us/wiki/2024-03-30-Linux教程/ch4-命令教程(长期积累)","Command Tutorial (Long-Term Accumulation)","4",4000000,{"path":3938,"stem":3939,"title":3940,"date":3896,"chapter":3941,"chapterSort":3942,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch5-ge-zhong-huan-jing-pei-zhi","_i18n/en-us/wiki/2024-03-30-Linux教程/ch5-各种环境配置","Various environment configurations","5",5000000,{"path":3893,"stem":3910,"title":5,"date":3896,"chapter":3894,"chapterSort":3895,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},{"path":3945,"stem":3946,"title":3947,"date":3896,"chapter":3948,"chapterSort":3949,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch7-qemu-kvm-xu-ni-ji","_i18n/en-us/wiki/2024-03-30-Linux教程/ch7-QEMU-KVM虚拟机","QEMU-KVM virtual machine","7",7000000,{"path":3951,"stem":3952,"title":3953,"date":3896,"chapter":3954,"chapterSort":3955,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch8-tuo-zhan-gong-neng","_i18n/en-us/wiki/2024-03-30-Linux教程/ch8-拓展功能","Extended Features","8",8000000,{"path":3957,"stem":3958,"title":3959,"date":3896,"chapter":3960,"chapterSort":3961,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":3903},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo","_i18n/en-us/wiki/2024-03-30-Linux教程/ch9-其他操作","Other operations","9",9000000,{"path":3899,"stem":3963,"title":3964,"date":3896,"chapter":3904,"chapterSort":3965,"docKey":3898,"docRoot":3899,"docTitle":3900,"isWikiDoc":35,"isWikiIndex":35},"_i18n/en-us/wiki/2024-03-30-Linux教程/index","Linux tutorial",0,{"variants":3967},[3968,3969,3972,3975,3978],{"path":3893,"localeSlug":3906,"i18nKey":3902},{"path":3970,"localeSlug":3971,"i18nKey":3902},"/zh-hant/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi","zh-hant",{"path":3973,"localeSlug":3974,"i18nKey":3902},"/zh-hk/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi","zh-hk",{"path":3976,"localeSlug":3977,"i18nKey":3902},"/zh-tw/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi","zh-tw",{"path":3979,"localeSlug":3980,"i18nKey":3902},"/zh-cn/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi","zh-cn",[3893,3909,3970,3909,3973,3909,3976,3909,3979,3909],1780671796286]