Gnome settings => CardDAV/CalDAV iCloud account

Hello,

I’m not sure if I’m in the right place with my question.

I’ve been a macOS user for many years and have been playing around with various Linux distributions as virtual machines and also on bare metal for some time now, but I’m not ruling out a permanent switch as I’m getting more and more bored with Apple’s development.
My various other 19" systems in the rack are all already running Linux, but headless without any desktop environment.

I’m currently using Ubuntu 24.04 LTS on a Lenovo Thinkcentre M95q Gen 5 and am now looking for the best way to integrate iCloud. I’m only interested in mail, calendar and address book, I don’t use all the other iCloud stuff (iCloud Drive, PrivateRelay, etc.), only notes, but that’s not a priority for now.

I recently realised that a CalDAV/CardDAV configuration is possible directly with the Gnome settings. At least I never noticed this during my last experiments with Fedora 38 (?) or Ubuntu 22.04 or Debian Bookworm.

So I’ll give it a try here.

I would like to use the Gnome stock apps, i.e. Geary, Contacts and Calendar.

I have successfully added mail as IMAP via the Gnome settings, but I am failing to set up CalDAV/CardDAV with the Gnome settings.

App-based password is set up, the configuration via Thunderbird works, as does the setup with the help of Evolution. The Gnome stock apps Calendar and Contacts are successfully set up via Evolution “workaround”.

I cannot get the direct configuration via Gnome settings to work.

I am happy for any help. :innocent:

Hi, can you please provide details about what you tried and how? What server URL did you use? Did you provide specific URLs for CalDAV and CardDAV?

Hi, the server URLs I used are as following:

https://contacts.icloud.com
https://caldav.icloud.com

Setting up Thunderbird worked like a charm by just adding new calendar/contacts via “auto-discovery”. I just entered the corresponding server URL, my iCloud credentials and app-based password and there it was.

Using Evolution I entered a little more manually, but that was actually just the “secure connection” option.

As I said, I would like to use only the Gnome stock apps, no “overkill” applications like Thunderbird or Evolution but I fail with the setup via Gnome settings.

There I should enter a (general) server URL, CalDAV and CardDAV should be optional.

But unfortunately that doesn’t work, and to be honest I’m not sure which general server URL address that should be. Apple likes to keep quiet about such things. :wink:

Hi,
Evolution uses a semi-complicated process of detecting the DAV entry
points, while it depends what server address you use. What do you write
in the GNOME Settings->Online Accounts, please? Is it the same thing
you write into the Evolution?

How precisely do you configure the account in the Evolution, please?
There are multiple ways to achieve a similar outcome.

As the last, but not least, what is the Evolution (or
the evolution-data-server) version you have installed, please? Distro
version is helpful, but it does not provide an information about
currently installed app version. You know, the apps can be updated.

What you can try is to run the evolution-source-registry with debugging
on the related parts on. That’s the following set of commands:

   export ESR_DEBUG=1
   export GOA_DEBUG=1
   export WEBDAV_DEBUG=1
   /usr/libexec/evolution-source-registry

The actual path can differ in your distro. The log can contain private
information, thus be careful what you share in the public.

Bye,
Milan

First a correction: I had added the iCloud mail account as IMAP via Geary, NOT via Gnome settings. Nevertheless, the @icloud.com address and the app-based password were sufficient, Geary did the configuration automatically. However, this (Geary) mail account does not appear in the Gnome online account settings.

CardDAV: Setup via Evolution with URL https://contacts.icloud.com and @icloud.com account and app-based password, but after setup a CardDAV URL with the scheme https://pxxx-contacts.icloud.com/.../ can be found in the Evolution configuration.
This URL can also be used to set up CardDAV via Gnome settings.

I had success with it, under the Gnome online account you can then activate WebDAV Files and Calendar, but unfortunately this has no result (no calendar, files no idea where…)

CalDAV: Same method as CalDAV, setup via Evolution with URL https://caldav.icloud.com then creates a CalDAV URL with the scheme https://pxxx-caldav.icloud.com/xxx/calendars/.../ in the Evolution configuration. However, the setup via Gnome setting does NOT work with this.

Using Ubuntu 24.04 LTS, Evolution 3.52.3-0ubuntu1

It would be nice if it could be set up without the help of Evolution. :innocent:

However, this (Geary) mail account does not appear in the Gnome
online account settings.

Hi,

that’s expected, the accounts are one-way only, and the way is GNOME
Online Accounts => apps, not the opposite direction.

I had success with it, under the Gnome online account you can then
activate WebDAV Files and Calendar, but unfortunately this has no
result (no calendar, files no idea where…)

It’s because the URL providing contacts does not contain calendar
items, neither files. They use a different URL, specifically
caldav.icloud.com. You need to configure them separately in the GNOME
Online Accounts.

You also might not want to use the pxx-contacts.icloud.com address,
even Evolution uses it, because it had been discovered, because it’s
only one server which can provide your data. The GNOME Online Accounts
might rather use the generic contacts.icloud.com address, I think.

