Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633334 - mate-base/mate-session-manager and mate-base/mate-menus should use XDG_CURRENT_DESKTOP
Summary: mate-base/mate-session-manager and mate-base/mate-menus should use XDG_CURREN...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo MATE Desktop
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-03 07:30 UTC by Joakim Tjernlund
Modified: 2020-04-07 18:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joakim Tjernlund 2017-10-03 07:30:46 UTC
10-user-dirs-update-mate, 10-xdg-menu-mate and 15-xdg-data-mate have
this test:
if [ "$DESKTOP_SESSION" = "mate" ]; then
....
fi

Problem with this is that most DM's sets DESKTOP_SESSION to MATE or
/usr/share/xsessions/mate so the test is always false.

What seems stable though is XDG_CURRENT_DESKTOP (both lightdm and sddm)
is always MATE so this test should work:
if [ "$XDG_CURRENT_DESKTOP" = "MATE" ]; then
...
fi
Comment 1 Joakim Tjernlund 2017-10-11 09:36:37 UTC
ping?
Assign to mate@gentoo.org please
Comment 2 Adam Feldman gentoo-dev 2017-10-28 17:37:31 UTC
Do any other DMs install files there and what test do they use?

If the issue is merely one of case, MATE vs mate, why don't we just amend the file to have both, rather than changing to something totally different which may or may not come with its own potential issues?
Comment 3 Joakim Tjernlund 2017-10-29 11:53:03 UTC
(In reply to NP-Hardass from comment #2)
> Do any other DMs install files there and what test do they use?
Not aware of any other DM that installs similar files.
That might indicate that there is another way to do this?

> 
> If the issue is merely one of case, MATE vs mate, why don't we just amend
> the file to have both, rather than changing to something totally different
> which may or may not come with its own potential issues?

As CURRENT... seems to contain somewhat ad hoc values I think it would be
better to switch to XDG_CURRENT.. You could add some tolower func to adjust for case if you want though.
Comment 4 Joakim Tjernlund 2017-10-29 11:54:21 UTC
(In reply to NP-Hardass from comment #2)
> Do any other DMs install files there and what test do they use?
> 
> If the issue is merely one of case, MATE vs mate, why don't we just amend
It is not just case, see above.

> the file to have both, rather than changing to something totally different
> which may or may not come with its own potential issues?
Comment 5 Joakim Tjernlund 2017-11-04 10:31:30 UTC
Ping?
Comment 6 Joakim Tjernlund 2019-04-25 12:11:30 UTC
MATE 1.22.1 is out, could you fix this bug when updating?

PS.
    bunder2015 overlay(github) has 1.22.1 done already.
Comment 7 Larry the Git Cow gentoo-dev 2020-04-06 20:19:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f37bb35c5790f9f708167bd7d156f3a0c8419836

commit f37bb35c5790f9f708167bd7d156f3a0c8419836
Author:     Adam Feldman <NP-Hardass@gentoo.org>
AuthorDate: 2020-04-06 20:06:56 +0000
Commit:     Adam Feldman <NP-Hardass@gentoo.org>
CommitDate: 2020-04-06 20:18:42 +0000

    mate-base/mate-session-manager: Fix #633334
    
    Closes: https://bugs.gentoo.org/633334
    Package-Manager: Portage-2.3.96, Repoman-2.3.21
    Signed-off-by: Adam Feldman <NP-Hardass@gentoo.org>

 .../mate-session-manager/files/10-user-dirs-update-mate-r1     | 10 ++++++++++
 mate-base/mate-session-manager/files/15-xdg-data-mate-r1       |  9 +++++++++
 ...ger-1.22.3.ebuild => mate-session-manager-1.22.3-r1.ebuild} |  4 ++--
 ...ger-1.24.0.ebuild => mate-session-manager-1.24.0-r1.ebuild} |  4 ++--
 4 files changed, 23 insertions(+), 4 deletions(-)
