[PATCH] gnu: gdm: Provide custom session.

  • Done
  • quality assurance status badge
Details
3 participants
  • Danny Milosavljevic
  • Ludovic Courtès
  • Timothy Sample
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 6 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20190422141501.6140-1-dannym@scratchpost.org
* gnu/packages/gnome.scm (gdm)[arguments]<#:phases>[install-custom-session]:
Provide custom session.
---
gnu/packages/gnome.scm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

Toggle diff (28 lines)
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.
Ludovic Courtès wrote 6 years ago
Re: bug#35068: GDM crashes when it cannot find any .desktop files
(name . Timothy Sample)(address . samplet@ngyro.com)
87imv1nq47.fsf@gnu.org
Hello,

Timothy Sample <samplet@ngyro.com> skribis:

Toggle quote (23 lines)
> 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’.
Timothy Sample wrote 6 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
87ftq47h2v.fsf@ngyro.com
Hi Ludo and Danny,

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

Toggle quote (33 lines)
> Hello,
>
> Timothy Sample <samplet@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
Closed
Ludovic Courtès wrote 6 years ago
(name . Timothy Sample)(address . samplet@ngyro.com)
87h8ajh0rr.fsf@gnu.org
Timothy Sample <samplet@ngyro.com> skribis:

Toggle quote (2 lines)
> Pushed as 8caa458953eeac783c73a0e5aaa72842fe3914c9.

Thanks!

Toggle quote (4 lines)
> 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’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 35377@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 35377
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help