sydtemd n'offre pas de terminal lors du lancement .py
Posté : mer. 16 janv. 2019 20:05
mon programme de robot est en pyhton et fonctionne
son lancement par etc/rc.local se passe sans problème avec les print et input dans le terminal de la ligne de commande
mais l'appel de etc/rc.local par le service rc-local.service (si dessous) ne débouche sur aucun terminal pour les Print et input ! alors que le sytemctl status de rc-local.service (ci dessous dessous) ..... des idées ?
---------------------------------------------------------------------------------------------------------------------------------------
[Unit]
Description= rc-local.service
#ConditionPathExists=/dev/tty0
[Service]
Environment=DISPLAY=:0
Type=forking
ExecStart=/etc/rc.local
TimeoutSec=0
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty0
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
------------------------------------------------------------------------------------------------------------------------------------------
systemctl status rc-local.service
● rc-local.service
Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset:
Drop-In: /lib/systemd/system/rc-local.service.d
└─debian.conf
Active: activating (start) since Wed 2019-01-16 17:17:54 CET; 12min ago
Cntrl PID: 305 (rc.local)
CGroup: /system.slice/rc-local.service
├─305 /bin/sh -e /etc/rc.local
└─318 /usr/bin/python3.5 /home/pi/Documents/robot/robot.py
janv. 16 17:17:54 komputileto systemd[1]: Starting rc-local.service...
janv. 16 17:29:15 komputileto systemd[1]: [/etc/systemd/system/rc-local.service:
janv. 16 17:29:53 komputileto systemd[1]: [/etc/systemd/system/rc-local.service:
lines 1-13/13 (END)
son lancement par etc/rc.local se passe sans problème avec les print et input dans le terminal de la ligne de commande
mais l'appel de etc/rc.local par le service rc-local.service (si dessous) ne débouche sur aucun terminal pour les Print et input ! alors que le sytemctl status de rc-local.service (ci dessous dessous) ..... des idées ?
---------------------------------------------------------------------------------------------------------------------------------------
[Unit]
Description= rc-local.service
#ConditionPathExists=/dev/tty0
[Service]
Environment=DISPLAY=:0
Type=forking
ExecStart=/etc/rc.local
TimeoutSec=0
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty0
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
------------------------------------------------------------------------------------------------------------------------------------------
systemctl status rc-local.service
● rc-local.service
Loaded: loaded (/etc/systemd/system/rc-local.service; enabled; vendor preset:
Drop-In: /lib/systemd/system/rc-local.service.d
└─debian.conf
Active: activating (start) since Wed 2019-01-16 17:17:54 CET; 12min ago
Cntrl PID: 305 (rc.local)
CGroup: /system.slice/rc-local.service
├─305 /bin/sh -e /etc/rc.local
└─318 /usr/bin/python3.5 /home/pi/Documents/robot/robot.py
janv. 16 17:17:54 komputileto systemd[1]: Starting rc-local.service...
janv. 16 17:29:15 komputileto systemd[1]: [/etc/systemd/system/rc-local.service:
janv. 16 17:29:53 komputileto systemd[1]: [/etc/systemd/system/rc-local.service:
lines 1-13/13 (END)