It’s kind of quaint to think of running Evolution PIM on just one computer so you never have to synchronize anything. When I see Apple Cult members trying to do everything on just a phone or just their tablet or one of those massively overpriced (and fragile) laptops I laugh. You are not a professional!
When working on PC software, you generally need 6-8 machines. Yes, one of them will have at least 8 VMs on it and be enough of a machine to run any 4 of them at the same time, but you need physical hardware. It is impossible to test and develop otherwise. Everything you create will be shit. Software needs to run on the hardware with different operating systems, video cards, and drivers.
The Sync Problem
Keeping your email in sync is no big deal. When using IMAP instead of POP it is all hosted on the server. Everything else is the problem. Contacts, to-do lists, calendar entries, and memos. Corporations pay through the nose for Microsoft Exchange so they can keep email and address books in sync centrally, but if you put it on the Internet, Russia already has it. When MBAs run Internet companies your data is at complete risk. Read up on SolarWindws some time.
When I’m working in my office I can spend hours, usually days, off my “primary” development machine shaking things out on different platforms. I need to keep Evolution in sync. Yes, there are services out their but they want me to pay something like $50/year to have more than 50 contacts or some other necessity. Besides, see comment above about things on the Internet.
Message to “priced right” developers: You are the security breach!
Message to MBAs: The most expensive thing you have is cheap labor!
Thankfully there is a tool to sync your local network machines. Regrettably, it is a shining example of why 12 year old boys should not be allowed to package things. Yes Virginia, #AGILESucks and TDD is most definitely not testing.
The Journey
Everything I found, including the “official” documentation for SyncEvolution is “expert friendly.” Forget about those new trendy GUI software installers that look in FlatHub, etc. You need Synaptic Package Manager.
If you are going to risk putting your personal information on the Internet, the sync-ui package is for you. It might even work. You can skip the bulk of this.
Everyone else read on.
The Packaging Sucks!
I installed and tested this on Debian 12 with all updates applied. Unless a downstream distro has their own maintainer, they all have the same sucky syncevolution package. I tried following the “official” instructions from here. The packager should have tried them as well.
I create medical devices and work on real computers, even went and got an actual degree in CIS. No matter how big of a fan you are of Python, I don’t consider it a real language. Real languages are type-safe!
This just keeps getting more “user friendly” as you go.
I’ve been on Linux a long time. While it is possible I was suffering from head-up-ass syndrome, when I saw the error message I went around looking for new shebang features. Ordinarily, if you need an interpreter for a script you start with
#!/bin/bash
Then you load your interpreter via some environment variable which may have a default value in the script. Python developers have been doing
#!/usr/bin/python
for years. That got them into all kinds of trouble during the transition from Python 2 to 3. Lots of tools and games played making /usr/bin/pythin a symbolic link pointing to which version you wanted to run. Too bad stuff running in background wanted one version and what you were trying to do wanted another. Something was definitely going to crash. I changed the installed file.
Debian 12 has only python3. The packager should have fixed this.
Learn to Identify Dependencies
You should have this in case something wants /usr/bin/python to actually work.
Yes, they don’t even make pip a dependency. That’s how lots of people install Python packages. After hacking the system installed script and installing the above, I got this far.
It’s just inexcusable!
They didn’t make any of the imports a dependency.
The twisted package installs a lot of stuff.
Finally, it works. Leave it running in terminal for now.
On the Client
Just install syncevolution and whatever it pulls in with it.
syncevolution --configure --template SyncEvolution syncURL=http://192.168.1.15:9000/syncevolution z2g4debian
Don’t just cut and paste that. You need the ip address of your server (unless you have it configured by name in your local DNS server). I used the machine hostname for the name at the end. Once it completes successfully you are ready for the first necessary failure.
Back on the Server
You need the string starting with “syncevolution-” all the way to the end. Scrape it and save it into a text editor. Open another terminal window. Do not kill off this window or process.
You need the above –configure command with your saved deviceID pasted in. The last line is the name of the device configuration. I did not configure a username or password for this example. I’m on a local network.
Back on the Client
Repeat your syncevolution command. Odds are it will fail, but you might have the luck of the Irish. I had to do the following:
syncevolution --sync slow z2g4debian addressbook calendar todo
You will get a lot of “impossible to compare” messages, but it should work. The nice part about this is I can now point out the fact you get to choose what you sync in evolution. You might only need to sync your evolution addressbook, or todo list.
Make Sync Server Permanent
Debian doesn’t give you good ways of adding autostart programs that are poorly packaged. Since everyone installs the “flashback” package to get a usable desktop (Gnome 3 is completely unusable) this gets a bit more difficult. Create a desktop entry file and store it in ~/.config/autostart/sync-evolution.desktop
sudo nano /usr/local/bin/start_evolution_sync_server.sh
Restart your computer and then use one of the system monitor utilities to see what is running.
Now you can sync when you want.
Summary
The sync package doesn’t get updated that often. Then again, the databases probably don’t change structure that often. Packaging of this utility most definitely sucks!
While the .desktop hack will work for most, this really should have come bundled with systemctl service files so it could be enabled, started, and stopped in a clean manner. Given the age of the package, the state of the packaging really is inexcusable.
Update June 2, 2024
Tired of having to edit the configuration every time you reboot the server machine? Given Netgear has had an inexcusable bug blocking reserving of IP addresses in many/most of their most popular routers for going on two years now, you can’t use that tried and true method.
I really don’t know why Linux distros simply don’t install this by default.
sudo apt-get install libnss-winbind
Once installed you need to
sudo nano /etc/nsswitch.conf
Make it look like this.
Note that “winbind” was added to passwd and group. “wins” was added to hosts.
Now, either start or restart winbind
sudo service winbind start
# or if it was already running for some reason
sudo service winbind restart
Now we need to change our command file.
cd bin
nano sync_email
We need to use bash shell instead of sh, mainly because I was too lazy to look up how to do the array thing under sh.
#!/bin/bash
#
# Find out where DHCP put the server this time
#
SERVER_ADDRESS=$(wbinfo -N z2g4debian)
SERVER_ARRAY=($SERVER_ADDRESS)
#
syncevolution --run --sync-property syncURL=http://${SERVER_ARRAY[0]}:9000/syncevolution --sync slow z2g4debian addressbook calendar todo
We only need to do this because Netgear has a bug.