
Bit verbose output, but here is a bit cut down version of log and my script (script first):eccerr0r wrote:Well, I doubt init is actually starting it; it's probably some other program disowning the deactivate command, and init ends up being the parent to all disowned child processes.
Now the question is what else are you running - what desktop environment, what other programs that could desire to disable the screensaver.
Code: Select all
#!/bin/bash
PARENT_COMMAND="$(ps -o args= $PPID)"
if [ -n /root ] ; then
date > /root/xscreensaver-command-pid.txt
echo "$PARENT_COMMAND" >> /root/xscreensaver-command-pid.txt
echo "$@" >> /root/xscreensaver-command-pid.txt
pstree -l -p >> /root/xscreensaver-command-pid.txt
fi
if [ -n /home/jk ] ; then
date > /home/jk/xscreensaver-command-pid.txt
echo "$PARENT_COMMAND" >> /home/jk/xscreensaver-command-pid.txt
echo "$@" >> /home/jk/xscreensaver-command-pid.txt
pstree -l -p >> /home/jk/xscreensaver-command-pid.txt
fi
/root/xscreensaver-command.org ""Code: Select all
tor 15 feb 22:48:53 CET 2018
init [3]
-deactivate
init(1)-+-ModemManager(8889)-+-{ModemManager}(8915)
| `-{ModemManager}(8930)
|-NetworkManager(8640)-+-dhclient(20252)
| |-{NetworkManager}(8641)
| `-{NetworkManager}(8655)
|-agetty(12280)
|-agetty(12281)
|-agetty(12282)
|-agetty(12283)
|-agetty(12284)
|-agetty(12285)
|-at-spi-bus-laun(12545)-+-dbus-daemon(12550)
| |-{at-spi-bus-laun}(12546)
| |-{at-spi-bus-laun}(12547)
| `-{at-spi-bus-laun}(12549)
|-at-spi2-registr(12552)-+-{at-spi2-registr}(12555)
| `-{at-spi2-registr}(12557)
|-automount(10711)-+-{automount}(10716)
| `-{automount}(10717)
|-avahi-daemon(10943)---avahi-daemon(10947)
|-console-kit-dae(12508)-+-{console-kit-dae}(12509)
| |-{console-kit-dae}(12511)
| |-{console-kit-dae}(12512)
| `-{console-kit-dae}(12513)
|-cupsd(11104)
|-dbus-daemon(8426)
|-dbus-daemon(12527)
|-dbus-launch(12526)
|-gpg-agent(12565)
|-gpm(11274)
|-gvfs-mtp-volume(12902)-+-{gvfs-mtp-volume}(12904)
| `-{gvfs-mtp-volume}(12906)
|-gvfs-udisks2-vo(12875)-+-{gvfs-udisks2-vo}(12876)
| `-{gvfs-udisks2-vo}(12877)
|-gvfsd(12540)-+-{gvfsd}(12541)
| `-{gvfsd}(12542)
|-gvfsd-metadata(12922)-+-{gvfsd-metadata}(12926)
| `-{gvfsd-metadata}(12927)
|-gvfsd-trash(12909)-+-{gvfsd-trash}(12910)
| `-{gvfsd-trash}(12911)
|-named(18586)-+-{named}(18587)
| |-{named}(18588)
| |-{named}(18589)
| `-{named}(18590)
|-nmbd(18658)
|-polkitd(8870)-+-{polkitd}(8895)
| |-{polkitd}(8903)
| |-{polkitd}(8920)
| `-{polkitd}(8927)
|-pulseaudio(12570)-+-{pulseaudio}(12575)
| |-{pulseaudio}(12576)
| `-{pulseaudio}(12577)
|-rtkit-daemon(12572)-+-{rtkit-daemon}(12573)
| `-{rtkit-daemon}(12574)
|-slim(12210)-+-X(12218)---{X}(12289)
| `-ck-launch-sessi(12488)---sh(12523)---sh(12528)---xfce4-session(12536)-+-Thunar(12581)-+-{Thunar}(12582)
| | `-{Thunar}(12583)
| |-nm-applet(12884)-+-{nm-applet}(12916)
| | |-{nm-applet}(12918)
| | `-{nm-applet}(12930)
| |-polkit-gnome-au(12894)-+-{polkit-gnome-au}(12920)
| | `-{polkit-gnome-au}(12924)
| |-xfce4-panel(12584)-+-panel-12-power-(12696)-+-{panel-12-power-}(12757)
| | | `-{panel-12-power-}(12758)
| | |-panel-16-mixer(12727)-+-{panel-16-mixer}(12759)
| | | |-{panel-16-mixer}(12760)
| | | `-{panel-16-mixer}(12792)
| | |-panel-2-actions(12688)-+-{panel-2-actions}(12766)
| | | `-{panel-2-actions}(12767)
| | |-panel-6-systray(12682)-+-{panel-6-systray}(12770)
| | | `-{panel-6-systray}(12771)
| | |-{xfce4-panel}(12595)
| | `-{xfce4-panel}(12596)
| |-xfdesktop(12847)-+-{xfdesktop}(12858)
| | `-{xfdesktop}(12859)
| |-xfwm4(12566)-+-{xfwm4}(12578)
| | |-{xfwm4}(12579)
| | `-{xfwm4}(12580)
| |-xscreensaver(12885)
| |-{xfce4-session}(12537)
| `-{xfce4-session}(12538)
|-smbd(18609)-+-cleanupd(18624)
| |-lpqd(18651)
| `-smbd-notifyd(18623)
|-ssh-agent(12563)
|-sshd(9740)
|-syslog-ng(9441)---syslog-ng(9442)-+-{syslog-ng}(28473)
| `-{syslog-ng}(28474)
|-udevd(3738)
|-udisksd(12879)-+-{udisksd}(12880)
| |-{udisksd}(12882)
| |-{udisksd}(12889)
| `-{udisksd}(12897)
|-upowerd(12673)-+-{upowerd}(12678)
| `-{upowerd}(12679)
|-vsftpd(18672)
|-wpa_supplicant(8882)
|-xfce4-notifyd(12914)-+-{xfce4-notifyd}(12928)
| `-{xfce4-notifyd}(12929)
|-xfce4-power-man(12883)-+-{xfce4-power-man}(12886)
| `-{xfce4-power-man}(12887)
|-xfce4-terminal(21784)-+-bash(21788)---medianas-jk(21797)---ssh(21798)
| |-bash(21888)---medianas-jk(21894)---ssh(21895)
| |-bash(22550)---su(22589)---bash(22595)
| |-{xfce4-terminal}(21785)
| `-{xfce4-terminal}(21786)
|-xfconfd(12554)-+-{xfconfd}(12556)
| `-{xfconfd}(12558)
|-xfsettingsd(12597)-+-xfce4-appfinder(19277)-+-{xfce4-appfinder}(19278)
| | `-{xfce4-appfinder}(19279)
| |-{xfsettingsd}(12603)
| `-{xfsettingsd}(12604)
`-xscreensaver-co(28476)---pstree(28481)

This is unlikely. I think the explanation suggested by both me and by eccerr0r is more likely. Some unknown program P starts a child process, then exits, then the child is reparented to init, then the child executes xscreensaver-command. Your hook then reports its current parent (init), not its original parent (the now dead and gone P).k9dog wrote:I am not sure why script says calling process was init, but I think that is actually more due to screenblanker being started by init.

Thought I was agreeing with eccerrOr saying it wasn't init giving the xscreensaver-command the message (using commandline) to deactivate and as I see it now it isn't how it works (lol). I also misunderstood him a bit. init is xscreensavers ancestor and I still think that's why it was showing up in log. I think I said it was started by init. Which only is true in the way that all (or at least most processes not started by user) starts with init as a parent or some other ancestor. Soo yeah that was pretty much nonsense what I said.Hu wrote:This is unlikely. I think the explanation suggested by both me and by eccerr0r is more likely. Some unknown program P starts a child process, then exits, then the child is reparented to init, then the child executes xscreensaver-command. Your hook then reports its current parent (init), not its original parent (the now dead and gone P).k9dog wrote:I am not sure why script says calling process was init, but I think that is actually more due to screenblanker being started by init.