Contributing a fallback to find the hostname without systemd-hostnamed

Hello!

I use GNOME with GNU Guix, a distribution without most systemd parts. And I noticed that the device name fields are displayed empty / null.

I saw that getting the hostname was done in cc-hostname.c, but only by using systemd-hostnamed.

I think it is good to use hostnamed, and I would like to contribute a fallback path that could use the static hostname as a read-only value when hostnamed is not present.

Would this be a welcome contribution?

Have a nice day,
Noé

There are various other settings in GNOME that rely on systemd. I’m afraid we don’t want to fall down the rabbit hole of providing fallbacks for everything. At this point, we should assume that systemd is a dependency of the GNOME desktop.

See also Introducing stronger dependencies on systemd – Adrian's blog

Thanks for your interest in contributing to our project anyway.

Thanks for your reply.

I will then patch it specifically for our version in Guix. Well, I hoped that I could contribute my patch upstream so that other non-systemd distros could benefit.

At this point, we should assume that systemd is a dependency of the GNOME desktop.

I don’t know about the GNOME project’s organisation, can you tell me if it just happened to become that way by some people’s contributions or was it a decision made by many people?

I don’t know about the GNOME project’s organisation, can you tell me if it just happened to become that way by some people’s contributions or was it a decision made by many people?

We currently don’t have a top-down technical organization making decisions. Our dependency on systemd grew gradually and organically, as individual contributors added systemd-related features over the years across various components. Most of us use Fedora (and more recently, GNOME OS) for development, so I feel that people naturally plug “backend” features into frontend components as they see fit.

I’m not particularly knowledgeable about non-systemd distros, but my impression is that there hasn’t been much contribution in that area within GNOME. If there had been, I feel that fallbacks for non-systemd setups would exist more extensively, and it might have influenced GNOME before we reached this point where we are heavily dependent on systemd.

2 Likes

The general recommendation is for non-systemd distros to implement the corresponding systemd interfaces wherever possible, to minimise the differences.

In this specific case, you should create a D-Bus service that implements the org.freedesktop.hostname1 interface. GNOME’s Settings will use that interface to query and set the hostname.

1 Like

That makes a lot of sense :slight_smile:

This is probably true, I think that for a long time having elogind (systemd-logind without the rest of systemd) was enough for these distros. I’m pretty recent to the space, having joined Guix’s GNOME packaging team. We currently have 48, but with 49/50, we need more replacements, like the gnome-session-shepherd project that I have started.

In any case, I’m pretty open to contributing upstream where needed / wanted. I hope that we can have a good collaboration in the future, with the goal of keeping support for GNOME on systems that can’t have systemd :smiley:

Okay, that makes sense. Thanks for your suggestion.