[{"data":1,"prerenderedAt":3006},["ShallowReactive",2],{"wiki-page-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo":3,"wiki-doc-items-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo":2936,"language-switcher-data-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo":2990,"wiki-i18n-paths-/en-us/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo":3005},{"id":4,"title":5,"body":6,"canonicalPath":2917,"chapter":2918,"chapterSort":2919,"date":2920,"description":32,"docI18nKey":2921,"docKey":2922,"docRoot":2923,"docTitle":2924,"extension":2925,"i18nKey":2926,"isBlogPost":2927,"isWikiDoc":1041,"isWikiIndex":2927,"layout":2928,"legacyPath":2928,"locale":2929,"localeSlug":2930,"meta":2931,"navigation":1041,"path":2917,"seo":2932,"sourcePath":2933,"sourceStem":2926,"stem":2934,"wikiDepth":39,"__hash__":2935},"content/_i18n/en-us/wiki/2024-03-30-Linux教程/ch9-其他操作.md","Other operations",{"type":7,"value":8,"toc":2908},"minimark",[9,14,18,26,187,190,240,243,247,252,258,261,264,267,272,275,282,285,291,296,301,306,309,314,317,322,325,328,333,336,341,344,361,364,376,379,388,393,396,405,408,417,420,423,432,437,440,461,464,471,480,485,488,491,500,503,512,515,524,527,536,541,544,552,557,560,569,576,584,589,592,601,604,607,611,614,619,622,627,642,647,652,663,668,675,680,695,700,703,708,713,718,727,732,739,744,755,760,763,767,770,773,778,781,803,808,811,820,825,828,852,855,886,889,894,897,912,917,936,947,957,962,974,979,984,987,992,995,1010,1013,1018,1023,1027,1032,1087,1090,1094,1100,1106,1111,1114,1121,1126,1133,1136,1139,1146,1161,1164,1227,1230,1245,1262,1352,1355,1358,1427,1430,1433,1435,1457,1460,1465,1470,1477,1482,1485,1489,1494,1499,1503,1506,1509,1552,1557,1560,1582,1597,1599,1605,1617,1677,1679,1681,1739,1741,1743,1746,1762,1767,1770,1776,1780,1783,1848,1853,1856,1858,1862,1874,1956,1958,1960,2018,2024,2026,2037,2042,2044,2049,2053,2074,2109,2113,2128,2132,2135,2138,2141,2149,2152,2165,2168,2183,2186,2205,2253,2256,2276,2279,2293,2298,2301,2310,2327,2339,2378,2383,2411,2416,2421,2452,2456,2460,2463,2468,2473,2486,2498,2501,2506,2521,2528,2561,2566,2584,2587,2591,2598,2602,2605,2609,2613,2618,2627,2633,2638,2650,2655,2660,2665,2692,2695,2700,2710,2715,2721,2726,2729,2734,2760,2763,2771,2777,2780,2786,2790,2795,2800,2805,2810,2822,2830,2833,2838,2842,2847,2852,2857,2863,2868,2873,2878,2882,2885,2891,2896,2901,2904],[10,11,13],"h3",{"id":12},"how-to-connect-the-industrial-computer-to-wi-fi","How to connect the industrial computer to Wi-Fi",[15,16,17],"p",{},"When our industrial computer moves from one environment to another, and we haven't connected to the Wi-Fi in the new environment, how can we get the industrial computer online without a screen?",[15,19,20,21,25],{},"Navigate to the hard drive directory of the industrial computer, enter ",[22,23,24],"code",{},"/etc/netplan/",", where there are many yaml files. Find the one that best matches the format below:",[27,28,33],"pre",{"className":29,"code":30,"language":31,"meta":32,"style":32},"language-YAML shiki shiki-themes github-light github-dark","network: \n  version: 2 \n  wifis: \n    NM-6f414fe0-2658-48ff-89ee-c7981b87bc96: \n      renderer: NetworkManager \n      match: \n        name: \"wlan0\" \n      dhcp4: true \n      dhcp6: true \n      access-points: \n        \"EMIS_Vinci_Robocon_5G\": \n          auth: \n            key-management: \"psk\" \n            password: \"vinci666\" \n          networkmanager: \n            uuid: \"6f414fe0-2658-48ff-89ee-c7981b87bc96\" \n            name: \"EMIS_Vinci_Robocon_5G\" \n            passthrough: \n              wifi-security.auth-alg: \"open\" \n              ipv6.addr-gen-mode: \"default\" \n              ipv6.ip6-privacy: \"-1\" \n              proxy._: \"\" \n      networkmanager: \n        uuid: \"6f414fe0-2658-48ff-89ee-c7981b87bc96\" \n        name: \"EMIS_Vinci_Robocon_5G\"\n\n","YAML","",[22,34,35,43,49,55,61,67,73,79,85,91,97,103,109,115,121,127,133,139,145,151,157,163,169,175,181],{"__ignoreMap":32},[36,37,40],"span",{"class":38,"line":39},"line",1,[36,41,42],{},"network: \n",[36,44,46],{"class":38,"line":45},2,[36,47,48],{},"  version: 2 \n",[36,50,52],{"class":38,"line":51},3,[36,53,54],{},"  wifis: \n",[36,56,58],{"class":38,"line":57},4,[36,59,60],{},"    NM-6f414fe0-2658-48ff-89ee-c7981b87bc96: \n",[36,62,64],{"class":38,"line":63},5,[36,65,66],{},"      renderer: NetworkManager \n",[36,68,70],{"class":38,"line":69},6,[36,71,72],{},"      match: \n",[36,74,76],{"class":38,"line":75},7,[36,77,78],{},"        name: \"wlan0\" \n",[36,80,82],{"class":38,"line":81},8,[36,83,84],{},"      dhcp4: true \n",[36,86,88],{"class":38,"line":87},9,[36,89,90],{},"      dhcp6: true \n",[36,92,94],{"class":38,"line":93},10,[36,95,96],{},"      access-points: \n",[36,98,100],{"class":38,"line":99},11,[36,101,102],{},"        \"EMIS_Vinci_Robocon_5G\": \n",[36,104,106],{"class":38,"line":105},12,[36,107,108],{},"          auth: \n",[36,110,112],{"class":38,"line":111},13,[36,113,114],{},"            key-management: \"psk\" \n",[36,116,118],{"class":38,"line":117},14,[36,119,120],{},"            password: \"vinci666\" \n",[36,122,124],{"class":38,"line":123},15,[36,125,126],{},"          networkmanager: \n",[36,128,130],{"class":38,"line":129},16,[36,131,132],{},"            uuid: \"6f414fe0-2658-48ff-89ee-c7981b87bc96\" \n",[36,134,136],{"class":38,"line":135},17,[36,137,138],{},"            name: \"EMIS_Vinci_Robocon_5G\" \n",[36,140,142],{"class":38,"line":141},18,[36,143,144],{},"            passthrough: \n",[36,146,148],{"class":38,"line":147},19,[36,149,150],{},"              wifi-security.auth-alg: \"open\" \n",[36,152,154],{"class":38,"line":153},20,[36,155,156],{},"              ipv6.addr-gen-mode: \"default\" \n",[36,158,160],{"class":38,"line":159},21,[36,161,162],{},"              ipv6.ip6-privacy: \"-1\" \n",[36,164,166],{"class":38,"line":165},22,[36,167,168],{},"              proxy._: \"\" \n",[36,170,172],{"class":38,"line":171},23,[36,173,174],{},"      networkmanager: \n",[36,176,178],{"class":38,"line":177},24,[36,179,180],{},"        uuid: \"6f414fe0-2658-48ff-89ee-c7981b87bc96\" \n",[36,182,184],{"class":38,"line":183},25,[36,185,186],{},"        name: \"EMIS_Vinci_Robocon_5G\"\n",[15,188,189],{},"Change it to the new Wi-Fi name and password:",[27,191,193],{"className":29,"code":192,"language":31,"meta":32,"style":32},"network:\n  version: 2\n  wifis:\n    wlan0:\n      dhcp4: true\n      dhcp6: true\n      access-points:\n        \"EMIS_Vinci_Robocon_5G\":\n          password: \"vinci666\"\n\n",[22,194,195,200,205,210,215,220,225,230,235],{"__ignoreMap":32},[36,196,197],{"class":38,"line":39},[36,198,199],{},"network:\n",[36,201,202],{"class":38,"line":45},[36,203,204],{},"  version: 2\n",[36,206,207],{"class":38,"line":51},[36,208,209],{},"  wifis:\n",[36,211,212],{"class":38,"line":57},[36,213,214],{},"    wlan0:\n",[36,216,217],{"class":38,"line":63},[36,218,219],{},"      dhcp4: true\n",[36,221,222],{"class":38,"line":69},[36,223,224],{},"      dhcp6: true\n",[36,226,227],{"class":38,"line":75},[36,228,229],{},"      access-points:\n",[36,231,232],{"class":38,"line":81},[36,233,234],{},"        \"EMIS_Vinci_Robocon_5G\":\n",[36,236,237],{"class":38,"line":87},[36,238,239],{},"          password: \"vinci666\"\n",[15,241,242],{},"The industrial computer connects to the internet as soon as it boots up.",[10,244,246],{"id":245},"ssh-remote-development","SSH remote development",[248,249,251],"h4",{"id":250},"environment-setup","Environment Setup",[15,253,254],{},[255,256,257],"strong",{},"1. Hardware Preparation",[15,259,260],{},"First, you need an industrial computer (X86 small computer, professional industrial computer, Raspberry Pi, etc.).",[15,262,263],{},"The hardware carriers of control systems are diverse, with commonly used processors based on architectures such as ARM and x86, for example: PCs, industrial PCs, Raspberry Pi, NVIDIA Jetson, and so on. Different processors have their own advantages and disadvantages. PCs and industrial PCs offer powerful processing performance but come with high power consumption, large size, and poor flexibility, while embedded systems are the opposite. For us, we can autonomously select an appropriate control system based on various factors of the robot platform, such as electrical requirements, load capacity, space, and intended use.",[15,265,266],{},"Regardless of which processor is chosen, as long as Robot Operating System (ROS) or ROS2 is installed for robot development, there is no fundamental difference in usage for developers. In other words, as a software engineer, in some scenarios, there is no need to focus on hardware selection.",[15,268,269],{},[255,270,271],{},"2. Setting a Static IP",[15,273,274],{},"When connecting remotely, regardless of the tool used, you need to locate the target host by its IP address and then log in using an account and password. Therefore, we first need to obtain that IP address. Since the IP is required for every connection, to ensure convenience and stability, it is best to set the target host's IP address as a static IP. The specific steps are as follows.",[276,277,278],"ol",{},[279,280,281],"li",{},"Enter the settings interface",[15,283,284],{},"Start the connected host machine (a monitor or HDMI capture card is required during startup; after configuring SSH remote access, the monitor or HDMI capture card is no longer needed), and enter the settings interface.",[15,286,287],{},[288,289],"img",{"alt":32,"src":290},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image332.webp",[276,292,293],{"start":45},[279,294,295],{},"Configure the connected network",[15,297,298],{},[288,299],{"alt":32,"src":300},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image333.webp",[276,302,303],{"start":51},[279,304,305],{},"Set a Static IP",[15,307,308],{},"Check the current IP address.",[15,310,311],{},[288,312],{"alt":32,"src":313},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image334.webp",[15,315,316],{},"Set a static IP.",[15,318,319],{},[288,320],{"alt":32,"src":321},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image335.webp",[15,323,324],{},"At this point, the IP configuration is complete.",[248,326,251],{"id":327},"environment-setup-1",[15,329,330],{},[255,331,332],{},"Concept",[15,334,335],{},"SSH (Secure Shell) is a versatile, powerful, software-based network security solution. Every time a computer sends data over the network, SSH automatically encrypts it. When the data reaches its destination, SSH automatically decrypts the encrypted data. The entire process is transparent, and using OpenSSH tools will enhance your system's security. SSH is easy to install and simple to use.",[15,337,338],{},[255,339,340],{},"Implementation",[15,342,343],{},"The SSH implementation architecture is divided into two main parts: the client and the server. The client is the sender of data, and the server is the receiver. In this scenario, we need to send data from the local host to the remote host. Therefore, the local host needs to install and start an SSH client, while the remote host needs to install and start an SSH server. The specific implementation process is as follows:",[276,345,346,349,352,355,358],{},[279,347,348],{},"Install the SSH client on the local host and the SSH server on the remote host.",[279,350,351],{},"Start the SSH service on the remote host.",[279,353,354],{},"Log into a remote host from a local machine.",[279,356,357],{},"Implement data transmission.",[279,359,360],{},"Install SSH client and server",[15,362,363],{},"By default, the Ubuntu system already has the SSH client installed, so you only need to install the SSH server on the remote host. The installation command is as follows:",[27,365,370],{"className":366,"code":367,"language":368,"meta":369,"style":32},"language-Plain shiki shiki-themes github-light github-dark"," sudo apt install openssh-server\n","Plain","Text",[22,371,372],{"__ignoreMap":32},[36,373,374],{"class":38,"line":39},[36,375,367],{},[15,377,378],{},"If the SSH client needs to be installed manually, run the following command:",[27,380,382],{"className":366,"code":381,"language":368,"meta":369,"style":32},"sudo apt install openssh-client\n",[22,383,384],{"__ignoreMap":32},[36,385,386],{"class":38,"line":39},[36,387,381],{},[276,389,390],{"start":45},[279,391,392],{},"Start the SSH service on the remote host",[15,394,395],{},"The command to start the SSH service on a remote host is as follows:",[27,397,399],{"className":366,"code":398,"language":368,"meta":369,"style":32},"sudo /etc/init.d/ssh start\n",[22,400,401],{"__ignoreMap":32},[36,402,403],{"class":38,"line":39},[36,404,398],{},[15,406,407],{},"After starting, you can use the following command to check whether the service is running properly:",[27,409,411],{"className":366,"code":410,"language":368,"meta":369,"style":32},"ps -e | grep ssh\n",[22,412,413],{"__ignoreMap":32},[36,414,415],{"class":38,"line":39},[36,416,410],{},[15,418,419],{},"If startup is successful, it will include the sshd program.",[15,421,422],{},"If you need to frequently use SSH for remote login, to simplify the process, you can configure the SSH service on the remote host to start automatically at boot. The command is as follows:",[27,424,426],{"className":366,"code":425,"language":368,"meta":369,"style":32},"sudo systemctl enable ssh\n",[22,427,428],{"__ignoreMap":32},[36,429,430],{"class":38,"line":39},[36,431,425],{},[276,433,434],{"start":51},[279,435,436],{},"Local Remote Login",[15,438,439],{},"To log into a remote host, you can use the following command:",[27,441,445],{"className":442,"code":443,"language":444,"meta":32,"style":32},"language-bash shiki shiki-themes github-light github-dark","ssh -X 用户名@ip地址\n","bash",[22,446,447],{"__ignoreMap":32},[36,448,449,453,457],{"class":38,"line":39},[36,450,452],{"class":451},"sScJk","ssh",[36,454,456],{"class":455},"sj4cs"," -X",[36,458,460],{"class":459},"sZZnC"," 用户名@ip地址\n",[15,462,463],{},"Then, follow the prompt to enter the login password, and you will be successfully logged in.",[15,465,466,467,470],{},"If you want to exit, you can call the ",[22,468,469],{},"exit"," command:",[27,472,474],{"className":366,"code":473,"language":368,"meta":369,"style":32},"exit\n",[22,475,476],{"__ignoreMap":32},[36,477,478],{"class":38,"line":39},[36,479,473],{},[15,481,482],{},[255,483,484],{},"4. Implementing Data Transmission",[15,486,487],{},"By using SSH on the local host, you can easily upload or download data to and from a remote host by simply calling the relevant commands. The command format is as follows:",[15,489,490],{},"The format for the file upload command is as follows:",[27,492,494],{"className":366,"code":493,"language":368,"meta":369,"style":32},"scp 本地文件路径 账号@ip:路径\n",[22,495,496],{"__ignoreMap":32},[36,497,498],{"class":38,"line":39},[36,499,493],{},[15,501,502],{},"The command format for uploading a folder is as follows:",[27,504,506],{"className":366,"code":505,"language":368,"meta":369,"style":32},"scp -r 本地文件夹路径 账号@ip:路径\n",[22,507,508],{"__ignoreMap":32},[36,509,510],{"class":38,"line":39},[36,511,505],{},[15,513,514],{},"The download file command format is as follows:",[27,516,518],{"className":366,"code":517,"language":368,"meta":369,"style":32},"scp 账号@ip:路径 本地文件夹路径\n",[22,519,520],{"__ignoreMap":32},[36,521,522],{"class":38,"line":39},[36,523,517],{},[15,525,526],{},"The download folder command format is as follows:",[27,528,530],{"className":366,"code":529,"language":368,"meta":369,"style":32},"scp -r 账号@ip:路径 本地文件夹路径\n",[22,531,532],{"__ignoreMap":32},[36,533,534],{"class":38,"line":39},[36,535,529],{},[15,537,538],{},[255,539,540],{},"Optimization",[15,542,543],{},"Every time you log in remotely, you need to enter a password, which is inconvenient. You can use SSH keys to simplify the login process, enabling passwordless login and improving operational efficiency. The idea is to generate a pair of public and private keys: the private key is stored locally, and the public key is uploaded to the server. Each time you log in, the local machine sends the private key to the server. If the server has a matching public key, it recognizes you as a legitimate user and establishes an SSH connection directly. The implementation involves only two steps:",[276,545,546,549],{},[279,547,548],{},"Generate a local key pair.",[279,550,551],{},"Upload the public key to the remote host.",[15,553,554],{},[255,555,556],{},"1. Generate a key pair",[15,558,559],{},"Local client generates public and private keys: (just press Enter all the way to accept defaults)",[27,561,563],{"className":366,"code":562,"language":368,"meta":369,"style":32},"ssh-keygen\n",[22,564,565],{"__ignoreMap":32},[36,566,567],{"class":38,"line":39},[36,568,562],{},[15,570,571,572,575],{},"The command above will create a public-private key pair in the ",[22,573,574],{},".ssh"," folder under the user's home directory.",[276,577,578,581],{},[279,579,580],{},"id_rsa (private key);",[279,582,583],{},"id_rsa.pub (public key).",[15,585,586],{},[255,587,588],{},"2. Uploading the Public Key",[15,590,591],{},"The upload instructions are as follows:",[27,593,595],{"className":366,"code":594,"language":368,"meta":369,"style":32},"ssh-copy-id -i ~/.ssh/id_rsa.pub 账号@ip\n",[22,596,597],{"__ignoreMap":32},[36,598,599],{"class":38,"line":39},[36,600,594],{},[15,602,603],{},"The instruction above is to upload the local public key to the ssh directory on the remote host. This directory contains the file authorized_keys, which stores the public key content.",[15,605,606],{},"From now on, you won't need to enter a password for remote logins.",[248,608,610],{"id":609},"optimizing-with-vscode","Optimizing with VSCode",[15,612,613],{},"In the previous section, we introduced the use of SSH remote connections. However, using SSH alone has some limitations. For example, editing file content requires the vi editor, and within a single terminal, you cannot edit multiple files simultaneously. This section will introduce a more practical feature — remote development using VSCode combined with plugins. This allows us to perform remote development in a graphical way, making it more convenient and faster than using SSH alone, and can greatly improve program development efficiency.",[15,615,616],{},[255,617,618],{},"1. Preparation",[15,620,621],{},"VScode remote development relies on SSH. Please first configure the SSH remote connection according to the previous section.",[15,623,624],{},[255,625,626],{},"2. Install the Remote Development Plugin for VSCode",[15,628,629,630,633,634,637,638,641],{},"Launch VScode, first click the Extensions button in the sidebar, then type ",[22,631,632],{},"Remote Development"," into the search bar of ",[22,635,636],{},"扩展：商店"," and click the plugin with the same name, and finally click ",[22,639,640],{},"安装"," in the display area on the right.",[15,643,644],{},[288,645],{"alt":32,"src":646},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image336.webp",[15,648,649],{},[255,650,651],{},"3. Configure Remote Connection",[15,653,654,655,658,659,662],{},"Step 1: Use the shortcut ",[22,656,657],{},"ctrl + shift + p"," to open the command input window, then enter ",[22,660,661],{},"Remote-SSH:Connect to Host...",". From the pop-up list, select the option with the same name.",[15,664,665],{},[288,666],{"alt":32,"src":667},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image337.webp",[15,669,670,671,674],{},"Step 2: After Step 1 is completed, a new command window will pop up as shown below. Select ",[22,672,673],{},"Add New SSH Host"," from the dropdown list.",[15,676,677],{},[288,678],{"alt":32,"src":679},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image338.webp",[15,681,682,683,686,687,690,691,694],{},"Step 3: After completing step 2, a new command window will pop up. In it, enter: ",[22,684,685],{},"ssh -X ubuntu@192.168.43.164",", where ",[22,688,689],{},"ubuntu"," needs to be replaced with your login username, and ",[22,692,693],{},"192.18.43.164"," should be replaced with the IP address of the remote host you are connecting to.",[15,696,697],{},[288,698],{"alt":32,"src":699},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image339.webp",[15,701,702],{},"Step 4: Select the first option in the pop-up list after completing Step 3 (or simply press Enter) to finish the configuration. A confirmation message will appear once the configuration is successful.",[15,704,705],{},[288,706],{"alt":32,"src":707},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image340.webp",[15,709,710],{},[288,711],{"alt":32,"src":712},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image341.webp",[15,714,715],{},[255,716,717],{},"4. Usage",[15,719,720,721,723,724,726],{},"Step 1: Continue using the shortcut ",[22,722,657],{}," to open the command input window, and enter ",[22,725,661],{},". The list will then display the IP address configured in step 3. Select it directly, and after selection, VScode will open a new window.",[15,728,729],{},[288,730],{"alt":32,"src":731},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image342.webp",[15,733,734,735,738],{},"Alternatively, you can click ",[22,736,737],{},"远程资源管理器"," in the sidebar, select the server you want to connect to from the pop-up server list, right-click it, and choose to establish a remote connection in the current window or a new window.",[15,740,741],{},[288,742],{"alt":32,"src":743},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image343.webp",[15,745,746,747,750,751,754],{},"Step 2: Select ",[22,748,749],{},"打开文件夹"," under the ",[22,752,753],{},"文件"," menu bar, choose the folder you want to open from the pop-up list, and click OK.",[15,756,757],{},[288,758],{"alt":32,"src":759},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image344.webp",[15,761,762],{},"Finally, we can achieve remote development just like working with local files.",[10,764,766],{"id":765},"remote-desktop","Remote Desktop",[15,768,769],{},"Because X11 forwarding is far too inefficient, it's necessary to use remote desktop access to view Rviz2, Gazebo, and similar tools (if needed).",[15,771,772],{},"We choose to use VNC to view it.",[276,774,775],{},[279,776,777],{},"Install the VNC server:",[15,779,780],{},"Here, TigerVNC is used as an example for installation:",[27,782,784],{"className":442,"code":783,"language":444,"meta":32,"style":32},"sudo apt install tigervnc-standalone-server tigervnc-common\n",[22,785,786],{"__ignoreMap":32},[36,787,788,791,794,797,800],{"class":38,"line":39},[36,789,790],{"class":451},"sudo",[36,792,793],{"class":459}," apt",[36,795,796],{"class":459}," install",[36,798,799],{"class":459}," tigervnc-standalone-server",[36,801,802],{"class":459}," tigervnc-common\n",[276,804,805],{"start":45},[279,806,807],{},"Set VNC password:",[15,809,810],{},"To set a password for the VNC user, run the following command:",[27,812,814],{"className":442,"code":813,"language":444,"meta":32,"style":32},"vncpasswd\n",[22,815,816],{"__ignoreMap":32},[36,817,818],{"class":38,"line":39},[36,819,813],{"class":451},[276,821,822],{"start":51},[279,823,824],{},"Configure the VNC startup script:",[15,826,827],{},"Create a VNC configuration file and create a startup file in the .vnc folder within the user's home directory:",[27,829,831],{"className":442,"code":830,"language":444,"meta":32,"style":32},"mkdir -p ~/.vnc\nnano ~/.vnc/xstartup\n",[22,832,833,844],{"__ignoreMap":32},[36,834,835,838,841],{"class":38,"line":39},[36,836,837],{"class":451},"mkdir",[36,839,840],{"class":455}," -p",[36,842,843],{"class":459}," ~/.vnc\n",[36,845,846,849],{"class":38,"line":45},[36,847,848],{"class":451},"nano",[36,850,851],{"class":459}," ~/.vnc/xstartup\n",[15,853,854],{},"In the opened editor, enter the following content (using GNOME as an example):",[27,856,858],{"className":442,"code":857,"language":444,"meta":32,"style":32},"#!/bin/sh\nunset SESSION_MANAGER\nunset DBUS_SESSION_BUS_ADDRESS\ngnome-session\n",[22,859,860,866,874,881],{"__ignoreMap":32},[36,861,862],{"class":38,"line":39},[36,863,865],{"class":864},"sJ8bj","#!/bin/sh\n",[36,867,868,871],{"class":38,"line":45},[36,869,870],{"class":455},"unset",[36,872,873],{"class":459}," SESSION_MANAGER\n",[36,875,876,878],{"class":38,"line":51},[36,877,870],{"class":455},[36,879,880],{"class":459}," DBUS_SESSION_BUS_ADDRESS\n",[36,882,883],{"class":38,"line":57},[36,884,885],{"class":451},"gnome-session\n",[15,887,888],{},"Save and exit (in nano, press Ctrl + O to save, then press Ctrl + X to exit).",[276,890,891],{"start":57},[279,892,893],{},"Grant execute permission:",[15,895,896],{},"Set execute permission for the xstartup file:",[27,898,900],{"className":442,"code":899,"language":444,"meta":32,"style":32},"chmod +x ~/.vnc/xstartup\n",[22,901,902],{"__ignoreMap":32},[36,903,904,907,910],{"class":38,"line":39},[36,905,906],{"class":451},"chmod",[36,908,909],{"class":459}," +x",[36,911,851],{"class":459},[276,913,914],{"start":63},[279,915,916],{},"Start the VNC server:",[27,918,920],{"className":442,"code":919,"language":444,"meta":32,"style":32},"vncserver -geometry 1920x1080 -localhost=0\n",[22,921,922],{"__ignoreMap":32},[36,923,924,927,930,933],{"class":38,"line":39},[36,925,926],{"class":451},"vncserver",[36,928,929],{"class":455}," -geometry",[36,931,932],{"class":459}," 1920x1080",[36,934,935],{"class":455}," -localhost=0\n",[15,937,938,939,942,943,946],{},"The ",[22,940,941],{},"geometry"," option specifies the window size, and the ",[22,944,945],{},"localhost"," option is set to 0 to allow external connections. (Setting it to 1 only allows local connections.)",[15,948,949,950,953,954,956],{},"You will see output similar to ",[22,951,952],{},":1",", which indicates the display number of the VNC session. For example, if the output is ",[22,955,952],{},", the VNC listening port is 5901 (5900 + display number).",[276,958,959],{"start":69},[279,960,961],{},"Check the enabled VNC servers:",[27,963,965],{"className":442,"code":964,"language":444,"meta":32,"style":32},"vncserver -list\n",[22,966,967],{"__ignoreMap":32},[36,968,969,971],{"class":38,"line":39},[36,970,926],{"class":451},[36,972,973],{"class":455}," -list\n",[15,975,976],{},[288,977],{"alt":32,"src":978},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image345.webp",[276,980,981],{"start":75},[279,982,983],{},"Connect to the VNC server:",[15,985,986],{},"Use a VNC client (such as vncviewer) to connect to the VNC server by entering your server's IP address and port. For example, if the server IP is 192.168.31.10 and the display number is 1, you should connect to 192.168.31.10:1, or simply enter 192.168.31.10:5901.",[276,988,989],{"start":81},[279,990,991],{},"Stop the VNC server:",[15,993,994],{},"If you need to stop the VNC server, you can use the following command:",[27,996,998],{"className":442,"code":997,"language":444,"meta":32,"style":32},"vncserver -kill :1\n",[22,999,1000],{"__ignoreMap":32},[36,1001,1002,1004,1007],{"class":38,"line":39},[36,1003,926],{"class":451},[36,1005,1006],{"class":455}," -kill",[36,1008,1009],{"class":459}," :1\n",[15,1011,1012],{},"Replace :1 with the actual display number you are using.",[15,1014,1015],{},[288,1016],{"alt":32,"src":1017},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image346.webp",[15,1019,1020],{},[288,1021],{"alt":32,"src":1022},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image347.webp",[10,1024,1026],{"id":1025},"usb-port-settings","USB port settings",[15,1028,1029],{},[255,1030,1031],{},"First, configure the permissions.",[27,1033,1035],{"className":442,"code":1034,"language":444,"meta":32,"style":32},"\n# 将用户权限提高\nsudo usermod -aG dialout $USER\nnewgrp dialout\n\n# 查看下面命令是否输出dialout（若输出才正常）\ngroups\n",[22,1036,1037,1043,1048,1065,1073,1077,1082],{"__ignoreMap":32},[36,1038,1039],{"class":38,"line":39},[36,1040,1042],{"emptyLinePlaceholder":1041},true,"\n",[36,1044,1045],{"class":38,"line":45},[36,1046,1047],{"class":864},"# 将用户权限提高\n",[36,1049,1050,1052,1055,1058,1061],{"class":38,"line":51},[36,1051,790],{"class":451},[36,1053,1054],{"class":459}," usermod",[36,1056,1057],{"class":455}," -aG",[36,1059,1060],{"class":459}," dialout",[36,1062,1064],{"class":1063},"sVt8B"," $USER\n",[36,1066,1067,1070],{"class":38,"line":57},[36,1068,1069],{"class":451},"newgrp",[36,1071,1072],{"class":459}," dialout\n",[36,1074,1075],{"class":38,"line":63},[36,1076,1042],{"emptyLinePlaceholder":1041},[36,1078,1079],{"class":38,"line":69},[36,1080,1081],{"class":864},"# 查看下面命令是否输出dialout（若输出才正常）\n",[36,1083,1084],{"class":38,"line":75},[36,1085,1086],{"class":451},"groups\n",[15,1088,1089],{},"Because we plug and unplug USB devices, their port numbers may keep changing, so we need to assign a fixed alias to their tty.",[248,1091,1093],{"id":1092},"bind-usb-devices-by-port-multiple-different-devices","Bind USB devices by port (multiple different devices)",[15,1095,1096,1099],{},[255,1097,1098],{},"Requirement:"," A radar and a smart car are now connected to the Ubuntu system. Please bind ports for both.",[15,1101,1102,1105],{},[255,1103,1104],{},"Implementation Principle:"," Port binding can be achieved through the \"identifier\" of the USB device itself.",[15,1107,1108],{},[255,1109,1110],{},"The process is as follows:",[15,1112,1113],{},"(1). Find the device idVendor and idProduct",[15,1115,1116,1117,1120],{},"Connect two USB devices, and in the terminal run the command ",[22,1118,1119],{},"lsusb"," to view the USB device information in the system as well as the devices connected to it.",[15,1122,1123],{},[288,1124],{"alt":32,"src":1125},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image348.webp",[15,1127,1128,1129,1132],{},"As shown in the image above, the data inside the red box represents USB devices. The values following the ID ",[22,1130,1131],{},"1a86:7523"," are the USB idVendor and idProduct respectively (the two parameters are separated by a colon).",[15,1134,1135],{},"Additionally: You can determine which data corresponds to the connected USB device by comparing results after re-plugging.",[15,1137,1138],{},"(2). Write mapping rules",[15,1140,1141,1142,1145],{},"Create a new file named xxx.rules (customize the filename) in the ",[22,1143,1144],{},"/etc/udev/rules.d"," directory.",[27,1147,1149],{"className":442,"code":1148,"language":444,"meta":32,"style":32},"sudo vim /etc/udev/rules.d/xxx.rules\n",[22,1150,1151],{"__ignoreMap":32},[36,1152,1153,1155,1158],{"class":38,"line":39},[36,1154,790],{"class":451},[36,1156,1157],{"class":459}," vim",[36,1159,1160],{"class":459}," /etc/udev/rules.d/xxx.rules\n",[15,1162,1163],{},"I'd be happy to help, but it looks like you didn't include the content you want me to translate. Could you please provide the Simplified Chinese Markdown fragment you'd like me to translate into natural American English?",[27,1165,1167],{"className":442,"code":1166,"language":444,"meta":32,"style":32},"KERNEL==\"ttyUSB*\", ATTRS{idVendor}==\"10c4\", ATTRS{idProduct}==\"ea60\", MODE:=\"0777\", SYMLINK+=\"mylidar\"\nKERNEL==\"ttyUSB*\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"7523\", MODE:=\"0777\", SYMLINK+=\"mycar\"\n",[22,1168,1169,1202],{"__ignoreMap":32},[36,1170,1171,1174,1178,1181,1184,1187,1190,1193,1196,1199],{"class":38,"line":39},[36,1172,1173],{"class":1063},"KERNEL",[36,1175,1177],{"class":1176},"szBVR","=",[36,1179,1180],{"class":459},"=\"ttyUSB*\",",[36,1182,1183],{"class":451}," ATTRS",[36,1185,1186],{"class":459},"{idVendor}==",[36,1188,1189],{"class":451},"\"10c4\"",[36,1191,1192],{"class":451},",",[36,1194,1195],{"class":459}," ATTRS{idProduct}==\"ea60\",",[36,1197,1198],{"class":459}," MODE:=\"0777\",",[36,1200,1201],{"class":459}," SYMLINK+=\"mylidar\"\n",[36,1203,1204,1206,1208,1210,1212,1214,1217,1219,1222,1224],{"class":38,"line":45},[36,1205,1173],{"class":1063},[36,1207,1177],{"class":1176},[36,1209,1180],{"class":459},[36,1211,1183],{"class":451},[36,1213,1186],{"class":459},[36,1215,1216],{"class":451},"\"1a86\"",[36,1218,1192],{"class":451},[36,1220,1221],{"class":459}," ATTRS{idProduct}==\"7523\",",[36,1223,1198],{"class":459},[36,1225,1226],{"class":459}," SYMLINK+=\"mycar\"\n",[15,1228,1229],{},"Code Explanation",[1231,1232,1233,1236,1239,1242],"ul",{},[279,1234,1235],{},"KERNEL is a fixed kernel name, which here is uniformly \"ttyUSB*\".",[279,1237,1238],{},"MODE is a node permission, typically set to \"0777\", indicating read, write, and execute permissions.",[279,1240,1241],{},"A SYMLINK is a symbolic link, which is an alias for a binding.",[279,1243,1244],{},"ATTRS is the unique identifier for the device manufacturer, and idVendor together with idProduct form the device ID found via lsusb above.",[15,1246,1247,1253,1254],{},[1248,1249,1250],"em",{},[255,1251,1252],{},"Tip:"," ",[1248,1255,1256,1257,1145],{},"Most USB device vendors provide similar script files. For the caller, simply copy the file to the ",[1248,1258,1259],{},[22,1260,1261],{},"/etc/udev/rule.d",[1263,1264,1265,1282],"table",{},[1266,1267,1268],"thead",{},[1269,1270,1271,1276,1279],"tr",{},[1272,1273,1275],"th",{"align":1274},"left","Device Type",[1272,1277,1278],{"align":1274},"Kernel name example",[1272,1280,1281],{"align":1274},"Explanation",[1283,1284,1285,1297,1308,1319,1330,1341],"tbody",{},[1269,1286,1287,1291,1294],{},[1288,1289,1290],"td",{"align":1274},"USB serial device",[1288,1292,1293],{"align":1274},"ttyUSB*",[1288,1295,1296],{"align":1274},"USB to serial device, such as /dev/ttyUSB0",[1269,1298,1299,1302,1305],{},[1288,1300,1301],{"align":1274},"Serial port device",[1288,1303,1304],{"align":1274},"ttyS*",[1288,1306,1307],{"align":1274},"Physical serial port device, such as /dev/ttyS0",[1269,1309,1310,1313,1316],{},[1288,1311,1312],{"align":1274},"Storage device",[1288,1314,1315],{"align":1274},"sd*",[1288,1317,1318],{"align":1274},"SCSI disk device, such as /dev/sda",[1269,1320,1321,1324,1327],{},[1288,1322,1323],{"align":1274},"Network device",[1288,1325,1326],{"align":1274},"eth*",[1288,1328,1329],{"align":1274},"Ethernet device, such as /dev/eth0",[1269,1331,1332,1335,1338],{},[1288,1333,1334],{"align":1274},"Input device",[1288,1336,1337],{"align":1274},"event*",[1288,1339,1340],{"align":1274},"Input event device, such as /dev/input/event0",[1269,1342,1343,1346,1349],{},[1288,1344,1345],{"align":1274},"Bluetooth device",[1288,1347,1348],{"align":1274},"rfcomm*",[1288,1350,1351],{"align":1274},"Bluetooth serial device, such as /dev/rfcomm0",[15,1353,1354],{},"(3). Apply the rules.",[15,1356,1357],{},"Enter the following command in the terminal:",[27,1359,1361],{"className":442,"code":1360,"language":444,"meta":32,"style":32},"\n# Ubuntu用下方命令\nsudo service udev reload\nsudo service udev restart\n\n#Fedora用下方命令\nsudo udevadm control --reload\nsudo udevadm trigger\n",[22,1362,1363,1367,1372,1385,1396,1400,1405,1418],{"__ignoreMap":32},[36,1364,1365],{"class":38,"line":39},[36,1366,1042],{"emptyLinePlaceholder":1041},[36,1368,1369],{"class":38,"line":45},[36,1370,1371],{"class":864},"# Ubuntu用下方命令\n",[36,1373,1374,1376,1379,1382],{"class":38,"line":51},[36,1375,790],{"class":451},[36,1377,1378],{"class":459}," service",[36,1380,1381],{"class":459}," udev",[36,1383,1384],{"class":459}," reload\n",[36,1386,1387,1389,1391,1393],{"class":38,"line":57},[36,1388,790],{"class":451},[36,1390,1378],{"class":459},[36,1392,1381],{"class":459},[36,1394,1395],{"class":459}," restart\n",[36,1397,1398],{"class":38,"line":63},[36,1399,1042],{"emptyLinePlaceholder":1041},[36,1401,1402],{"class":38,"line":69},[36,1403,1404],{"class":864},"#Fedora用下方命令\n",[36,1406,1407,1409,1412,1415],{"class":38,"line":75},[36,1408,790],{"class":451},[36,1410,1411],{"class":459}," udevadm",[36,1413,1414],{"class":459}," control",[36,1416,1417],{"class":455}," --reload\n",[36,1419,1420,1422,1424],{"class":38,"line":81},[36,1421,790],{"class":451},[36,1423,1411],{"class":459},[36,1425,1426],{"class":459}," trigger\n",[15,1428,1429],{},"Simply re-plug the device.",[15,1431,1432],{},"(4). Test",[15,1434,1357],{},[27,1436,1438],{"className":442,"code":1437,"language":444,"meta":32,"style":32},"ll /dev | grep ttyUSB\n",[22,1439,1440],{"__ignoreMap":32},[36,1441,1442,1445,1448,1451,1454],{"class":38,"line":39},[36,1443,1444],{"class":451},"ll",[36,1446,1447],{"class":459}," /dev",[36,1449,1450],{"class":1176}," |",[36,1452,1453],{"class":451}," grep",[36,1455,1456],{"class":459}," ttyUSB\n",[15,1458,1459],{},"The execution result is as follows:",[15,1461,1462],{},[288,1463],{"alt":32,"src":1464},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image349.webp",[15,1466,1467],{},[288,1468],{"alt":32,"src":1469},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image350.webp",[15,1471,1472,1473,1476],{},"You can also plug and unplug the USB device multiple times. You'll notice that the number n in the device port ",[22,1474,1475],{},"ttyUSBn"," changes, but the alias always points to the corresponding USB device. At this point, you can use the alias to associate the USB device you need.",[15,1478,1479],{},[255,1480,1481],{},"Disadvantages:",[15,1483,1484],{},"The above implementation also has certain limitations. When Ubuntu is connected to two or more USB devices of the same model, since the device IDs are identical, this implementation will only take effect for one of them. In such cases, the second strategy is needed to achieve port binding.",[248,1486,1488],{"id":1487},"bind-ports-based-on-host-hardware-multiple-identical-devices","Bind ports based on host hardware (multiple identical devices)",[15,1490,1491,1493],{},[255,1492,1098],{}," Two identical radar units are now connected to the unmanned vehicle, one at the front and one at the rear. Please bind ports for both.",[15,1495,1496,1498],{},[255,1497,1104],{}," The USB interface of the host to which a USB device is connected also has its own \"identifier,\" which can be used to implement port binding.",[15,1500,1501],{},[255,1502,1110],{},[15,1504,1505],{},"(1). Check the KERNELS of the USB interface on the connected host.",[15,1507,1508],{},"Run the following command to view the USB information of the first radar:",[27,1510,1512],{"className":442,"code":1511,"language":444,"meta":32,"style":32},"udevadm info --attribute-walk --name=/dev/ttyUSB0 | grep KERNELS\nudevadm info --attribute-walk --name=/dev/ttyACM0 | grep KERNELS\n",[22,1513,1514,1535],{"__ignoreMap":32},[36,1515,1516,1519,1522,1525,1528,1530,1532],{"class":38,"line":39},[36,1517,1518],{"class":451},"udevadm",[36,1520,1521],{"class":459}," info",[36,1523,1524],{"class":455}," --attribute-walk",[36,1526,1527],{"class":455}," --name=/dev/ttyUSB0",[36,1529,1450],{"class":1176},[36,1531,1453],{"class":451},[36,1533,1534],{"class":459}," KERNELS\n",[36,1536,1537,1539,1541,1543,1546,1548,1550],{"class":38,"line":45},[36,1538,1518],{"class":451},[36,1540,1521],{"class":459},[36,1542,1524],{"class":455},[36,1544,1545],{"class":455}," --name=/dev/ttyACM0",[36,1547,1450],{"class":1176},[36,1549,1453],{"class":451},[36,1551,1534],{"class":459},[15,1553,1554],{},[288,1555],{"alt":32,"src":1556},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image351.webp",[15,1558,1559],{},"Run the following command to view the USB information of the second LiDAR:",[27,1561,1563],{"className":442,"code":1562,"language":444,"meta":32,"style":32},"udevadm info --attribute-walk --name=/dev/ttyUSB1 | grep KERNELS\n",[22,1564,1565],{"__ignoreMap":32},[36,1566,1567,1569,1571,1573,1576,1578,1580],{"class":38,"line":39},[36,1568,1518],{"class":451},[36,1570,1521],{"class":459},[36,1572,1524],{"class":455},[36,1574,1575],{"class":455}," --name=/dev/ttyUSB1",[36,1577,1450],{"class":1176},[36,1579,1453],{"class":451},[36,1581,1534],{"class":459},[15,1583,1584,1585,1588,1589,1592,1593,1596],{},"Comparing the results across different KERNELS, the first radar port address is ",[22,1586,1587],{},"KERNELS==1-1.3:1.0",", and the second radar port address is ",[22,1590,1591],{},"KERNELS==1-1.4:1.0",". This data can be used as a \"",[255,1594,1595],{},"unique identifier","\" for different ports.",[15,1598,1138],{},[15,1600,1601,1602,1604],{},"In the ",[22,1603,1144],{}," directory, create a new file named xxx.rules (customize the filename) and enter the following content:",[27,1606,1607],{"className":442,"code":1148,"language":444,"meta":32,"style":32},[22,1608,1609],{"__ignoreMap":32},[36,1610,1611,1613,1615],{"class":38,"line":39},[36,1612,790],{"class":451},[36,1614,1157],{"class":459},[36,1616,1160],{"class":459},[27,1618,1620],{"className":442,"code":1619,"language":444,"meta":32,"style":32},"KERNEL==\"ttyUSB*\", KERNELS==\"1-1.3:1.0\", MODE:=\"0777\", SYMLINK+=\"rplidar_front\"\nKERNEL==\"ttyUSB*\", KERNELS==\"1-1.4:1.0\", MODE:=\"0777\", SYMLINK+=\"rplidar_back\"\n",[22,1621,1622,1651],{"__ignoreMap":32},[36,1623,1624,1626,1628,1630,1633,1635,1638,1641,1643,1646,1648],{"class":38,"line":39},[36,1625,1173],{"class":1063},[36,1627,1177],{"class":1176},[36,1629,1180],{"class":459},[36,1631,1632],{"class":1063}," KERNELS",[36,1634,1177],{"class":1176},[36,1636,1637],{"class":459},"=\"1-1.3:1.0\",",[36,1639,1640],{"class":451}," MODE:",[36,1642,1177],{"class":459},[36,1644,1645],{"class":451},"\"0777\"",[36,1647,1192],{"class":451},[36,1649,1650],{"class":459}," SYMLINK+=\"rplidar_front\"\n",[36,1652,1653,1655,1657,1659,1661,1663,1666,1668,1670,1672,1674],{"class":38,"line":45},[36,1654,1173],{"class":1063},[36,1656,1177],{"class":1176},[36,1658,1180],{"class":459},[36,1660,1632],{"class":1063},[36,1662,1177],{"class":1176},[36,1664,1665],{"class":459},"=\"1-1.4:1.0\",",[36,1667,1640],{"class":451},[36,1669,1177],{"class":459},[36,1671,1645],{"class":451},[36,1673,1192],{"class":451},[36,1675,1676],{"class":459}," SYMLINK+=\"rplidar_back\"\n",[15,1678,1354],{},[15,1680,1357],{},[27,1682,1683],{"className":442,"code":1360,"language":444,"meta":32,"style":32},[22,1684,1685,1689,1693,1703,1713,1717,1721,1731],{"__ignoreMap":32},[36,1686,1687],{"class":38,"line":39},[36,1688,1042],{"emptyLinePlaceholder":1041},[36,1690,1691],{"class":38,"line":45},[36,1692,1371],{"class":864},[36,1694,1695,1697,1699,1701],{"class":38,"line":51},[36,1696,790],{"class":451},[36,1698,1378],{"class":459},[36,1700,1381],{"class":459},[36,1702,1384],{"class":459},[36,1704,1705,1707,1709,1711],{"class":38,"line":57},[36,1706,790],{"class":451},[36,1708,1378],{"class":459},[36,1710,1381],{"class":459},[36,1712,1395],{"class":459},[36,1714,1715],{"class":38,"line":63},[36,1716,1042],{"emptyLinePlaceholder":1041},[36,1718,1719],{"class":38,"line":69},[36,1720,1404],{"class":864},[36,1722,1723,1725,1727,1729],{"class":38,"line":75},[36,1724,790],{"class":451},[36,1726,1411],{"class":459},[36,1728,1414],{"class":459},[36,1730,1417],{"class":455},[36,1732,1733,1735,1737],{"class":38,"line":81},[36,1734,790],{"class":451},[36,1736,1411],{"class":459},[36,1738,1426],{"class":459},[15,1740,1429],{},[15,1742,1432],{},[15,1744,1745],{},"Enter the following command in the terminal, and the output will be as follows:",[27,1747,1748],{"className":442,"code":1437,"language":444,"meta":32,"style":32},[22,1749,1750],{"__ignoreMap":32},[36,1751,1752,1754,1756,1758,1760],{"class":38,"line":39},[36,1753,1444],{"class":451},[36,1755,1447],{"class":459},[36,1757,1450],{"class":1176},[36,1759,1453],{"class":451},[36,1761,1456],{"class":459},[15,1763,1764],{},[288,1765],{"alt":32,"src":1766},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image352.webp",[15,1768,1769],{},"At this point, you can use an alias to associate the USB device you need.",[15,1771,1772,1775],{},[255,1773,1774],{},"Drawbacks:"," USB devices must be connected to the host's designated ports; otherwise, port binding may fail or logic errors may occur. (Additionally, adding new devices may cause port changes.)",[248,1777,1779],{"id":1778},"bind-ports-based-on-other-attributes","Bind ports based on other attributes",[15,1781,1782],{},"(1). View the information about the USB ports on the connected host.",[27,1784,1786],{"className":442,"code":1785,"language":444,"meta":32,"style":32},"udevadm info -a -p $(udevadm info -q path -n /dev/ttyACM0)\nudevadm info -a -p $(udevadm info -q path -n /dev/ttyUSB0)\n",[22,1787,1788,1821],{"__ignoreMap":32},[36,1789,1790,1792,1794,1797,1799,1802,1804,1806,1809,1812,1815,1818],{"class":38,"line":39},[36,1791,1518],{"class":451},[36,1793,1521],{"class":459},[36,1795,1796],{"class":455}," -a",[36,1798,840],{"class":455},[36,1800,1801],{"class":1063}," $(",[36,1803,1518],{"class":451},[36,1805,1521],{"class":459},[36,1807,1808],{"class":455}," -q",[36,1810,1811],{"class":459}," path",[36,1813,1814],{"class":455}," -n",[36,1816,1817],{"class":459}," /dev/ttyACM0",[36,1819,1820],{"class":1063},")\n",[36,1822,1823,1825,1827,1829,1831,1833,1835,1837,1839,1841,1843,1846],{"class":38,"line":45},[36,1824,1518],{"class":451},[36,1826,1521],{"class":459},[36,1828,1796],{"class":455},[36,1830,840],{"class":455},[36,1832,1801],{"class":1063},[36,1834,1518],{"class":451},[36,1836,1521],{"class":459},[36,1838,1808],{"class":455},[36,1840,1811],{"class":459},[36,1842,1814],{"class":455},[36,1844,1845],{"class":459}," /dev/ttyUSB0",[36,1847,1820],{"class":1063},[15,1849,1850],{},[288,1851],{"alt":32,"src":1852},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image353.webp",[15,1854,1855],{},"These data will not change, so they can be used as identifiers.",[15,1857,1138],{},[15,1859,1601,1860,1604],{},[22,1861,1144],{},[27,1863,1864],{"className":442,"code":1148,"language":444,"meta":32,"style":32},[22,1865,1866],{"__ignoreMap":32},[36,1867,1868,1870,1872],{"class":38,"line":39},[36,1869,790],{"class":451},[36,1871,1157],{"class":459},[36,1873,1160],{"class":459},[27,1875,1877],{"className":442,"code":1876,"language":444,"meta":32,"style":32},"KERNEL==\"ttyACM*\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"55d4\", ATTRS{serial}==\"0001\", MODE:=\"0777\", SYMLINK+=\"ttyACM_Lidar\"\nKERNEL==\"ttyACM*\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"55d4\", ATTRS{serial}==\"0002\", MODE:=\"0777\", SYMLINK+=\"ttyACM_MCU\"\nKERNEL==\"ttyUSB*\", ATTRS{idVendor}==\"1a86\", ATTRS{idProduct}==\"7523\", MODE:=\"0777\", SYMLINK+=\"ttyUSB_IMU\"\n",[22,1878,1879,1907,1933],{"__ignoreMap":32},[36,1880,1881,1883,1885,1888,1890,1892,1894,1896,1899,1902,1904],{"class":38,"line":39},[36,1882,1173],{"class":1063},[36,1884,1177],{"class":1176},[36,1886,1887],{"class":459},"=\"ttyACM*\",",[36,1889,1183],{"class":451},[36,1891,1186],{"class":459},[36,1893,1216],{"class":451},[36,1895,1192],{"class":451},[36,1897,1898],{"class":459}," ATTRS{idProduct}==\"55d4\",",[36,1900,1901],{"class":459}," ATTRS{serial}==\"0001\",",[36,1903,1198],{"class":459},[36,1905,1906],{"class":459}," SYMLINK+=\"ttyACM_Lidar\"\n",[36,1908,1909,1911,1913,1915,1917,1919,1921,1923,1925,1928,1930],{"class":38,"line":45},[36,1910,1173],{"class":1063},[36,1912,1177],{"class":1176},[36,1914,1887],{"class":459},[36,1916,1183],{"class":451},[36,1918,1186],{"class":459},[36,1920,1216],{"class":451},[36,1922,1192],{"class":451},[36,1924,1898],{"class":459},[36,1926,1927],{"class":459}," ATTRS{serial}==\"0002\",",[36,1929,1198],{"class":459},[36,1931,1932],{"class":459}," SYMLINK+=\"ttyACM_MCU\"\n",[36,1934,1935,1937,1939,1941,1943,1945,1947,1949,1951,1953],{"class":38,"line":51},[36,1936,1173],{"class":1063},[36,1938,1177],{"class":1176},[36,1940,1180],{"class":459},[36,1942,1183],{"class":451},[36,1944,1186],{"class":459},[36,1946,1216],{"class":451},[36,1948,1192],{"class":451},[36,1950,1221],{"class":459},[36,1952,1198],{"class":459},[36,1954,1955],{"class":459}," SYMLINK+=\"ttyUSB_IMU\"\n",[15,1957,1354],{},[15,1959,1357],{},[27,1961,1962],{"className":442,"code":1360,"language":444,"meta":32,"style":32},[22,1963,1964,1968,1972,1982,1992,1996,2000,2010],{"__ignoreMap":32},[36,1965,1966],{"class":38,"line":39},[36,1967,1042],{"emptyLinePlaceholder":1041},[36,1969,1970],{"class":38,"line":45},[36,1971,1371],{"class":864},[36,1973,1974,1976,1978,1980],{"class":38,"line":51},[36,1975,790],{"class":451},[36,1977,1378],{"class":459},[36,1979,1381],{"class":459},[36,1981,1384],{"class":459},[36,1983,1984,1986,1988,1990],{"class":38,"line":57},[36,1985,790],{"class":451},[36,1987,1378],{"class":459},[36,1989,1381],{"class":459},[36,1991,1395],{"class":459},[36,1993,1994],{"class":38,"line":63},[36,1995,1042],{"emptyLinePlaceholder":1041},[36,1997,1998],{"class":38,"line":69},[36,1999,1404],{"class":864},[36,2001,2002,2004,2006,2008],{"class":38,"line":75},[36,2003,790],{"class":451},[36,2005,1411],{"class":459},[36,2007,1414],{"class":459},[36,2009,1417],{"class":455},[36,2011,2012,2014,2016],{"class":38,"line":81},[36,2013,790],{"class":451},[36,2015,1411],{"class":459},[36,2017,1426],{"class":459},[15,2019,2020,2021],{},"Simply reconnect the device, or ",[255,2022,2023],{},"restart the system directly.",[15,2025,1432],{},[15,2027,2028,2029,2032,2033,2036],{},"In the terminal, enter the following command: ",[22,2030,2031],{},"ll /dev","|Run ",[22,2034,2035],{},"grep ttyUSB",", the result is as follows:",[15,2038,2039],{},[288,2040],{"alt":32,"src":2041},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/image354.webp",[15,2043,1769],{},[15,2045,2046,2048],{},[255,2047,1774],{}," Some devices may not have a serial port number, etc.",[248,2050,2052],{"id":2051},"other-precautions","Other Precautions",[15,2054,2055,2056,2058,2059,2062,2063,2066,2067,2070,2071,2073],{},"Not all USB device port numbers follow the ",[22,2057,1475],{}," format. For example, an Arduino's port number might be ",[22,2060,2061],{},"ttyACMn",", and for a USB camera, a single device corresponds to two port numbers: ",[22,2064,2065],{},"videon"," and ",[22,2068,2069],{},"video(n+1)",". Typically, the ",[22,2072,2065],{}," port is used to enable the camera device, and that is also the interface that needs to be associated when binding.",[15,2075,2076,2077,2080,2081,2084,2085,2087,2088,686,2091,2094,2095,2098,2099,2098,2102,2098,2105,2108],{},"However, regardless of which USB device is connected externally, and no matter which of the two methods mentioned above is used for port binding, the underlying principle is similar — only the implementation details differ. If an external Arduino device is connected, then in the rules file, ",[22,2078,2079],{},"KERNEL==\"ttyUSB*\""," should be changed to ",[22,2082,2083],{},"KERNEL==\"ttyACM*\"",". If a USB camera is connected externally, then in the rules file, ",[22,2086,2079],{}," should be changed to a format similar to ",[22,2089,2090],{},"KERNEL==\"video[0,2,4,6]\"",[22,2092,2093],{},"video[0,2,4,6]"," indicates that the bindable ports are ",[22,2096,2097],{},"video0"," or ",[22,2100,2101],{},"video2",[22,2103,2104],{},"video4",[22,2106,2107],{},"video6",".",[10,2110,2112],{"id":2111},"linux-partition-gui-tool","Linux Partition GUI Tool",[27,2114,2116],{"className":366,"code":2115,"language":368,"meta":369,"style":32},"sudo apt install gparted\nsudo dnf install gparted\n",[22,2117,2118,2123],{"__ignoreMap":32},[36,2119,2120],{"class":38,"line":39},[36,2121,2122],{},"sudo apt install gparted\n",[36,2124,2125],{"class":38,"line":45},[36,2126,2127],{},"sudo dnf install gparted\n",[10,2129,2131],{"id":2130},"mount-the-intranet-webpage","Mount the intranet webpage",[15,2133,2134],{},"You can mount local web pages on the router, or on other devices within the same local network segment, and even mount them locally.",[15,2136,2137],{},"Below, using an Android device as an example: since Android devices cannot directly open HTML files for now, we can host the HTML on a local server and then view it through a browser.",[15,2139,2140],{},"Since the Android system is based on the Linux kernel, we can download an app called Termux to run some Linux commands:",[15,2142,2143],{},[2144,2145,2146],"a",{"href":2146,"rel":2147},"https://github.com/termux/termux-app",[2148],"nofollow",[15,2150,2151],{},"First, after opening the app, update the software cache:",[27,2153,2155],{"className":442,"code":2154,"language":444,"meta":32,"style":32},"pkg update\n",[22,2156,2157],{"__ignoreMap":32},[36,2158,2159,2162],{"class":38,"line":39},[36,2160,2161],{"class":451},"pkg",[36,2163,2164],{"class":459}," update\n",[15,2166,2167],{},"Then change the source.",[27,2169,2171],{"className":442,"code":2170,"language":444,"meta":32,"style":32},"nano $PREFIX/etc/apt/sources.list\n",[22,2172,2173],{"__ignoreMap":32},[36,2174,2175,2177,2180],{"class":38,"line":39},[36,2176,848],{"class":451},[36,2178,2179],{"class":1063}," $PREFIX",[36,2181,2182],{"class":459},"/etc/apt/sources.list\n",[15,2184,2185],{},"Replace the content of this file with the following:",[27,2187,2189],{"className":442,"code":2188,"language":444,"meta":32,"style":32},"deb https://mirrors.bfsu.edu.cn/termux/termux-packages-24 stable main\n",[22,2190,2191],{"__ignoreMap":32},[36,2192,2193,2196,2199,2202],{"class":38,"line":39},[36,2194,2195],{"class":451},"deb",[36,2197,2198],{"class":459}," https://mirrors.bfsu.edu.cn/termux/termux-packages-24",[36,2200,2201],{"class":459}," stable",[36,2203,2204],{"class":459}," main\n",[1231,2206,2207,2234],{},[279,2208,2209,2210,2212,2213],{},"If you are using the ",[22,2211,848],{}," editor:",[1231,2214,2215,2221,2227],{},[279,2216,2217,2218,2108],{},"Save the file as ",[22,2219,2220],{},"Ctrl+O",[279,2222,2223,2224,2108],{},"Confirm the filename according to ",[22,2225,2226],{},"Enter",[279,2228,2229,2230,2233],{},"Press ",[22,2231,2232],{},"Ctrl+X"," to exit the editor.",[279,2235,2209,2236,2212,2239],{},[22,2237,2238],{},"vim",[1231,2240,2241,2247],{},[279,2242,2229,2243,2246],{},[22,2244,2245],{},"Esc"," to exit edit mode.",[279,2248,2229,2249,2252],{},[22,2250,2251],{},":wq"," to save and exit.",[15,2254,2255],{},"Next, update the software sources again:",[27,2257,2259],{"className":442,"code":2258,"language":444,"meta":32,"style":32},"pkg update && pkg upgrade\n",[22,2260,2261],{"__ignoreMap":32},[36,2262,2263,2265,2268,2271,2273],{"class":38,"line":39},[36,2264,2161],{"class":451},[36,2266,2267],{"class":459}," update",[36,2269,2270],{"class":1063}," && ",[36,2272,2161],{"class":451},[36,2274,2275],{"class":459}," upgrade\n",[15,2277,2278],{},"Install Python",[27,2280,2282],{"className":442,"code":2281,"language":444,"meta":32,"style":32},"pkg install python3\n",[22,2283,2284],{"__ignoreMap":32},[36,2285,2286,2288,2290],{"class":38,"line":39},[36,2287,2161],{"class":451},[36,2289,796],{"class":459},[36,2291,2292],{"class":459}," python3\n",[15,2294,2295],{},[255,2296,2297],{},"Accessing Device Storage via Termux",[15,2299,2300],{},"If the file is on an Android device, you can use Termux's file manager to access the device's storage:",[27,2302,2304],{"className":442,"code":2303,"language":444,"meta":32,"style":32},"termux-setup-storage\n",[22,2305,2306],{"__ignoreMap":32},[36,2307,2308],{"class":38,"line":39},[36,2309,2303],{"class":451},[276,2311,2312],{},[279,2313,2314,2317,2318],{},[255,2315,2316],{},"Navigate to the directory containing the HTML file",":",[276,2319,2320],{},[279,2321,2322,2323,2326],{},"Use the ",[22,2324,2325],{},"cd"," command to enter the directory where the HTML file is located:",[27,2328,2330],{"className":442,"code":2329,"language":444,"meta":32,"style":32},"cd ~/your_html_folder\n",[22,2331,2332],{"__ignoreMap":32},[36,2333,2334,2336],{"class":38,"line":39},[36,2335,2325],{"class":455},[36,2337,2338],{"class":459}," ~/your_html_folder\n",[276,2340,2341],{"start":45},[279,2342,2343,2346,2351,2370],{},[255,2344,2345],{},"Start Python HTTP Server",[276,2347,2348],{},[279,2349,2350],{},"Run the following command to start a simple HTTP server:",[27,2352,2354],{"className":442,"code":2353,"language":444,"meta":32,"style":32},"python3 -m http.server 8000\n",[22,2355,2356],{"__ignoreMap":32},[36,2357,2358,2361,2364,2367],{"class":38,"line":39},[36,2359,2360],{"class":451},"python3",[36,2362,2363],{"class":455}," -m",[36,2365,2366],{"class":459}," http.server",[36,2368,2369],{"class":455}," 8000\n",[276,2371,2372],{"start":51},[279,2373,2374,2375,2108],{},"This will start a web server on port ",[22,2376,2377],{},"8000",[1231,2379,2380],{},[279,2381,2382],{},"After starting the server, Termux will display log information, for example:",[27,2384,2386],{"className":442,"code":2385,"language":444,"meta":32,"style":32},"Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...\n",[22,2387,2388],{"__ignoreMap":32},[36,2389,2390,2393,2396,2399,2402,2405,2408],{"class":38,"line":39},[36,2391,2392],{"class":451},"Serving",[36,2394,2395],{"class":459}," HTTP",[36,2397,2398],{"class":459}," on",[36,2400,2401],{"class":455}," 0.0.0.0",[36,2403,2404],{"class":459}," port",[36,2406,2407],{"class":455}," 8000",[36,2409,2410],{"class":1063}," (http://0.0.0.0:8000/) ...\n",[1231,2412,2413],{},[279,2414,2415],{},"This indicates the server has started successfully.",[15,2417,2418],{},[255,2419,2420],{},"Accessing an HTML file in a browser",[276,2422,2423],{},[279,2424,2425,2428,2429,2434,2443],{},[255,2426,2427],{},"Accessing on the same device"," :",[276,2430,2431],{},[279,2432,2433],{},"Open the browser on your Android device (such as Chrome) and enter the following address:",[27,2435,2437],{"className":442,"code":2436,"language":444,"meta":32,"style":32},"http://localhost:8000\n",[22,2438,2439],{"__ignoreMap":32},[36,2440,2441],{"class":38,"line":39},[36,2442,2436],{"class":451},[276,2444,2445],{"start":51},[279,2446,2447,2448,2451],{},"If the HTML file contains ",[22,2449,2450],{},"index.html",", it will load automatically; otherwise, you need to manually click the file link.",[10,2453,2455],{"id":2454},"rustdesk","RustDesk",[248,2457,2459],{"id":2458},"rustdesk-unattended-remote-control","RustDesk unattended remote control",[15,2461,2462],{},"Currently, RustDesk cannot perform unattended operations under Wayland, so we need to disable login passwords, screen lock, and sleep/standby entirely.",[2464,2465,2467],"h5",{"id":2466},"set-up-kde6-automatic-login","Set up KDE6 automatic login",[276,2469,2470],{},[279,2471,2472],{},"You can first check your SDDM type.",[27,2474,2476],{"className":442,"code":2475,"language":444,"meta":32,"style":32},"ls /usr/share/xsessions/\n",[22,2477,2478],{"__ignoreMap":32},[36,2479,2480,2483],{"class":38,"line":39},[36,2481,2482],{"class":451},"ls",[36,2484,2485],{"class":459}," /usr/share/xsessions/\n",[27,2487,2489],{"className":442,"code":2488,"language":444,"meta":32,"style":32},"ls /usr/share/wayland-sessions/\n",[22,2490,2491],{"__ignoreMap":32},[36,2492,2493,2495],{"class":38,"line":39},[36,2494,2482],{"class":451},[36,2496,2497],{"class":459}," /usr/share/wayland-sessions/\n",[15,2499,2500],{},"Check which one outputs content; the folder that outputs content is the SDDM you have. For example, if xsessions outputs content, then it's the X11 SDDM. If wayland-sessions outputs content, then you have the Wayland SDDM.",[276,2502,2503],{"start":45},[279,2504,2505],{},"Edit the SDDM configuration:",[27,2507,2509],{"className":442,"code":2508,"language":444,"meta":32,"style":32},"sudo nano /etc/sddm.conf\n",[22,2510,2511],{"__ignoreMap":32},[36,2512,2513,2515,2518],{"class":38,"line":39},[36,2514,790],{"class":451},[36,2516,2517],{"class":459}," nano",[36,2519,2520],{"class":459}," /etc/sddm.conf\n",[15,2522,2523,2524,2527],{},"At the very top of the file, there is a section called ",[36,2525,2526],{},"Autologin",". Add the following content underneath it:",[27,2529,2531],{"className":442,"code":2530,"language":444,"meta":32,"style":32},"[Autologin]\nUser=你的用户名\nSession=plasma.desktop   # 或 plasma.desktop（X11），方案一可用 Wayland\n",[22,2532,2533,2538,2548],{"__ignoreMap":32},[36,2534,2535],{"class":38,"line":39},[36,2536,2537],{"class":1063},"[Autologin]\n",[36,2539,2540,2543,2545],{"class":38,"line":45},[36,2541,2542],{"class":1063},"User",[36,2544,1177],{"class":1176},[36,2546,2547],{"class":459},"你的用户名\n",[36,2549,2550,2553,2555,2558],{"class":38,"line":51},[36,2551,2552],{"class":1063},"Session",[36,2554,1177],{"class":1176},[36,2556,2557],{"class":459},"plasma.desktop",[36,2559,2560],{"class":864},"   # 或 plasma.desktop（X11），方案一可用 Wayland\n",[276,2562,2563],{"start":51},[279,2564,2565],{},"Save and exit, then restart SDDM:",[27,2567,2569],{"className":442,"code":2568,"language":444,"meta":32,"style":32},"sudo systemctl restart sddm\n",[22,2570,2571],{"__ignoreMap":32},[36,2572,2573,2575,2578,2581],{"class":38,"line":39},[36,2574,790],{"class":451},[36,2576,2577],{"class":459}," systemctl",[36,2579,2580],{"class":459}," restart",[36,2582,2583],{"class":459}," sddm\n",[15,2585,2586],{},"✅ Automatically logs into the desktop after startup, no password required.",[2464,2588,2590],{"id":2589},"to-disable-the-lock-screen-in-kde6-system-settings","To disable the lock screen in KDE6 system settings:",[15,2592,2593,2594,2597],{},"Open ",[255,2595,2596],{},"System Settings → Screen Locking",".\nDisable auto-lock\nTurn off the screen / Screen saver lock\nThis way, RustDesk can directly control the desktop after booting, without being blocked by the lock screen.",[2464,2599,2601],{"id":2600},"disable-sleep-system-settings-power-management","Disable sleep system settings → Power Management",[15,2603,2604],{},"Disable \"Sleep\" or \"Auto-Suspend\"\nEnsure the computer stays online at all times, so RustDesk can be remotely controlled at any time.\nIf you must use hibernation, you can disable it in the BIOS settings to ensure the device connects to the network immediately upon startup.",[248,2606,2608],{"id":2607},"rustdesk-self-hosted-server","RustDesk self-hosted server",[2464,2610,2612],{"id":2611},"install-on-the-server-side","Install on the server side",[2614,2615,2617],"h6",{"id":2616},"command-line-method","Command line method",[276,2619,2620],{},[279,2621,2622,2623],{},"Open the official website: ",[2144,2624,2625],{"href":2625,"rel":2626},"https://rustdesk.com/docs/zh-cn/self-host/",[2148],[15,2628,2629],{},[288,2630],{"alt":2631,"src":2632},"alt text","https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768144998052.webp",[276,2634,2635],{"start":45},[279,2636,2637],{},"To access the server where you need to install RustDesk via SSH.",[27,2639,2641],{"className":442,"code":2640,"language":444,"meta":32,"style":32},"ssh tungchiahui@10.0.0.4\n",[22,2642,2643],{"__ignoreMap":32},[36,2644,2645,2647],{"class":38,"line":39},[36,2646,452],{"class":451},[36,2648,2649],{"class":459}," tungchiahui@10.0.0.4\n",[15,2651,2652],{},[288,2653],{"alt":2631,"src":2654},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768145500558.webp",[276,2656,2657],{"start":51},[279,2658,2659],{},"Use the command from method two.",[15,2661,2662],{},[288,2663],{"alt":2631,"src":2664},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768145605588.webp",[27,2666,2668],{"className":442,"code":2667,"language":444,"meta":32,"style":32},"wget https://raw.githubusercontent.com/techahold/rustdeskinstall/master/install.sh\nchmod +x install.sh\n./install.sh\n",[22,2669,2670,2678,2687],{"__ignoreMap":32},[36,2671,2672,2675],{"class":38,"line":39},[36,2673,2674],{"class":451},"wget",[36,2676,2677],{"class":459}," https://raw.githubusercontent.com/techahold/rustdeskinstall/master/install.sh\n",[36,2679,2680,2682,2684],{"class":38,"line":45},[36,2681,906],{"class":451},[36,2683,909],{"class":459},[36,2685,2686],{"class":459}," install.sh\n",[36,2688,2689],{"class":38,"line":51},[36,2690,2691],{"class":451},"./install.sh\n",[15,2693,2694],{},"See the next section for the ./install.sh setup.",[276,2696,2697],{"start":57},[279,2698,2699],{},"Configuring and Viewing the KEY",[15,2701,2702,2703,2706,2707,2108],{},"Here, if you want to directly use a public IP, select ",[22,2704,2705],{},"1)IP","; if you are using DDNS or similar to bind a domain name to an IP address, select ",[22,2708,2709],{},"2)",[15,2711,2712],{},[288,2713],{"alt":2631,"src":2714},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768148704646.webp",[15,2716,2717,2718,2108],{},"This selects ",[22,2719,2720],{},"2)No",[15,2722,2723],{},[288,2724],{"alt":2631,"src":2725},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768148806049.webp",[15,2727,2728],{},"Copy this KEY down, as you'll need it later during software configuration.",[15,2730,2731],{},[288,2732],{"alt":2631,"src":2733},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768148866392.webp",[276,2735,2736],{"start":63},[279,2737,2738,2739,2744],{},"Configure the firewall\n",[276,2740,2741],{},[279,2742,2743],{},"If you are a Debian-based system\nInstall the firewall",[27,2745,2747],{"className":442,"code":2746,"language":444,"meta":32,"style":32},"sudo apt install ufw\n",[22,2748,2749],{"__ignoreMap":32},[36,2750,2751,2753,2755,2757],{"class":38,"line":39},[36,2752,790],{"class":451},[36,2754,793],{"class":459},[36,2756,796],{"class":459},[36,2758,2759],{"class":459}," ufw\n",[15,2761,2762],{},"Configure the firewall\n```bash\nsudo ufw allow 22",[27,2764,2769],{"className":2765,"code":2767,"language":2768},[2766],"language-text","ufw allow 21114:21119/tcp\nufw allow 21116/udp\nsudo ufw enable\n```\n2. If you are using a RHEL-based system\n","text",[22,2770,2767],{"__ignoreMap":32},[15,2772,2773,2774],{},"Install the firewall\n",[22,2775,2776],{},"bash     # 如果你是RHEL系     sudo dnf install firewalld     sudo systemctl enable --now firewalld     ",[15,2778,2779],{},"Configure the firewall\n```bash\nsudo firewall-cmd --add-port=22/tcp --permanent\nsudo firewall-cmd --reload",[27,2781,2784],{"className":2782,"code":2783,"language":2768},[2766],"sudo firewall-cmd --add-port=21114-21119/tcp --permanent\nsudo firewall-cmd --reload\n\nsudo firewall-cmd --add-port=21116/udp --permanent\nsudo firewall-cmd --reload\n\nsudo systemctl enable --now firewalld\n```\n",[22,2785,2783],{"__ignoreMap":32},[2614,2787,2789],{"id":2788},"_1panel-method","1Panel method",[276,2791,2792],{},[279,2793,2794],{},"Search for RustDesk in the panel and install it.",[15,2796,2797],{},[288,2798],{"alt":2631,"src":2799},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768146100467.webp",[276,2801,2802],{"start":45},[279,2803,2804],{},"Configure the firewall",[15,2806,2807],{},[288,2808],{"alt":2631,"src":2809},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768146828373.webp",[15,2811,2812,2813,2816,2819],{},"Add a few ports.\n",[288,2814],{"alt":2631,"src":2815},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768146848849.webp",[288,2817],{"alt":2631,"src":2818},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768146858053.webp",[288,2820],{"alt":2631,"src":2821},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768146876612.webp",[276,2823,2824],{"start":51},[279,2825,2826,2827],{},"View KEY\n",[288,2828],{"alt":2631,"src":2829},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768146996637.webp",[15,2831,2832],{},"Copy KEY",[15,2834,2835],{},[288,2836],{"alt":2631,"src":2837},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768147034654.webp",[2464,2839,2841],{"id":2840},"after-setting-up-your-own-server-configure-the-rustdesk-software","After setting up your own server, configure the RustDesk software.",[276,2843,2844],{},[279,2845,2846],{},"PC side",[15,2848,2849],{},[288,2850],{"alt":2631,"src":2851},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768147115389.webp",[15,2853,2854],{},[288,2855],{"alt":2631,"src":2856},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768147204480.webp",[15,2858,2859,2860],{},"If \"Ready\" appears, the configuration is successful.\n",[288,2861],{"alt":2631,"src":2862},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768147547538.webp",[276,2864,2865],{"start":45},[279,2866,2867],{},"Mobile",[15,2869,2870],{},[288,2871],{"alt":2631,"src":2872},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768149138253.webp",[15,2874,2875],{},[288,2876],{"alt":2631,"src":2877},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768149199158.webp",[2614,2879,2881],{"id":2880},"points-to-note","Points to note",[15,2883,2884],{},"If you are using a home internal network server, you also need to configure the router to allow the corresponding ports.",[15,2886,2887,2888],{},"Find the OpenWrt firewall settings and click Add.\n",[288,2889],{"alt":2631,"src":2890},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768148357743.webp",[15,2892,2893],{},[288,2894],{"alt":2631,"src":2895},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768148378543.webp",[15,2897,2898],{},[288,2899],{"alt":2631,"src":2900},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2024/03/30/1768148398594.webp",[15,2902,2903],{},"Only then can your server port be truly and successfully unblocked.",[2905,2906,2907],"style",{},"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 .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}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}",{"title":32,"searchDepth":45,"depth":45,"links":2909},[2910,2911,2912,2913,2914,2915,2916],{"id":12,"depth":51,"text":13},{"id":245,"depth":51,"text":246},{"id":765,"depth":51,"text":766},{"id":1025,"depth":51,"text":1026},{"id":2111,"depth":51,"text":2112},{"id":2130,"depth":51,"text":2131},{"id":2454,"depth":51,"text":2455},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo","9",9000000,"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教程/ch9-其他操作",false,null,"en-US","en-us",{},{"title":5,"description":32},"/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo","_i18n/en-us/wiki/2024-03-30-Linux教程/ch9-其他操作","d-_N9LJNMjQpXp7lvDNYVzOc02_bw4-1YPI9LB2-1_M",[2937,2943,2949,2955,2961,2967,2973,2979,2985,2986],{"path":2938,"stem":2939,"title":2940,"date":2920,"chapter":2941,"chapterSort":2942,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/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":2944,"stem":2945,"title":2946,"date":2920,"chapter":2947,"chapterSort":2948,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/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":2950,"stem":2951,"title":2952,"date":2920,"chapter":2953,"chapterSort":2954,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/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":2956,"stem":2957,"title":2958,"date":2920,"chapter":2959,"chapterSort":2960,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/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":2962,"stem":2963,"title":2964,"date":2920,"chapter":2965,"chapterSort":2966,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/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":2968,"stem":2969,"title":2970,"date":2920,"chapter":2971,"chapterSort":2972,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/en-us/wiki/2024-03-30-linux-jiao-cheng/ch6-qi-ta-ke-xuan-pei-zhi","_i18n/en-us/wiki/2024-03-30-Linux教程/ch6-其他可选配置","Other optional configurations","6",6000000,{"path":2974,"stem":2975,"title":2976,"date":2920,"chapter":2977,"chapterSort":2978,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/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":2980,"stem":2981,"title":2982,"date":2920,"chapter":2983,"chapterSort":2984,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},"/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":2917,"stem":2934,"title":5,"date":2920,"chapter":2918,"chapterSort":2919,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":2927},{"path":2923,"stem":2987,"title":2988,"date":2920,"chapter":2928,"chapterSort":2989,"docKey":2922,"docRoot":2923,"docTitle":2924,"isWikiDoc":1041,"isWikiIndex":1041},"_i18n/en-us/wiki/2024-03-30-Linux教程/index","Linux tutorial",0,{"variants":2991},[2992,2993,2996,2999,3002],{"path":2917,"localeSlug":2930,"i18nKey":2926},{"path":2994,"localeSlug":2995,"i18nKey":2926},"/zh-hant/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo","zh-hant",{"path":2997,"localeSlug":2998,"i18nKey":2926},"/zh-hk/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo","zh-hk",{"path":3000,"localeSlug":3001,"i18nKey":2926},"/zh-tw/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo","zh-tw",{"path":3003,"localeSlug":3004,"i18nKey":2926},"/zh-cn/wiki/2024-03-30-linux-jiao-cheng/ch9-qi-ta-cao-zuo","zh-cn",[2917,2933,2994,2933,2997,2933,3000,2933,3003,2933],1780671796625]