Ubuntu: Systemd keeps restarting a process


I've installed Mate on top of Unity in Ubuntu 16.04. In my process list, gnome-screensaver appears persistently:

UID        PID  PPID  C STIME TTY          TIME CMD  username  8434     1  0 09:47 ?        00:00:00 /usr/bin/gnome-screensaver --no-daemon  

I can kill it successfully, but it will always reappear after the next time the lockscreen is activated (when I close and reopen the laptop).

Its PPID is always 1, which is systemd. grep shows no files within the /etc/systemd/ directory that contain "gnome" or "screensaver". I can't figure out why it keeps restarting. How do I stop it?


dpkg -L gnome-screensaver | grep service  

shows the file /usr/share/dbus-1/services/org.gnome.ScreenSaver.service with contents

[D-BUS Service]  Name=org.gnome.ScreenSaver  Exec=/usr/bin/gnome-screensaver --no-daemon  

This looks like how the process is being restarted. I guess that somewhere is a file or setting that tells systemd "in response to X signal from dbus, start this service," with X being something related to closing and reopening the laptop. Is this correct, and is there a way to identify that file or setting?


Welcome to Ask Ubuntu.

If you don't want gnome-screensaver, you can try to just uninstall it:

sudo apt remove gnome-screensaver  

You can also try masking the service, which is telling systemd to act like the service doesn't exist:

sudo systemctl mask org.gnome.ScreenSaver.service  

/etc/systemd is used for files that you manage. systemd related files installed by the systemd are often not stored there.

You can find where the systemd service file for a package is installed like this:

 dpkg -L gnome-screensaver | grep service  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »