albfan / miraclecast

Connect external monitors to your system via Wifi-Display specification also known as Miracast
Other
3.68k stars 408 forks source link

Add command line parameter for friendly name, get hostname with gethostname() function. #435

Closed Perlovka closed 1 year ago

Perlovka commented 2 years ago

This will fix https://github.com/albfan/miraclecast/issues/356 Also fixes getting friendly name for non-systemd distributions, elogind does not set DBus value for this.

Perlovka commented 2 years ago

Marked as WIP, currently I get double free or corruption on exit, when no --frendly-name is set.

Perlovka commented 2 years ago

Fixed.

albfan commented 2 years ago

Hi, I suggest to put hostname on top of #434.

change friendly name can be a new parameter here as a isolate PR

albfan commented 2 years ago

I @Perlovka I review this PR and looks ok, but I don't want to miss the current retrieve from dbus.

I'm ok with add a #define HOSTNAME_FROM_DBUS or similar to use one method or the other.

We have miraclecast ini file so probably

[wifid]
name=<value>

should be added too.

I can rework all that, just let me know if you're able to do it or I should finish this.

albfan commented 1 year ago

After merge #441 I guess this needs to be implemented too.

probably reuse #ifdef ENABLE_SYSTEMD

albfan commented 1 year ago

closing until #ifdef ENABLE_SYSTEMD is applied to allow both use cases