Comment 8 Joakim Tjernlund 2020-04-07 08:06:56 UTC
(In reply to Larry the Git Cow from comment #7)
> The bug has been closed via the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=f37bb35c5790f9f708167bd7d156f3a0c8419836
> 
> commit f37bb35c5790f9f708167bd7d156f3a0c8419836
> Author:     Adam Feldman <NP-Hardass@gentoo.org>
> AuthorDate: 2020-04-06 20:06:56 +0000
> Commit:     Adam Feldman <NP-Hardass@gentoo.org>
> CommitDate: 2020-04-06 20:18:42 +0000
> 
>     mate-base/mate-session-manager: Fix #633334
>     
>     Closes: https://bugs.gentoo.org/633334
>     Package-Manager: Portage-2.3.96, Repoman-2.3.21
>     Signed-off-by: Adam Feldman <NP-Hardass@gentoo.org>
> 
>  .../mate-session-manager/files/10-user-dirs-update-mate-r1     | 10
> ++++++++++
>  mate-base/mate-session-manager/files/15-xdg-data-mate-r1       |  9
> +++++++++
>  ...ger-1.22.3.ebuild => mate-session-manager-1.22.3-r1.ebuild} |  4 ++--
>  ...ger-1.24.0.ebuild => mate-session-manager-1.24.0-r1.ebuild} |  4 ++--
>  4 files changed, 23 insertions(+), 4 deletions(-)

hmm, now I got a test for:
  if [ "$XDG_DESKTOP_SESSION" = "MATE" ]; then
there is no XDG_DESKTOP_SESSION env. var. defined in my session.
There is a XDG_SESSION_DESKTOP and a XDG_CURRENT_DESKTOP though
Comment 9 Larry the Git Cow gentoo-dev 2020-04-07 18:31:34 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=118c72a585b3dd6db178db38f2938e7048a1a13b

commit 118c72a585b3dd6db178db38f2938e7048a1a13b
Author:     Adam Feldman <NP-Hardass@gentoo.org>
AuthorDate: 2020-04-07 18:05:30 +0000
Commit:     Adam Feldman <NP-Hardass@gentoo.org>
CommitDate: 2020-04-07 18:31:12 +0000

    mate-base/mate-session-manager: Fix typo and to hopefully be foolproof
    
    Thanks to Joakim Tjerlund for pointing it out.
    Bug: https://bugs.gentoo.org/633334
    Package-Manager: Portage-2.3.96, Repoman-2.3.21
    Signed-off-by: Adam Feldman <NP-Hardass@gentoo.org>

 .../{10-user-dirs-update-mate-r1 => 10-user-dirs-update-mate-r2}      | 4 +++-
 .../files/{15-xdg-data-mate-r1 => 15-xdg-data-mate-r2}                | 4 +++-
 ...manager-1.22.3-r1.ebuild => mate-session-manager-1.22.3-r2.ebuild} | 4 ++--
 ...manager-1.24.0-r1.ebuild => mate-session-manager-1.24.0-r2.ebuild} | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)
Comment 10 Larry the Git Cow gentoo-dev 2020-04-07 18:50:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f397745b83622b8029220a85e32601ca9d16eb6

commit 3f397745b83622b8029220a85e32601ca9d16eb6
Author:     Adam Feldman <NP-Hardass@gentoo.org>
AuthorDate: 2020-04-07 18:49:40 +0000
Commit:     Adam Feldman <NP-Hardass@gentoo.org>
CommitDate: 2020-04-07 18:50:43 +0000

    mate-base/mate-menus: Finish cleaneup of #633334
    
    Bug: https://bugs.gentoo.org/633334
    Package-Manager: Portage-2.3.96, Repoman-2.3.21
    Signed-off-by: Adam Feldman <NP-Hardass@gentoo.org>

 mate-base/mate-menus/files/10-xdg-menu-mate-r1                   | 9 +++++++++
 .../{mate-menus-1.22.1.ebuild => mate-menus-1.22.1-r1.ebuild}    | 2 +-
 .../{mate-menus-1.24.0.ebuild => mate-menus-1.24.0-r1.ebuild}    | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)