2014-09-10 98 views

回答

1

首先回家並按ctrl + h現在,您可以看到隱藏的文件夾,如果自動啓動文件夾可用,單擊.config文件夾意味着只需創建帶有桌面擴展名的文件,例如:auto.dsesktop。

型終端下面的命令

gedit .config/autostart/auto.desktop 

,並進入auto.destop文件以下命令

[Desktop Entry] 
Type=Application 
Exec=python filename.py #this is execution part so u can modify whatever u needs 
Hidden=false 
NoDisplay=false 
X-GNOME-Autostart-enabled=true 
Name=<Name_to_be_displayed> 
Comment=<optional comment> 
0

標記您的文件作爲可執行文件(chmod +x file.py)和Startup Applications(找到它在短跑),你可以添加一個新的啓動程序,並通過瀏覽它path_to_file>/<file>.py添加文件和會在登錄使其可執行。

您還可以create a cron job

+0

我的回答一直是公認的答案同樣的效果:它仍然創造了'〜/.config/autostart/file.desktop'文件。我知道你希望通過創建它來控制更多的控制,並且可能會添加更多的選項,但這並不意味着我的答案是錯誤的。 – afrendeiro 2014-09-10 10:15:20

相關問題