0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

raspberrypiでopenframeworksを自動起動させるときのsystemdの設定

Posted at

/etc/systemd/system/myApp.service

[Unit]
Description=My App Service
After=multi-user.target
Wants=multi-user.target

[Service]
ExecStartPre=/bin/sleep 30
Environment="DISPLAY=:0"
ExecStart=/home/pi/startupApp.sh
WorkingDirectory=/home/pi/of_v0.12.0_linuxarmv6l_release/apps/Project/Appname/
Restart=always
User=pi

[Install]
WantedBy=multi-user.target

startupApp.sh

#!/bin/bash
export DISPLAY=:0
cd /home/pi/of_v0.12.0_linuxarmv6l_release/apps/Project/Appname
make run
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?