インタラクションなしでdbus-sendを介して再起動しますか?

インタラクションなしでdbus-sendを介して再起動しますか?

ハンドブレーキとkodiがシステムをシャットダウンまたは再起動しない理由を調査しようとしましたが、問題の範囲を次の「対話型認証が必要」メッセージに絞り込みました。

% dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:false
Error org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.
% dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.Reboot boolean:true 
Error org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

~によるとhttps://forums.gentoo.org/viewtopic-t-1110714-start-0.htmlとログイン文書https://www.freedesktop.org/wiki/Software/systemd/logind/少なくとも「false」を含む行は、システムを再起動できる必要があります。いいえユーザー対話。どうですか?

私は便利な情報を得るために別のxtermで並列に実行されるdbus-monitorを試しましたが、コマンドはロギングをトリガーしないようです。また、パッケージの依存関係を確認し、以前のdbus-daemonに戻り、dbus-launcherを実行するいくつかの方法を試しましたが、役に立ちませんでした。

システムはamd64、dbus-broker 35-2、systemd 255.4-1+b1、libpam-systemd 255.4-1+b1、アップストリームカーネル6.8.1のDebian Sidです。 systemctlの状態は以下で確認できます。

すべての洞察力のあるコメントは高く評価されます。

挨拶

いじめる

