From 621b21651f0dafbd825e5cc7580e985d21599f12 Mon Sep 17 00:00:00 2001
From: "li.zhenye"
Date: Fri, 5 Aug 2022 15:27:34 +0800
Subject: [PATCH] =?UTF-8?q?[docs]=20=E6=B7=BB=E5=8A=A0=E4=BA=86=E8=87=AA?=
=?UTF-8?q?=E5=8A=A8=E9=83=A8=E5=88=86=E7=9A=84=E8=AF=B4=E6=98=8E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/README.md b/README.md
index 3b7868d..db6170b 100644
--- a/README.md
+++ b/README.md
@@ -255,3 +255,44 @@ jmpy -i "tobacco_color" [-o output dir]
加密后的文件默认存储在 dist/project_name/ 下
最后,根据测试的pyarmor并没有起到让人满意的加密效果,这令人很担忧,所以我暂时不购买测试。
+
+# 开机自启动
+
+要带有图形化界面的开机自启动不能把程序放到init.d底下,不然的话图形化界面还没起来就启动程序,会崩掉。
+
+## 以.Desktop文件形式
+
+ 1. 首先写一个`~/run.sh`,内容如下:
+
+ ```shel
+ conda activate tobacco/deepo
+ python /home//tobacco_color/main.py -os # 这里的os表示only spectral,还有oc,不加就是都用上。
+ ```
+
+ 2. 然后,写一个.desktop文件
+
+ ```shel
+ [Desktop Entry]
+ Type=Application
+ Name=Tobacco
+ Exec=/home//run.sh
+ Icon=/home//Pictures/albert # 图标
+ Comment=烟草识别程序
+ X-GNOME-Autostart-enabled=true
+ ```
+
+3. 把这个.desktop文件放到自启动目录下:`/home//.config/autostart`
+
+## 图形化形式
+
+上一步当中run.sh是无论如何都要有的
+
+
+
+中文里边叫开机自启动,
+
+
+
+甚至可以加入延时:
+
+