GNU bug report logs - #35377
[PATCH] gnu: gdm: Provide custom session.

Previous Next

Package: guix-patches;

Reported by: Danny Milosavljevic <dannym <at> scratchpost.org>

Date: Mon, 22 Apr 2019 14:30:02 UTC

Severity: normal

Tags: patch

Done: Timothy Sample <samplet <at> ngyro.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35377 in the body.
You can then email your comments to 35377 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35377; Package guix-patches. (Mon, 22 Apr 2019 14:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 22 Apr 2019 14:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: guix-patches <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH] gnu: gdm: Provide custom session.
Date: Mon, 22 Apr 2019 16:15:01 +0200
* gnu/packages/gnome.scm (gdm)[arguments]<#:phases>[install-custom-session]:
Provide custom session.
---
 gnu/packages/gnome.scm | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 101c0ce13f..e3738fbd93 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5536,6 +5536,23 @@ libxml2.")
                (string-append "\"" (assoc-ref inputs "gnome-session")
                               "/bin/gnome-session\"")))
             #t))
+         (add-after 'install 'install-custom-session
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (builtin-sessions (string-append out
+                                                     "/share/gdm/BuiltInSessions")))
+               (mkdir-p builtin-sessions)
+               (call-with-output-file (string-append builtin-sessions "/custom.desktop")
+                 (lambda (port)
+                   (format port "[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=Custom Session
+Comment=Customized user session (in ~/.xsession)
+X-GDM-BypassXsession=false
+Exec=custom
+")))
+               #t)))
          ;; GDM needs GNOME Session to run these applications.  We link
          ;; their autostart files in `share/gdm/greeter/autostart'
          ;; because GDM explicitly tells GNOME Session to look there.




Information forwarded to guix-patches <at> gnu.org:
bug#35377; Package guix-patches. (Fri, 26 Apr 2019 08:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 35377 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Timothy Sample <samplet <at> ngyro.com>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 35377 <at> debbugs.gnu.org,
 35068 <at> debbugs.gnu.org
Subject: Re: bug#35068: GDM crashes when it cannot find any .desktop files
Date: Fri, 26 Apr 2019 10:10:48 +0200
Hello,

Timothy Sample <samplet <at> ngyro.com> skribis:

> There are two workarounds.  The first is to keep Danny’s patch as-is,
> but add logic to “xinitrc” so that it only uses “~/.xsession” when
> passed “custom” as an argument (it’s kinda magic, but it seems to be a
> common convention).  I have a slight preference for this option, because
> it makes the whole “~/.xsession” thing more explicit.  However, it would
> break other DMs that don’t install a “custom.desktop”.  Maybe we could
> integrate it into all DMs at the service level.
>
> The quicker workaround is to keep the current logic, and install the
> following with GDM:
>
>     [Desktop Entry]
>     Encoding=UTF-8
>     Type=Application
>     Name=Fail
>     Comment=This session always fails.
>     NoDisplay=true
>     Exec=false
>
> This way, GDM fails cleanly when there are no “.desktop” files.  It
> doesn’t show up in the list, either (“NoDisplay=true”), so everything
> just kinda works as expected without any visible changes.

I have a slight preference for the hack you propose Timothy, at least in
the short term, because it seems less likely to break anything than
fiddling with “Exec=custom” and all that.

Anyway, it’d be great if one of you could push a fix by 1.0.  :-)

Thanks,
Ludo’.




Reply sent to Timothy Sample <samplet <at> ngyro.com>:
You have taken responsibility. (Fri, 26 Apr 2019 18:33:03 GMT) Full text and rfc822 format available.

Notification sent to Danny Milosavljevic <dannym <at> scratchpost.org>:
bug acknowledged by developer. (Fri, 26 Apr 2019 18:33:03 GMT) Full text and rfc822 format available.

Message #13 received at 35377-done <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 35068-done <at> debbugs.gnu.org,
 35377-done <at> debbugs.gnu.org
Subject: Re: bug#35068: GDM crashes when it cannot find any .desktop files
Date: Fri, 26 Apr 2019 14:32:40 -0400
Hi Ludo and Danny,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello,
>
> Timothy Sample <samplet <at> ngyro.com> skribis:
>
>> There are two workarounds.  The first is to keep Danny’s patch as-is,
>> but add logic to “xinitrc” so that it only uses “~/.xsession” when
>> passed “custom” as an argument (it’s kinda magic, but it seems to be a
>> common convention).  I have a slight preference for this option, because
>> it makes the whole “~/.xsession” thing more explicit.  However, it would
>> break other DMs that don’t install a “custom.desktop”.  Maybe we could
>> integrate it into all DMs at the service level.
>>
>> The quicker workaround is to keep the current logic, and install the
>> following with GDM:
>>
>>     [Desktop Entry]
>>     Encoding=UTF-8
>>     Type=Application
>>     Name=Fail
>>     Comment=This session always fails.
>>     NoDisplay=true
>>     Exec=false
>>
>> This way, GDM fails cleanly when there are no “.desktop” files.  It
>> doesn’t show up in the list, either (“NoDisplay=true”), so everything
>> just kinda works as expected without any visible changes.
>
> I have a slight preference for the hack you propose Timothy, at least in
> the short term, because it seems less likely to break anything than
> fiddling with “Exec=custom” and all that.
>
> Anyway, it’d be great if one of you could push a fix by 1.0.  :-)

Pushed as 8caa458953eeac783c73a0e5aaa72842fe3914c9.

I’m closing the bug and the patch.  If we want to change the “xinitrc”
script to understand “custom”, we can start a new discussion to figure
out the best way to do it after 1.0.


-- Tim




Information forwarded to guix-patches <at> gnu.org:
bug#35377; Package guix-patches. (Sat, 27 Apr 2019 16:28:02 GMT) Full text and rfc822 format available.

Message #16 received at 35377-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Timothy Sample <samplet <at> ngyro.com>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 35068-done <at> debbugs.gnu.org,
 35377-done <at> debbugs.gnu.org
Subject: Re: bug#35068: GDM crashes when it cannot find any .desktop files
Date: Sat, 27 Apr 2019 18:27:04 +0200
Timothy Sample <samplet <at> ngyro.com> skribis:

> Pushed as 8caa458953eeac783c73a0e5aaa72842fe3914c9.

Thanks!

> I’m closing the bug and the patch.  If we want to change the “xinitrc”
> script to understand “custom”, we can start a new discussion to figure
> out the best way to do it after 1.0.

Sounds good.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 26 May 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 335 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.