Hey,
I have a setup that involves frequently logging into multiple KVM-over-IP devices. How can I customize PiKVM login? I’d like for either login prompt or page title to include some sort of unique ID: an IP address or hostname, or any other sort of distinguishing feature, preferably the one I can control.
Thanks.
The best way is editing the /etc/kvmd/meta.yaml file which is mostly for that purpose. Last I knew it doesn’t currently show up in the login page to prevent information leakage, but it does show up in a couple places in the WebUI and it appears it is prepended to the page title in the browser tab now.
This is not quite what I’m asking for. The $server.host from /etc/kvmd/meta.yaml only shows up after logging in, not before. I am aware that wrong contents there may lead to information leakage, but that’s the risk I’m prepared to take.
On a side note, isn’t /etc/kvmd/meta.yaml subject to get overwritten during a software update? I’ve tried defining $server.host in /etc/kvmd/override.d/01-local-hostname.yaml, but it doesn’t seem to be picked up from there.
Yeah, after I checked on my device I updated my reply slightly.
I think for it to show up on the login page you’d need to edit the template files used by kvmd/nginx to generate and display that page, and those edits would be subject to replacement during a software update unless you take advantage of the typical XDG and systemd overrides behavior to put a script in the startup to “fix” aka add the server.host to the login page template/code on each startup if not present.
I haven’t had any issues with meta.yaml being overwritten with software updates, so if you put the correct hostname there and just update the login page code to show the hostname the same way the post login page title shows it then you should be good.
@YarL_PiKVM any other considerations for target hostname on the login page?
We don’t do this for security reasons - that the device can’t be identified.
We can plan this feature for implementation (it would be great if you create a feature request on github), but it will need to be explicitly enabled.