Refer #12867. xfce4-terminal should have DISPLAY set to Xwayland's screen number. Steps to reproduce: - Log onto a Sway session (or other Wayland session?) - (optional) Launch xfconfd - Launch xfce4-appfinder (if xfconfd was not launched: forks xfconfd, which relaunches xfce4-appfinder) - Launch a program using xfce4-appfinder Expected result: - The program will have "DISPLAY=<Xwayland's X11 Screen number>" in its environment (For example: ":0" or ":1") Actual result: - The program will have 'DISPLAY=<value of WAYLAND_DISPLAY>' in its environment (For example: "wayland-0") After digging for anywhere DISPLAY was changed, I found this: /* pass correct DISPLAY to children, in case of --display in argv */ g_setenv ("DISPLAY", gdk_display_get_name (gdk_display_get_default ()), TRUE); === SPECULATION: === gdk_display_get_default seems to use WAYLAND_DISPLAY if it exists. Related issue in ibus: https://github.com/ibus/ibus/commit/ffdcc6cd1368143b77e6f535e90974651575b02e I am not well versed in gdk/gtk, so this remains just speculation.
Created attachment 8951 diff Sorry, I'm unable to test the attached diff, perhaps can you apply it and build session from source?
I applied the patch, uninstalled my system `xfce4-session`, and ran `make install`. No change. It looks like that setenv line was a false positive, since `xfce4-session` is never launched from `xfconfd`. There still may be something here, but it's not related to this. I have some more info I could share, but it will probably muddy the waters. My issue was with appfinder to begin with. Should I reopen/transfer this to xfce4-appfinder and ask for debug instructions there? Something else I found: `exo-open --launch TerminalEmulator` will also set `DISPLAY=wayland-0` overwriting `DISPLAY=:1`. However, this looks like a separate issue: there is a `g_setenv("DISPLAY"...` in exo.
Created attachment 8955 libxfce4ui xfce-spawn patch, removing DISPLAY setting DO NOT MERGE Removes existing functionality which happens to do the wrong thing on wayland, For demonstration/explanation only.
I have confirmed that this patch to libxfce4ui fixes my problem.
Created attachment 8959 wayland-support.diff An attempt to skip that code path under wayland.
Built and confirmed working on my end, thank you.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/libxfce4ui/-/issues/13. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev