Skip to content

fix : ensure the current dekstop is mango before executing ipc dispatch#848

Open
Wateir wants to merge 2 commits intomangowm:mainfrom
Wateir:main
Open

fix : ensure the current dekstop is mango before executing ipc dispatch#848
Wateir wants to merge 2 commits intomangowm:mainfrom
Wateir:main

Conversation

@Wateir
Copy link
Copy Markdown

@Wateir Wateir commented Apr 13, 2026

This commit fix a issue that if you run mmsg [flag] [param] with a valide command on a compositor or a wm which is not mango but have mango install mmsg segfault.

Check if XDG_CURRENT_DEKSTOP is mango, then execute it, if not return a error and close the program

Test under Artix Linux x86_64

@Matercan
Copy link
Copy Markdown

Some peoples' XDG_CURRENT_DESKTOP env var may be wlroots instead of mango.

@Wateir
Copy link
Copy Markdown
Author

Wateir commented Apr 13, 2026

Some peoples' XDG_CURRENT_DESKTOP env var may be wlroots instead of mango.

Yeah but on this case, a bunch of compositor can be name wlroots, but i'm not against add other form of check than the xdg env var, i don't see any other simple right know

https://github.com/hyprwm/Hyprland/blob/933a24caa68d4d217207838bceabd5577838431c/hyprctl/src/main.cpp#L485-L491
for exemple hyprland use a env var specific HYPRLAND_INSTANCE_SIGNATURE, maybe something like that and use it after to check if mango is running

@Wateir
Copy link
Copy Markdown
Author

Wateir commented Apr 13, 2026

This allow user to have more complexe string than just 'mango' but 'mango,wlroots' or any other fantasy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants