Raspberry Pi3 bで起動時に自動的にファイルを開く?

Raspberry Pi3 bで起動時に自動的にファイルを開く?

LibreOffice Writerで作成し、文書に保存したテキストファイルがRaspberry Piを起動したときに自動的に開くようにしたいと思います。私はこれがあることを知っていますhttps://www.raspberrypi.org/documentation/linux/usage/systemd.mdしかし、これは私には効果がありません。これを行う方法を知っている人はいますか?

以下は私が作成したサービスで、リンクの手順に従いました。

[Unit] Description=test  
After=network.target 

[Service]  
ExecStart=/usr/bin/libreoffice-u testing.odt   
WorkingDirectory=/home/pi/Documents  
StandardOutput=inherit  
StandardError=inherit   
Restart=always  
User=pi  

[Install]  
WantedBy=multi-user.target

ベストアンサー1

LibreOfficeを起動する予定の場合は、アプリケーションの起動をXDGに移動し、デスクトップ環境の起動後に自動的に起動するようにできます。

[Desktop Entry] 
Name=File 
Type=Application
Exec=libreoffice --writer /full/path/to/odt 
Terminal=false

源泉:https://developer.toradex.com/knowledge-base/how-to-autorun-application-at-the-start-up-in-linux#desktop_Files

おすすめ記事