Wiki

版本 12 (熊 代军, 2022-10-19 09:49)

1 1 熊 代军
h1. Wiki
2 1 熊 代军
3 2 熊 代军
1. 下载ssh-tar
4 3 熊 代军
2. download autossh.service
5 3 熊 代军
3. open terminal
6 4 熊 代军
3. 
7 4 熊 代军
<pre>
8 4 熊 代军
sudo apt-get install autossh
9 4 熊 代军
</pre>
10 3 熊 代军
4.
11 3 熊 代军
<pre>
12 3 熊 代军
sudo cp Downloads/ssh-tar ./
13 3 熊 代军
</pre>
14 3 熊 代军
5. 
15 3 熊 代军
<pre>
16 3 熊 代军
tar -xf ssh-tar
17 3 熊 代军
</pre> 
18 3 熊 代军
6.
19 3 熊 代军
<pre>
20 3 熊 代军
sudo cp Downloads/autossh.service /usr/lib/systemd/system/
21 3 熊 代军
sudo systemctl daemon-reload
22 5 熊 代军
sudo systemctl enable --now autossh
23 3 熊 代军
</pre> 
24 7 熊 代军
7. 编辑文件 /etc/rc.local 
25 6 熊 代军
<pre>
26 6 熊 代军
sudo vi /etc/rc.local
27 6 熊 代军
</pre>
28 8 熊 代军
在倒数第2行(exit 0 上一行)添加:
29 1 熊 代军
<pre>
30 8 熊 代军
nohup /home/linaro/Downloads/rc522_test/rc522_spi &
31 6 熊 代军
</pre>
32 9 熊 代军
33 10 熊 代军
h1. 安装配置vnc
34 11 熊 代军
35 9 熊 代军
参考 https://blog.csdn.net/agang1986/article/details/121957493
36 9 熊 代军
<pre>
37 9 熊 代军
sudo apt-get install x11vnc
38 9 熊 代军
</pre>
39 9 熊 代军
40 9 熊 代军
安装完成后,在应用搜索栏里搜索x11vnc可以找到对应程序,双击打开,第一个界面是设置端口号,默认是5900,直接点击ok到下一步。
41 9 熊 代军
然后第二个界面设置登录密码,注意此界面的Accept Connections需要勾选上。后面直接确认即可。
42 9 熊 代军
43 9 熊 代军
配置vnc服务开机自启动
44 9 熊 代军
1、在 /lib/systemd/system/目录下创建文件并修改权限
45 9 熊 代军
<pre>
46 9 熊 代军
$ cd /lib/systemd/system/
47 9 熊 代军
$ sudo touch x11vnc.service
48 9 熊 代军
$ sudo chmod 644 x11vnc.service
49 9 熊 代军
</pre>
50 9 熊 代军
51 9 熊 代军
2、编辑文件x11vnc.service,内容如下:
52 9 熊 代军
<pre>
53 12 熊 代军
vi x11vnc.service
54 12 熊 代军
</pre>
55 12 熊 代军
<pre>
56 9 熊 代军
[Unit]
57 9 熊 代军
Description=x11vnc service
58 9 熊 代军
After=multi-user.target
59 9 熊 代军
StartLimitIntervalSec=0
60 9 熊 代军
61 9 熊 代军
[Service]
62 9 熊 代军
Type=simple
63 9 熊 代军
Restart=always
64 9 熊 代军
RestartSec=1
65 9 熊 代军
User=debian //登录用户名
66 9 熊 代军
ExecStart=/usr/bin/x11vnc -display :1 -o /home/vnc.log
67 9 熊 代军
68 9 熊 代军
[Install]
69 9 熊 代军
WantedBy=multi-user.target
70 9 熊 代军
</pre>