The simplest way to configure everything by a single account in
Evolution is to use Edit->Accounts->Add->Collection Account and just
fill your icloud.com email address and then let it find everything it
will be able to find (just click Look up, Next, Next, Finish) . You
even do not need to enter a password there, it finds all CalDAV,
CardDAV, IMAP and SMTP. Of course, it’s Evolution, it’s not GNOME
Online Accounts, though the contacts and calendar items are shared with
other apps through the evolution-data-server, thus gnome-calendar and
others can access them. Geary cannot get mail accounts configured in
Evolution.

Bye,
Milan

Hi,

I already suspected something like “evolution-data-server”. :slightly_smiling_face:

As already mentioned in the opening post, I only recently noticed (with Ubuntu 24 and Gnome 46) that in addition to various online accounts such as Google, Microsoft, Nextcloud, IMAP, etc., there is now also the WebDAV option in the Gnome online account settings.

Furthermore, I have noticed that the following four processes (even without Evolution installed) are already running with Ubuntu 24 LTS default installation.

evolution-adressbook-factory
evolution-alarm-notify
evolution-calendar-factory
evolution-source-registry

Therefore, I thought that an additional installation of Evolution was not necessary as these services are already present and running.

After installing Evolution, however, I see that apart from these four processes, no other services seem to be running that have anything to do with Evolution by name (but I am not a Linux expert when it comes to in-depth technical knowledge of services, processes, etc. :innocent:).

So is the configuration of CardDAV/CalDAV (at least of iCloud accounts) only possible with an additional installation of Evolution?

Best
Peter

Hi,
the answer for the above is: “no”. The processes you named are indeed
from the evolution-data-server, where happens all the hard work with
the connection to the GNOME Online Accounts (GOA).

THE GNOME 46 brought many changes and fixes, including added account
types in the GOA, just as you noticed. The WebDAV account type works
well when the URL points to a single point. It can provide you
everything the server offers, just like the collection account in the
Evolution I mentioned earlier. The problem with iCloud is that they
have two addresses for the DAV, not a single one. You can workaround it
by adding two accounts in the GOA, one for the caldav.icloud.com and
one for the contacts.icloud.com. You can try to have a single account
with icloud.com only, but I do not know whether it’ll work, probably
not. I do not have an iCloud account to test this properly, I’m sorry.

The debugging on the evolution-source-registry side I suggested can
help to show what URLs are passed from the GOA and how they are working
within the discovery of the content of them.

Bye,
Milan

No need to be sorry for not having an iCloud account. :wink:

I’m happy how well so much is already working and about the numerous help and possibilities of the Linux community.

Thank you and all the others at this point! :smiling_face:

I think that’s what you mean, isn’t it?

export ESR_DEBUG=1
export GOA_DEBUG=1
export WEBDAV_DEBUG=1
   /usr/libexec/evolution-source-registry

Best
Peter

Yes, it is it. Make sure you won’t expose anything private in the log.

export ESR_DEBUG=1
export GOA_DEBUG=1
export WEBDAV_DEBUG=1
   /usr/libexec/evolution-source-registry

How/where do I use these commands?

You open a terminal and copy&paste there one line after another.

So the command enables a “real time log” in terminal window.
Among other things, the log refers to the folder

~/.config/evolution/sources

Is there a file of special interest?
I see various config files there, the content shows me the same CalDAV URLs that I can also find with the Evolution GUI.

No, the config files are boring for this debugging.

You might see some debug output about the WebDAV discovery, using the URLs provided by the GNOME Online Accounts (GOA). I guess they are failing, but I can be wrong.

Not a single line of output in log when using GNOME Online Accounts GOA and CalDAV URL to setup CalDAV. Only an error message directly at GUI displaying “authorization failed”.

No problem using it vice versa (setup via Evolution).

Do you mean like nothing logged at all? If so, then something doesn’t work, because ESR_DEBUG=1 on its own shows some output when the evolution-source-registry is started, the GOA_DEBUG=1 shows couple things about GNOME Online Accounts (GOA) communication and its accounts and finally the WEBDAV_DEBUG=1 shows how the calendars, task lists and the others from the CalDAV/CardDAV collection sources (which includes GOA sources) had been detected, which should include the “authorization failed” response and the request for which it had been responded.

When I repeat the four commands from the end of the comment Gnome settings => CardDAV/CalDAV iCloud account - #4 by mcrha , in a terminal here, it prints a lot of information, just as expected.

This is the result after entering

export ESR_DEBUG=1
export GOA_DEBUG=1
export WEBDAV_DEBUG=1
   /usr/libexec/evolution-source-registry

into cli:

There is no output when doing anything in GNOME Online Accounts > add CalDAV.
Just GOA error message that authorization failed.

Just cross-checking if anything within GOA is working at all on my machine and produces any log file output… :innocent:

Using CardDAV URL https://contacts.icloud.com there with app-based password works like a charm and generates log file output in cli window.

CalDAV? No way.

Aha, wait a bit, I see there is a big misunderstanding here. When you said “no output”, I understood it as literally no output on the source registry console, but your screenshot shows a lot of output, which is expected. It also shows GOA-related bits, those lines with [EDS-GOA] prefix, and it claims it did not get any account from GOA.

Another misunderstanding, I thought you receive an authentication error in Evolution, but it looks like you received it in the GOA itself. In tht case, if the same URL works as expected, you might better gill a GOA bug for further investigation at Issues · GNOME / gnome-online-accounts · GitLab