Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDG_CURRENT_DESKTOP et al. not correctly setup in nested sessions #154

Open
sunweaver opened this issue Mar 15, 2018 · 1 comment
Open

Comments

@sunweaver
Copy link
Member

sunweaver commented Mar 15, 2018

Expected behaviour

When running any variant of a MATE session (local, remote, nested), the XDG_CURRENT_DESKTOP env var contains "MATE" as set in mate-session's main.c file:

        if (g_getenv ("XDG_CURRENT_DESKTOP") == NULL)
                gsm_util_setenv ("XDG_CURRENT_DESKTOP", "MATE");

Actual behaviour

The XDG_CURRENT_DESKTOP env var does not get set with MATE when running in nested Xsessions. When run in nested mode, I get the desktop name of my local/native desktop (which is i3 most of the time).

This behaviour is expectable when looking at the above code snippet. Does anyone know what the reason for the above if clause really was? Does it make sense these days? A MATE session is a MATE session and should be reported as such, shouldn't it?

Steps to reproduce the behaviour

Log into a non-MATE desktop env locally...

terminal-1:$ nxagent -ac :1 (or Xephyr, or Xnest, or, ...)
terminal-2:$ STARTUP=mate-session dbus-run-session /etc/X11/Xsession

Inside MATE: echo $XDG_CURRENT_DESKTOP

MATE general version

1.20

Package version

1.20.0-1

Linux Distribution

Debian testing/unstable

@yetist
Copy link
Member

yetist commented Nov 28, 2018

There is a comment in the GNOME session that seems to explain this problem.

        /* From 3.14 GDM sets XDG_CURRENT_DESKTOP. For compatibility with
         * older versions of GDM,  other display managers, and startx,
         * set a fallback value if we don't find it set.
         */
        if (g_getenv ("XDG_CURRENT_DESKTOP") == NULL) {
            g_setenv("XDG_CURRENT_DESKTOP", "GNOME", TRUE);
            gsm_util_setenv ("XDG_CURRENT_DESKTOP", "GNOME");
        }

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

No branches or pull requests

2 participants