elkowar / eww

ElKowars wacky widgets

Home Page:https://elkowar.github.io/eww

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Can't run same config on multiple xorg servers

liranco opened this issue · comments

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

If trying to launch more than one daemon on the same machine (with each daemon running on a different $DISPLAY), it fails because the subsequent daemons detect the first one.

This only happens if using the same config for all daemons.

Reproducing the issue

Launch multiple xorg instances, and try to launch eww with the same config on each one.

Expected behaviour

The daemon should spawn individually for each server.

Additional context

This happens because when the daemon launch, it sets the path for its socket to $XDG_RUNTIME_DIR/eww-server_{daemon_id} (defined here).
Subsequent daemons on different servers receive the same path, and when they detect that the socket already exists and is listening, they fail to spawn.

As a workaround, I can set a different $XDG_RUNTIME_DIR for each instance, but in my opinion a better solution can be to add the value of $DISPLAY to the hasher returning the daemon id.

If you like my suggestion I'll be glad to submit a pull request :)

Many thanks!
Liran

Hmmm, that might be worth considering, yea - although it'd might have some weird complexities due to this then implying a difference between how the hash is calculated for wayland vs. X11... I'd love to see if other people also have some usecase for this.

Some way to manually set the daemon ID might be a good alternative, too.