question

gone-sailing avatar image
gone-sailing asked

How to change the mdns name of the GX device?

Hi All,

Before someone says this has been answered before, I am not talking about the hostname, I am looking to change the name you ssh into from venus.local to something like venuspi.local. venus.local is definitely not derived from the hostname as the hostname on my raspberry pi is raspberrypi4.

I have an Ekrano and a raspeberry pi for testing (on different networks). ssh complains if connecting to different hosts with the same name as the keys differ, so to make life easier I'd like to change the mdns (.local) name on the raspberrypi.

Here's what I have tried so far. I found that VenusOS uses llmnrd for mdns and that the service runner /opt/victronenergy/service/llmnrd/run contains the line

exec setuidgid nobody /usr/sbin/llmnrd -H venus -6

I made the root partition writabe and used a patch file in /data/rcS.local to change the host venus to venuspi. On reboot I can see that the /service/llmnrd/run contains the name venuspi as per the patch. However, the device still only responds to venus.local and Discovery (Bonjour browser for MacOS) shows the raspberry pi is advertising itself as venus.local.

1708949738874.png

Can anyone tell me where venus.local is being picked up from?

Raspberry Pi
1708949738874.png (19.7 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
gone-sailing avatar image
gone-sailing answered ·

Found it! Obvious really, the name is set by avahi not by llmnrd.

For anyone else that wants this, here's the contents of my /data/rcS.local :

mount -o remount,rw /
patch /etc/avahi/avahi-daemon.conf /data/patches/avahi/patch
mount -o remount,ro /

Don't forget to chmod +x /data/rcS.local if not already executable.

And here's my patch file:

$ diff -u /etc/avahi/avahi-daemon.conf /data/patches/avahi/avahi-daemon.conf > patch
$ more patch
--- /etc/avahi/avahi-daemon.conf
+++ /data/patches/avahi/avahi-daemon.conf
@@ -1,5 +1,5 @@
 [server]
-host-name=venus
+host-name=venuspi
 use-ipv4=yes
 use-ipv6=yes
 use-iff-running=yes

You're welcome :-)

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.