{harri@cecil:~ (master) 1002} zcat systemctl_status.txt.gz 
● cecil.afaics.de
    State: running
    Units: 513 loaded (incl. loaded aliases)
     Jobs: 0 queued
   Failed: 0 units
    Since: Sun 2024-03-24 10:53:36 CET; 33min ago
  systemd: 255.4-1+b1
   CGroup: /
           ├─init.scope
           │ └─1 /sbin/init
           ├─system.slice
           │ ├─acpid.service
           │ │ └─839 /usr/sbin/acpid
           │ ├─atd.service
           │ │ └─1211 /usr/sbin/atd -f
           │ ├─autofs.service
           │ │ └─1192 /usr/sbin/automount --pid-file /var/run/autofs.pid
           │ ├─avahi-daemon.service
           │ │ ├─841 "avahi-daemon: running [cecil.local]"
           │ │ └─873 "avahi-daemon: chroot helper"
           │ ├─bluetooth.service
           │ │ └─842 /usr/libexec/bluetooth/bluetoothd
           │ ├─clamav-freshclam.service
           │ │ └─1147 /usr/bin/freshclam -d --foreground=true
           │ ├─cron.service
           │ │ └─1175 /usr/sbin/cron -f
           │ ├─dbus-broker.service
           │ │ ├─878 /usr/bin/dbus-broker-launch --scope system --audit
           │ │ └─895 dbus-broker --log 4 --controller 9 --machine-id 4d4981ed2a8267030aa4ffd948e6259c --max-bytes 536870912 --max-fds 4096 --max-matches 16384 --audit
           │ ├─dnsmasq.service
           │ │ └─1210 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new --local-service
           │ ├─fsidd.service
           │ │ └─845 /usr/sbin/fsidd
           │ ├─irqbalance.service
           │ │ └─847 /usr/sbin/irqbalance
           │ ├─lighttpd.service
           │ │ └─1314 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
           │ ├─mdmonitor.service
           │ │ └─588 /sbin/mdadm --monitor --scan
           │ ├─minidlna.service
           │ │ └─1252 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -S -r
           │ ├─networking.service
           │ │ └─1057 dhclient -4 -v -i -pf /run/dhclient.br0.pid -lf /var/lib/dhcp/dhclient.br0.leases -I -df /var/lib/dhcp/dhclient6.br0.leases br0
           │ ├─nfs-blkmap.service
           │ │ └─784 /usr/sbin/blkmapd
           │ ├─nfs-idmapd.service
           │ │ └─1157 /usr/sbin/rpc.idmapd
           │ ├─nfs-mountd.service
           │ │ └─1172 /usr/sbin/rpc.mountd
           │ ├─nfsdcld.service
           │ │ └─791 /usr/sbin/nfsdcld
           │ ├─nvidia-persistenced.service
           │ │ └─857 /usr/bin/nvidia-persistenced --user nvpd
           │ ├─opensmtpd.service
           │ │ ├─1182 /usr/sbin/smtpd
           │ │ ├─1183 "smtpd: crypto"
           │ │ ├─1184 "smtpd: control"
           │ │ ├─1185 "smtpd: lookup"
           │ │ ├─1187 "smtpd: dispatcher"
           │ │ ├─1188 "smtpd: queue"
           │ │ └─1190 "smtpd: scheduler"
           │ ├─polkit.service
           │ │ └─1996 /usr/lib/polkit-1/polkitd --no-debug
           │ ├─rpc-statd.service
           │ │ └─1993 /usr/sbin/rpc.statd
           │ ├─rpcbind.service
           │ │ └─759 /sbin/rpcbind -f -w
           │ ├─rsyslog.service
           │ │ └─855 /usr/sbin/rsyslogd -n -iNONE
           │ ├─rtkit-daemon.service
           │ │ └─2175 /usr/libexec/rtkit-daemon
           │ ├─smartmontools.service
           │ │ └─858 /usr/sbin/smartd -n
           │ ├─ssh.service
           │ │ └─1392 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
           │ ├─system-getty.slice
           │ │ ├─[email protected]
           │ │ │ └─5318 /sbin/agetty -o "-p -- \\u" --noclear - linux
           │ │ ├─[email protected]
           │ │ │ └─5326 ssh-agent
           │ │ ├─[email protected]
           │ │ │ └─6017 /sbin/agetty -o "-p -- \\u" --noclear - linux
           │ │ └─[email protected]
           │ │   └─5200 /sbin/agetty -o "-p -- \\u" --noclear - linux
           │ ├─systemd-journald.service
           │ │ └─442 /usr/lib/systemd/systemd-journald
           │ ├─systemd-logind.service
           │ │ └─860 /usr/lib/systemd/systemd-logind
           │ ├─systemd-timesyncd.service
           │ │ └─760 /usr/lib/systemd/systemd-timesyncd
           │ ├─systemd-udevd.service
           │ │ └─udev
           │ │   └─490 /usr/lib/systemd/systemd-udevd
           │ └─unattended-upgrades.service
           │   └─1160 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
           └─user.slice
             └─user-1000.slice
               ├─session-5.scope
               │ ├─5319 /bin/login -p --
               │ └─5356 -bash
               ├─session-7.scope
               │ ├─5322 /bin/login -p --
               │ ├─5413 -bash
               │ ├─5444 xinit -- :4 -br -quiet
               │ ├─5445 -bash
               │ ├─5446 /usr/bin/perl /usr/bin/ts
               │ ├─5447 /usr/lib/xorg/Xorg :4 -br -quiet
               │ ├─5456 /bin/bash /local/home/harri/.xinitrc
               │ ├─5463 /bin/bash /local/home/harri/.xinitrc
               │ ├─5465 /usr/bin/fvwm2
               │ ├─5481 /usr/libexec/fvwm2/2.7.0/FvwmPager 7 4 none 0 8 "*"
               │ ├─5482 xterm -C -n CONSOLE -fn 6x12 -g 120x9+0+0 -j +ut -T /var/log/messages -e tail -F --max-unchanged-stats=5 /var/log/kern.log
               │ ├─5483 xterm -g 80x40+0+148 -n cecil.afaics.de -j
               │ ├─5484 /usr/libexec/fvwm2/2.7.0/FvwmAuto 9 4 none 0 8 500
               │ ├─5485 xterm -g 120x40+519+148 -n cecil.afaics.de -j
               │ ├─5486 xterm -C -n CONSOLE -fn 6x12 -g 80x9+759+0 -j +ut -T /var/log/messages -e watch /sbin/route -n
               │ ├─5487 xpenguin
               │ ├─5488 /usr/libexec/fvwm2/2.7.0/FvwmEvent 11 4 none 0 8
               │ ├─5489 dclock
               │ ├─5491 /bin/bash /local/home/harri/.xinitrc
               │ ├─5494 xscreensaver -no-splash
               │ ├─5496 watch /sbin/route -n
               │ ├─5498 xscreensaver-systemd
               │ ├─5499 bash
               │ ├─5504 bash
               │ ├─5509 tail -F --max-unchanged-stats=5 /var/log/kern.log
               │ ├─5627 emacs
               │ └─6608 systemctl status
               └─[email protected]
                 ├─app.slice
                 │ ├─emacs.service
                 │ │ └─5352 /usr/bin/emacs --fg-daemon
                 │ └─gpg-agent.service
                 │   └─5376 /usr/bin/gpg-agent --supervised
                 ├─init.scope
                 │ ├─5329 /usr/lib/systemd/systemd --user
                 │ └─5330 "(sd-pam)"
                 └─session.slice
                   ├─dbus-broker.service
                   │ ├─5370 /usr/bin/dbus-broker-launch --scope user
                   │ └─5377 dbus-broker --log 4 --controller 9 --machine-id 4d4981ed2a8267030aa4ffd948e6259c --max-bytes 100000000000000 --max-fds 25000000000000 --max-matches 5000000000
                   ├─filter-chain.service
                   │ └─5354 /usr/bin/pipewire -c filter-chain.conf
                   ├─pipewire.service
                   │ └─5353 /usr/bin/pipewire
                   └─pulseaudio.service
                     └─5355 /usr/bin/pulseaudio --daemonize=no --log-target=journal

ベストアンサー1

解決策が見つかりました。明らかに、Xorgコマ​​ンドラインで "vt $ {ttynum} -keeptty"などのコマンドを使用して現在のttyでxinitを起動する必要がありました。

xinitの周りにstartxラッパーを使用すると問題がなくなります。

おすすめ記事