質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.49%
ログイン

ログインは、ユーザーがコンピューターシステムにアクセスするプロセスの事を呼びます。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

Q&A

0回答

1358閲覧

ラズパイ2 watchdogタイマー後の自動ログインがうまくいかない

autograph

総合スコア10

ログイン

ログインは、ユーザーがコンピューターシステムにアクセスするプロセスの事を呼びます。

Raspberry Pi

Raspberry Piは、ラズベリーパイ財団が開発した、名刺サイズのLinuxコンピュータです。 学校で基本的なコンピュータ科学の教育を促進することを意図しています。

0グッド

0クリップ

投稿2020/01/03 07:09

編集2020/01/04 10:40

前提・実現したいこと

ラズパイ2にてwatchdogタイマーが働いた後に、ラズパイをリセットさせて
再起動後に自動ログインしてGUIのプログラムを起動させたい

発生している問題・エラーメッセージ

テストでwatchdogタイマーを働かせるためにフォーク爆弾(:(){ :|:&};:)で
ラズパイがリセットする事は確認しましたが、
再起動後に必ず自動ログイン(piユーザー)出来ない。自動ログインしたりパスワードを求められたりする。
どなたか、watchdogタイマー後に必ず自動ログイン出来る方法を教えてください。

試したこと

〇watchdogタイマーの設定
/boot/config.txt に
dtparam=watchdog=on を追加

/etc/modprobe.d/bcm2709-wdt.conf のファイルを作成後、次の1行を記入
options bcm2709_wdt heartbeat=30 nowayout=0

/etc/systemd/system.conf のファイルを
RuntimeWatchdogSec=30 に設定

〇ラズパイ設定
/etc/systemd/system/getty.target.wants/getty@tty1.service を編集
ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM

/etc/lightdm/lightdm.confファイルを
autologin-user=pi
autologin-user-timeout=0

p

1〇getty@.serviceファイル 2# SPDX-License-Identifier: LGPL-2.1+ 3# 4# This file is part of systemd. 5# 6# systemd is free software; you can redistribute it and/or modify it 7# under the terms of the GNU Lesser General Public License as published by 8# the Free Software Foundation; either version 2.1 of the License, or 9# (at your option) any later version. 10 11[Unit] 12Description=Getty on %I 13Documentation=man:agetty(8) man:systemd-getty-generator(8) 14Documentation=http://0pointer.de/blog/projects/serial-console.html 15After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target 16After=rc-local.service 17 18# If additional gettys are spawned during boot then we should make 19# sure that this is synchronized before getty.target, even though 20# getty.target didn't actually pull it in. 21Before=getty.target 22IgnoreOnIsolate=yes 23 24# IgnoreOnIsolate causes issues with sulogin, if someone isolates 25# rescue.target or starts rescue.service from multi-user.target or 26# graphical.target. 27Conflicts=rescue.service 28Before=rescue.service 29 30# On systems without virtual consoles, don't start any getty. Note 31# that serial gettys are covered by serial-getty@.service, not this 32# unit. 33ConditionPathExists=/dev/tty0 34 35[Service] 36# the VT is cleared by TTYVTDisallocate 37# The '-o' option value tells agetty to replace 'login' arguments with an 38# option to preserve environment (-p), followed by '--' for safety, and then 39# the entered username. 40#ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM 41ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM 42Type=idle 43Restart=always 44RestartSec=0 45UtmpIdentifier=%I 46TTYPath=/dev/%I 47TTYReset=yes 48TTYVHangup=yes 49TTYVTDisallocate=yes 50KillMode=process 51IgnoreSIGPIPE=no 52SendSIGHUP=yes 53 54# Unset locale for the console getty since the console has problems 55# displaying some internationalized messages. 56UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION 57 58[Install] 59WantedBy=getty.target 60DefaultInstance=tty1

p

1〇lightdm.confファイル 2[Seat:*] 3#type=local 4#pam-service=lightdm 5#pam-autologin-service=lightdm-autologin 6#pam-greeter-service=lightdm-greeter 7#xserver-backend= 8#xserver-command=X 9#xmir-command=Xmir 10#xserver-config= 11#xserver-layout= 12#xserver-allow-tcp=false 13#xserver-share=true 14#xserver-hostname= 15#xserver-display-number= 16#xdmcp-manager= 17#xdmcp-port=177 18#xdmcp-key= 19#unity-compositor-command=unity-system-compositor 20#unity-compositor-timeout=60 21greeter-session=pi-greeter 22greeter-hide-users=false 23#greeter-allow-guest=true 24#greeter-show-manual-login=false 25#greeter-show-remote-login=true 26#user-session=default 27#allow-user-switching=true 28#allow-guest=true 29#guest-session= 30#session-wrapper=lightdm-session 31#greeter-wrapper= 32#guest-wrapper= 33display-setup-script=/usr/share/dispsetup.sh 34#display-stopped-script= 35#greeter-setup-script= 36#session-setup-script= 37#session-cleanup-script= 38#autologin-guest=false 39autologin-user=pi 40autologin-user-timeout=0 41#autologin-in-background=false 42#autologin-session=lightdm-autologin 43#exit-on-failure=false

補足情報(FW/ツールのバージョンなど)

ラズパイのOSバージョン
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.49%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問