O serviço personalizado (systemd) não será executado na inicialização

2

Estou criando um quiosque não interativo em Raspbian. Eu eviscerado tudo o que eu não queria - gerentes de desktop, vários serviços gráficos etc - o script começa X, um gerenciador de desktop absolutamente mínima e Cromo, mais de uma dúzia de linhas que combater todos os tipos de recursos da tela cega e outra dúzia ou mais que impedem Cromo do spam de vários pop-ups.

Eu também criei o arquivo unitário para o systemd.

Funciona bem quando iniciado a partir da linha de comando. Ele funciona bem em systemctl start chromium.service . Mas para a vida de mim eu não consigo que ele seja iniciado automaticamente na inicialização.

Primeiro, o arquivo de unidade /etc/systemd/system/chromium.service :

[Unit]
Description=Start X and Chromium in kiosk mode
After=getty.target

[Service]
Type=idle
User=pi
ExecStart=/home/pi/start-chromium

[Install]
WantedBy=graphical.target

O destino gráfico é o padrão:

 root@raspberrypi:/home/pi# ls -l /etc/systemd/system/default.target
 lrwxrwxrwx 1 root root 36 lut 24 17:00 /etc/systemd/system/default.target -> /lib/systemd/system/graphical.target

Já está ativado:

  root@raspberrypi:/home/pi# ls -l /etc/systemd/system/graphical.target.wants/
  lrwxrwxrwx 1 root root 36 lut 24 16:28 chromium.service -> /etc/systemd/system/chromium.service

As mensagens de inicialização mostram que o graphical.target foi alcançado; o serviço personalizado deve caber entre getty e graphical.target:

[  OK  ] Started Terminate Plymouth Boot Screen.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
         Starting Serial Getty on ttyAMA0...
[  OK  ] Started Serial Getty on ttyAMA0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started LSB: Start NTP daemon.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Mas o serviço personalizado não aparece em nenhum lugar nos registros.

-- The start-up result is done.
lut 24 14:06:03 raspberrypi systemd[1]: Starting Getty on tty1...
-- Subject: Unit [email protected] has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit [email protected] has begun starting up.
lut 24 14:06:03 raspberrypi systemd[1]: Started Getty on tty1.
-- Subject: Unit [email protected] has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit [email protected] has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:03 raspberrypi systemd[1]: Starting Serial Getty on ttyAMA0...
-- Subject: Unit [email protected] has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit [email protected] has begun starting up.
lut 24 14:06:03 raspberrypi systemd[1]: Started Serial Getty on ttyAMA0.
-- Subject: Unit [email protected] has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit [email protected] has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:03 raspberrypi systemd[1]: Starting Login Prompts.
-- Subject: Unit getty.target has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit getty.target has begun starting up.
lut 24 14:06:03 raspberrypi systemd[1]: Reached target Login Prompts.
-- Subject: Unit getty.target has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit getty.target has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:03 raspberrypi ntpd[492]: ntpd [email protected] Mon Nov  2 04:29:47 UTC 2015 (1)
lut 24 14:06:03 raspberrypi ntpd[499]: proto: precision = 0.833 usec
lut 24 14:06:03 raspberrypi ntp[464]: Starting NTP server: ntpd.
lut 24 14:06:03 raspberrypi systemd[1]: Started LSB: Start NTP daemon.
-- Subject: Unit ntp.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit ntp.service has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:03 raspberrypi systemd[1]: Starting Multi-User System.
-- Subject: Unit multi-user.target has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit multi-user.target has begun starting up.
lut 24 14:06:03 raspberrypi systemd[1]: Reached target Multi-User System.
-- Subject: Unit multi-user.target has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit multi-user.target has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:03 raspberrypi systemd[1]: Starting Graphical Interface.
-- Subject: Unit graphical.target has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit graphical.target has begun starting up.
lut 24 14:06:03 raspberrypi systemd[1]: Reached target Graphical Interface.
-- Subject: Unit graphical.target has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Editar:

root@raspberrypi:/home/pi# journalctl -u chromium
-- Logs begin at śro 2016-02-24 14:05:59 UTC, end at czw 2016-02-25 09:11:23 UTC. --

root@raspberrypi:/home/pi# systemctl status chromium
● chromium.service - Start X and Chromium in kiosk mode
   Loaded: loaded (/etc/systemd/system/chromium.service; enabled)
   Active: inactive (dead)

