52

Is there a way of removing it from startup?
I don't need it and I'm not using evolution at all.

Fern Moss
  • 8,925

8 Answers8

36

If you want to remove evolution-data-server, it will remove these at least (tested in 16.04)

The following packages will be REMOVED:
  evolution-data-server gdm3 gnome-contacts gnome-shell libfolks-eds25
0 upgraded, 0 newly installed, 5 to remove and 378 not upgraded.
After this operation, 15.8 MB disk space will be freed.

So, the better treatment is a bit nasty, but it works!

Nasty Hack!

Rename Evolution binary folder, so that it won't be found! What works for me is these

sudo mv /usr/lib/evolution-data-server /usr/lib/evolution-data-server-disabled
sudo mv /usr/lib/evolution /usr/lib/evolution-disabled

That's it! Now, I can at least use the system.

Notes: If you disable evolution this way, you won't be able to use calender syncs or other fancy (useless for me) stuff.


Less dirty hack (update)

Looks like more and more people are unsatisfied with evolution lately. But in my current setup, I don't rename the folder. Instead I just remove the executable bit and it works.

For disabling calendar process, I used

sudo chmod -x /usr/lib/evolution/evolution-calendar-factory

The good thing with this method is other evolution service can still work (they start and runs)

Repeat the same process for evolution-source-registry and evolution-addressbook-factory if you want to shut them up too!

Anwar
  • 77,855
17

I didn't have Evolution installed, but still had this running as well.

Remove the package evolution-data-server via the Software Center. Or type this into a terminal: sudo apt-get purge evolution-data-server. Then log out and back in, it should be gone.

N.b. This worked for me in 14.04 and 16.04 if using the Unity desktop; it does not, however, in 18.04, as a lot of critical gnome packages depend upon it

Fern Moss
  • 8,925
16

You can mask the units using systemd (tested on Ubuntu 18.04, Unity):

systemctl --user mask evolution-addressbook-factory.service evolution-calendar-factory.service evolution-source-registry.service

After logout/login the services will not be started anymore.

7

Ubuntu won't allow you to remove evolution-calendar-factory because this is a library shared by many programs.

If you try to execute: sudo apt-get purge evolution-data-server or sudo apt-get remove evolution-data-server your system will be broken!

You can test these commands in the terminal using the -s flag (simulate) (be careful!)

sudo apt-get remove evolution-data-server -s

And you will see that the ubuntu-gnome-desktop would be removed, and after next reboot, you won't be able to log in to the system any more. :(

So, do not remove evolution-data-server.

Zanna
  • 72,312
Enoque
  • 142
4

If you're using Gnome or Gnome-Shell, it seems you cannot remove evolution-data-server, since it will remove also the entire DE

root@europa:/home/user# apt remove evolution-data-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
evolution-data-server gdm3 gnome-contacts gnome-shell gnome-shell-extension-weather gnome-shell-extensions libfolks-eds25
0 upgraded, 0 newly installed, 7 to remove and 6 not upgraded.
After this operation, 17,5 MB disk space will be freed.
Do you want to continue? [Y/n] n

If you still want to get rid of those annoying and resource-greedy processes, you can just delete (or, better, rename) the directory of their executables:

root@europa:/home/user# mv /usr/lib/evolution /usr/lib/evolution_DISABLE

Then kill all the running processes:

root@europa:/home/user# for procname in $(ps aux | grep evolution | awk -F'/' '{print $NF}' | grep evolution | grep -v grep); do killall $procname; done

This way, Gnome won't be able to restart them anymore.

Worked for me without any visible collateral damage.

2

So, if you think the above answers are too poisonous to your system (ripping out gnome-desktop prereqs, deleting/renaming packaged files? No thanks!), I may have a solution for you.

Create ~/.config/upstart/kill-evolution-services.conf and populate it with the following code. Be sure to replace USER with your username.

start on desktop-start
stop on desktop-end

script
  ME=USER
  GIVEUP=60
  while ! pgrep -u "$ME" -f '^/usr/lib/evolution/evolution'; do
    GIVEUP=$((GIVEUP - 1))
    if test $GIVEUP = 0; then
      break
    fi
    sleep 1
  done
  pkill -u "$ME" -f '^/usr/lib/evolution/evolution'
end script

This will run on login, wait until the evolution services have started (up to 60s, adjustable with GIVEUP), then kill them. From what I've seen (on 16.04) they'll stay dead until you interact with some application that needs them, like gnome-calendar (the app, not the indicator). To counter this, you can add the following to crontab (run "crontab -e" from terminal). Again, be sure to replace USER with your username.

*/1 * * * * pkill -u USER -f '^/usr/lib/evolution/evolution'

This will try to kill evolution services once per minute.

So we're rid of evolution services without driving apt crazy or even calling sudo. Allegedly the memory usage issues with these services has been fixed in Gnome 3.20, but Ubuntu has yet to backport them to 3.18. Keep an eye on https://bugs.launchpad.net/ubuntu/+source/indicator-datetime/+bug/1589605, even though it has nothing to do with indicator-datetime, from what I can tell. The indicator runs fine without evolution services at the lightdm login, anyway.

If any of this ends up having side effects on your configuration, you can simply delete ~/.config/upstart/kill-evolution-services.conf and remove the crontab line (again, crontab -e from a terminal). Then log out and back in for good measure, if you're paranoid.

trent.sol
  • 391
0

In 22.04 I've done the work with:

sudo rm -rf /etc/xdg/autostart/evolution-alarm-notify.desktop
0

I didn't try to remove it since I run gnome, but what did work was to copy the systemd unit files to /etc and set ExecStart to /bin/ls:

cp /usr/lib/systemd/user/evolution-calendar-factory.service /etc/systemd/user/
cp /usr/lib/systemd/user/evolution-source-registry.service /etc/systemd/user/

and in the unit file make sure ExecStart is /bin/ls:

ExecStart=/bin/ls

Then do

systemctl --user daemon-reload
systemctl --user restart evolution-source-registry
systemctl --user restart evolution-calendar-factory

Note that doing "systemctl disable --user evolution-source-registry" seemed to have no effect.