(isso não muda, se eu faço o script terminar de enviar todos os seus processos para o segundo plano, ou aguardo no final (removendo o & do último comando que é chromium-browser ).

O que estou perdendo?

Edit2: Journal com Loglevel = debug. Há algumas entradas sobre o Chromium perto de 13:32:45, mas elas não revelam nada para mim.

lut 24 14:06:15 raspberrypi systemd[520]: pam_unix(systemd-user:session): session opened for user pi by (uid=0)
lut 24 14:06:15 raspberrypi systemd[520]: Executing: /lib/systemd/systemd --user
lut 24 14:06:15 raspberrypi systemd[520]: Starting Paths.
-- Subject: Unit UNIT has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has begun starting up.
lut 24 14:06:15 raspberrypi systemd[520]: Reached target Paths.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:15 raspberrypi systemd[520]: Starting Timers.
-- Subject: Unit UNIT has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has begun starting up.
lut 24 14:06:15 raspberrypi systemd[520]: Reached target Timers.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:15 raspberrypi systemd[520]: Starting Sockets.
-- Subject: Unit UNIT has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has begun starting up.
lut 24 14:06:15 raspberrypi systemd[520]: Reached target Sockets.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:15 raspberrypi systemd[520]: Starting Basic System.
-- Subject: Unit UNIT has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has begun starting up.
lut 24 14:06:15 raspberrypi systemd[520]: Reached target Basic System.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:15 raspberrypi systemd[520]: Starting Default.
-- Subject: Unit UNIT has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has begun starting up.
lut 24 14:06:15 raspberrypi systemd[520]: Reached target Default.
-- Subject: Unit UNIT has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit UNIT has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:15 raspberrypi systemd[520]: Startup finished in 66ms.
-- Subject: System start-up is now complete
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- All system services necessary queued for starting at boot have been
-- successfully started. Note that this does not mean that the machine is
-- now idle as services might still be busy with completing start-up.
--
-- Kernel start-up required KERNEL_USEC microseconds.
--
-- Initial RAM disk start-up required INITRD_USEC microseconds.
--
-- Userspace start-up required 66978 microseconds.
lut 24 14:06:15 raspberrypi systemd[1]: Got notification message for unit [email protected]
lut 24 14:06:15 raspberrypi systemd[1]: [email protected]: Got notification message from PID 520 (READY=1...)
lut 24 14:06:15 raspberrypi systemd[1]: [email protected]: got READY=1
lut 24 14:06:15 raspberrypi systemd[1]: [email protected] changed start -> running
lut 24 14:06:15 raspberrypi systemd[1]: Job [email protected]/start finished, result=done
lut 24 14:06:15 raspberrypi systemd[1]: Started User Manager for UID 1000.
-- Subject: Unit [email protected] has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit [email protected] has finished starting up.
--
-- The start-up result is done.
lut 24 14:06:15 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobRemoved cookie=109 reply_cookie=0 error=n/a
lut 24 14:06:15 raspberrypi systemd[1]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RemoveMatch cookie=110 reply_cookie=0 error=n/a
lut 24 14:06:15 raspberrypi systemd[1]: [email protected]: got STATUS=Startup finished in 66ms.
lut 24 14:06:15 raspberrypi systemd[1]: Got notification message for unit [email protected]
lut 24 14:06:15 raspberrypi systemd[1]: [email protected]: got STATUS=Startup finished in 66ms.
lut 24 14:06:15 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/user_401000_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=111 reply_cookie=0 error=n/a
lut 24 14:06:15 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/user_401000_2eservice interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=112 reply_cookie=0 error=n/a
lut 24 14:06:15 raspberrypi systemd[1]: [email protected]: Got notification message from PID 520 (READY=1...)
lut 24 14:06:16 raspberrypi dhcpcd[415]: eth0: carrier acquired
lut 24 14:06:16 raspberrypi kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
lut 24 14:06:16 raspberrypi kernel: smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
lut 24 14:06:16 raspberrypi dhcpcd[415]: DUID 00:01:00:01:1e:4c:e0:00:b8:27:eb:8e:4a:e3
lut 24 14:06:16 raspberrypi dhcpcd[415]: eth0: IAID eb:8e:4a:e3
lut 24 14:06:16 raspberrypi ntpd_intres[512]: host name not found: 0.debian.pool.ntp.org
lut 24 14:06:16 raspberrypi ntpd_intres[512]: host name not found: 1.debian.pool.ntp.org
lut 24 14:06:16 raspberrypi ntpd_intres[512]: host name not found: 2.debian.pool.ntp.org
lut 24 14:06:16 raspberrypi ntpd_intres[512]: host name not found: 3.debian.pool.ntp.org
lut 24 14:06:16 raspberrypi dhcpcd[415]: eth0: using static address 192.168.0.79/24
lut 24 14:06:16 raspberrypi dhcpcd[415]: eth0: adding route to 192.168.0.0/24
lut 24 14:06:16 raspberrypi dhcpcd[415]: eth0: adding default route via 192.168.0.222
lut 24 14:06:16 raspberrypi avahi-daemon[400]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.0.79.
lut 24 14:06:16 raspberrypi avahi-daemon[400]: New relevant interface eth0.IPv4 for mDNS.
lut 24 14:06:16 raspberrypi avahi-daemon[400]: Registering new address record for 192.168.0.79 on eth0.IPv4.
lut 24 14:06:16 raspberrypi systemd[1]: Accepted new private connection.
lut 24 14:06:16 raspberrypi systemd[1]: Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1/unit/nscd_2eservice interface=org.freedesktop.DBus.Properties member=GetAll cookie=1 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Failed to load configuration for nscd.service: No such file or directory
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=method_return sender=n/a destination=n/a object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Collecting nscd.service
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitNew cookie=2 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitNew cookie=113 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitRemoved cookie=3 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitRemoved cookie=114 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Got disconnect on private connection.
lut 24 14:06:16 raspberrypi systemd[1]: Accepted new private connection.
lut 24 14:06:16 raspberrypi systemd[1]: Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1/unit/unbound_2eservice interface=org.freedesktop.DBus.Properties member=GetAll cookie=1 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Failed to load configuration for unbound.service: No such file or directory
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=method_return sender=n/a destination=n/a object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Collecting unbound.service
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitNew cookie=2 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitNew cookie=115 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitRemoved cookie=3 reply_cookie=0 error=n/a
lut 24 14:06:16 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitRemoved cookie=116 reply_cookie=0 error=n/a
lut 24 14:06:17 raspberrypi systemd[1]: Got disconnect on private connection.
lut 24 14:06:17 raspberrypi dhcpcd[415]: eth0: soliciting an IPv6 router
lut 24 14:06:19 raspberrypi ntpd[506]: Listen normally on 4 eth0 192.168.0.79 UDP 123
lut 24 14:06:19 raspberrypi ntpd[506]: Listen normally on 5 eth0 fe80::ba27:ebff:fe8e:4ae3 UDP 123
lut 24 14:06:19 raspberrypi ntpd[506]: peers refreshed
lut 24 14:06:21 raspberrypi ntpd_intres[512]: DNS 0.debian.pool.ntp.org -> 94.154.96.7
lut 24 14:06:21 raspberrypi ntpd_intres[512]: DNS 1.debian.pool.ntp.org -> 195.46.37.22
lut 24 14:06:21 raspberrypi ntpd_intres[512]: DNS 2.debian.pool.ntp.org -> 193.106.216.30
lut 24 14:06:21 raspberrypi ntpd_intres[512]: DNS 3.debian.pool.ntp.org -> 194.177.4.2
lut 25 13:26:13 raspberrypi systemd[1]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
lut 25 13:26:13 raspberrypi systemd[520]: Time has been changed
-- Subject: Time change
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The system clock has been changed to REALTIME microseconds after January 1st, 1970.
lut 25 13:26:13 raspberrypi systemd[1]: Set up TFD_TIMER_CANCEL_ON_SET timerfd.
lut 25 13:26:13 raspberrypi systemd[1]: systemd-tmpfiles-clean.timer: time change, recalculating next elapse.
lut 25 13:26:13 raspberrypi systemd[1]: systemd-tmpfiles-clean.timer: Monotonic timer elapses in 14min 26.563229s.
lut 25 13:26:13 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/systemd_2dtmpfiles_2dclean_2etimer interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=117 reply_cookie=0 error=n/a
lut 25 13:26:13 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/systemd_2dtmpfiles_2dclean_2etimer interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=118 reply_cookie=0 error=n/a
lut 25 13:26:13 raspberrypi systemd[1]: Got notification message for unit systemd-journald.service
lut 25 13:26:13 raspberrypi systemd[1]: systemd-journald.service: Got notification message from PID 105 (WATCHDOG=1...)
lut 25 13:26:13 raspberrypi systemd[1]: systemd-journald.service: got WATCHDOG=1
lut 25 13:26:13 raspberrypi systemd[1]: Got notification message for unit systemd-journald.service
lut 25 13:26:13 raspberrypi systemd[1]: systemd-journald.service: Got notification message from PID 105 (WATCHDOG=1...)
lut 25 13:26:13 raspberrypi systemd-journal[105]: Forwarding to syslog missed 159 messages.
-- Subject: One or more messages could not be forwarded to syslog
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- One or more messages could not be forwarded to the syslog service
-- running side-by-side with journald. This usually indicates that the
-- syslog implementation has not been able to keep up with the speed of
-- messages queued.
lut 25 13:26:13 raspberrypi systemd[1]: systemd-journald.service: got WATCHDOG=1
lut 25 13:26:14 raspberrypi dhcpcd[415]: eth0: no IPv6 Routers available
lut 25 13:26:33 raspberrypi systemd[1]: Got notification message for unit systemd-logind.service
lut 25 13:26:33 raspberrypi systemd[1]: systemd-logind.service: Got notification message from PID 396 (WATCHDOG=1...)
lut 25 13:26:33 raspberrypi systemd[1]: systemd-logind.service: got WATCHDOG=1
lut 25 13:26:33 raspberrypi systemd[1]: Got notification message for unit systemd-logind.service
lut 25 13:26:33 raspberrypi systemd[1]: systemd-logind.service: Got notification message from PID 396 (WATCHDOG=1...)

 [...lots of these...]

lut 25 13:32:30 raspberrypi systemd[1]: systemd-logind.service: Got notification message from PID 396 (WATCHDOG=1...)
lut 25 13:32:30 raspberrypi systemd[1]: systemd-logind.service: got WATCHDOG=1
lut 25 13:32:30 raspberrypi systemd[1]: Got message type=method_call sender=:1.1 destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=StartTransientUnit cookie=27 reply_cookie=0 error=n/a
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=GetConnectionUnixUser cookie=119 reply_cookie=0 error=n/a
lut 25 13:32:30 raspberrypi systemd[1]: Failed to load configuration for session-c2.scope: No such file or directory
lut 25 13:32:30 raspberrypi systemd[1]: Trying to enqueue job session-c2.scope/start/fail
lut 25 13:32:30 raspberrypi systemd[1]: Installed new job session-c2.scope/start as 194
lut 25 13:32:30 raspberrypi systemd[1]: Enqueued job session-c2.scope/start as 194
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch cookie=120 reply_cookie=0 error=n/a
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=method_return sender=n/a destination=:1.1 object=n/a interface=n/a member=n/a cookie=122 reply_cookie=27 error=n/a
lut 25 13:32:30 raspberrypi systemd-logind[396]: New session c2 of user pi.
-- Subject: A new session c2 has been created for user pi
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID c2 has been created for the user pi.
--
-- The leading process of the session is 632.
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitNew cookie=123 reply_cookie=0 error=n/a
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobNew cookie=124 reply_cookie=0 error=n/a
lut 25 13:32:30 raspberrypi systemd[1]: Starting Session c2 of user pi.
-- Subject: Unit session-c2.scope has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-c2.scope has begun starting up.
lut 25 13:32:30 raspberrypi systemd[1]: session-c2.scope changed dead -> running
lut 25 13:32:30 raspberrypi systemd[1]: Job session-c2.scope/start finished, result=done
lut 25 13:32:30 raspberrypi systemd[1]: Started Session c2 of user pi.
-- Subject: Unit session-c2.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-c2.scope has finished starting up.
--
-- The start-up result is done.
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RemoveMatch cookie=126 reply_cookie=0 error=n/a
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/session_2dc2_2escope interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=127 reply_cookie=0 error=n/a
lut 25 13:32:30 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1/unit/session_2dc2_2escope interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=128 reply_cookie=0 error=n/a
lut 25 13:32:31 raspberrypi systemd[1]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=GetNameOwner cookie=121 reply_cookie=0 error=n/a
lut 25 13:32:31 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=JobRemoved cookie=125 reply_cookie=0 error=n/a
lut 25 13:32:33 raspberrypi sudo[657]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/su
lut 25 13:32:33 raspberrypi sudo[657]: pam_unix(sudo:session): session opened for user root by pi(uid=0)
lut 25 13:32:33 raspberrypi su[664]: Successful su for root by root
lut 25 13:32:33 raspberrypi su[664]: + /dev/pts/0 root:root
lut 25 13:32:33 raspberrypi su[664]: pam_unix(su:session): session opened for user root by pi(uid=0)
lut 25 13:32:33 raspberrypi systemd[1]: Got message type=signal sender=org.freedesktop.DBus destination=n/a object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameOwnerChanged cookie=31 reply_cookie=0 error=n/a
lut 25 13:32:45 raspberrypi systemd[1]: Accepted new private connection.
lut 25 13:32:45 raspberrypi systemd[1]: Got message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1/unit/chromium_2eservice interface=org.freedesktop.DBus.Properties member=GetAll cookie=1 reply_cookie=0 error=n/a
lut 25 13:32:45 raspberrypi systemd[1]: Looking for unit files in (higher priority first):
lut 25 13:32:45 raspberrypi systemd[1]:         /etc/systemd/system
lut 25 13:32:45 raspberrypi systemd[1]:         /run/systemd/system
lut 25 13:32:45 raspberrypi systemd[1]:         /usr/local/lib/systemd/system
lut 25 13:32:45 raspberrypi systemd[1]:         /lib/systemd/system
lut 25 13:32:45 raspberrypi systemd[1]:         /usr/lib/systemd/system
lut 25 13:32:45 raspberrypi systemd[1]: Looking for SysV init scripts in:
lut 25 13:32:45 raspberrypi systemd[1]:         /etc/init.d
lut 25 13:32:45 raspberrypi systemd[1]: Looking for SysV rcN.d links in:
lut 25 13:32:45 raspberrypi systemd[1]:         /etc
lut 25 13:32:45 raspberrypi systemd[1]: Sent message type=method_return sender=n/a destination=n/a object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
lut 25 13:32:45 raspberrypi systemd[1]: Collecting chromium.service
lut 25 13:32:45 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitNew cookie=2 reply_cookie=0 error=n/a
lut 25 13:32:45 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitNew cookie=129 reply_cookie=0 error=n/a
lut 25 13:32:45 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitRemoved cookie=3 reply_cookie=0 error=n/a
lut 25 13:32:45 raspberrypi systemd[1]: Sent message type=signal sender=n/a destination=n/a object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=UnitRemoved cookie=130 reply_cookie=0 error=n/a
lut 25 13:32:45 raspberrypi systemd[1]: Got disconnect on private connection.
lut 25 13:33:13 raspberrypi systemd[1]: Got notification message for unit systemd-journald.service
lut 25 13:33:13 raspberrypi systemd[1]: systemd-journald.service: Got notification message from PID 105 (WATCHDOG=1...)
lut 25 13:33:13 raspberrypi systemd[1]: systemd-journald.service: got WATCHDOG=1
lut 25 13:33:13 raspberrypi systemd[1]: Got notification message for unit systemd-journald.service
lut 25 13:33:13 raspberrypi systemd[1]: systemd-journald.service: Got notification message from PID 105 (WATCHDOG=1...)
lut 25 13:33:13 raspberrypi systemd[1]: systemd-journald.service: got WATCHDOG=1
    
por SF. 24.02.2016 / 18:10

2 respostas

1

Eu aumentaria a verbosidade de registro para obter mais informações. Então, grep para o cromo no arquivo de log e nos mostre os snippets apropriados.

Para aumentar a verbosidade, em /etc/systemd/system.conf

LogLevel=debug           <--- Uncomment this line and use "debug" (default: commented and "info")

Eu suspeito que sua linha After= esteja incorreta? Suas configurações atuais indicam que o cromo é iniciado após o getty, mas é ativado primeiro (leia Instalações) com o sistema gráfico.

Você deseja que o cromo inicie depois que o sistema gráfico foi iniciado (na verdade, o cromo exigiria um sistema gráfico, então sugiro adicionar um Requires= após a linha After= ) e o alvo não deve ser getty.target , mas graphical.target para as linhas After= e Requires= .

Esperançosamente, aumentar a verbosidade do registro irá revelar isso. Eu não tentei o que você está tentando, então isso é puramente uma sugestão teórica baseada na minha interpretação do manual.

epílogo, O Install= parece funcionar, desde quando você inicia manualmente (depois que o sistema gráfico é iniciado) você diz que funciona bem.

    
por 25.02.2016 / 14:11
-3
  1. Crie o serviço personalizado como um script
  2. abra o arquivo /etc/rc.d/rc.local
  3. No final do ponto de linha do arquivo, o local do arquivo de script   sh / {caminho para o arquivo} / {nome do arquivo} .sh
  4. lembre-se de /etc/rc.d/rc.local e / {path to file} / {nome do arquivo} .sh deve ter permissão de executável

    Nota: /etc/rc.d/rc.local usado pelo sistema linux para executar o script personalizado de última hora

por 24.02.2016 / 19:53