mbox series

[bug#34470,0/8] GDM without GNOME Desktop

Message ID 87o97fijyh.fsf@ngyro.com
Headers show
Series GDM without GNOME Desktop | expand

Message

Timothy Sample Feb. 13, 2019, 7:09 p.m. UTC
Hi Guix,

This patch series fixes up a few things with GDM.  The main one is that
GDM no longer requires the GNOME Desktop service to be included in the
system services.  It no longer blindly hopes that everything it needs
happens to be in “/run/current-system/profile”.  Now it mostly knows
where to find its dependencies directly, and in the cases it doesn’t, it
makes sure that what it needs is in the system profile.

Around this, I did some cleaning.  GDM now looks directly at its
configuration file in the store rather than at a link in “/etc”, and a
repetitive section of messy substitutions is now a loop.

I added a D-Bus wrapper script as discussed before [1].  It doesn’t do
much, but it is there to be improved if needed.

This series also includes the user X session scripts that were recently
discussed [2].


-- Tim

[1] https://lists.gnu.org/archive/html/guix-devel/2019-01/msg00047.html
[2] https://lists.gnu.org/archive/html/guix-devel/2019-02/msg00198.html

Timothy Sample (8):
  services: gdm: Remove etc service.
  gnu: gnome-session: Use absolute paths in .desktop files.
  gnu: gdm: Add links to required login-session files.
  gnu: gdm: Use absolute path for gnome-session.
  gnu: gdm: Simplify pre-configure phase.
  gnu: gdm: Run dbus-daemon via a wrapper script.
  services: gdm: Make dependencies explicit.
  services: gdm: Allow for custom X session scripts.

 gnu/packages/gnome.scm |  96 +++++++++++++++++++++-------------
 gnu/services/xorg.scm  | 113 +++++++++++++++++++++++++----------------
 2 files changed, 130 insertions(+), 79 deletions(-)

Comments

Ludovic Courtès Feb. 16, 2019, 11:09 p.m. UTC | #1
Hello,

Timothy Sample <samplet@ngyro.com> skribis:

>   services: gdm: Remove etc service.
>   gnu: gnome-session: Use absolute paths in .desktop files.
>   gnu: gdm: Add links to required login-session files.
>   gnu: gdm: Use absolute path for gnome-session.
>   gnu: gdm: Simplify pre-configure phase.
>   gnu: gdm: Run dbus-daemon via a wrapper script.
>   services: gdm: Make dependencies explicit.
>   services: gdm: Allow for custom X session scripts.

Very nice!  I’ve pushed everything but patch #4 (“Use absolute path for
gnome-session.”) for the reason given in my other message.

Let’s see if we can avoid it this last patch.

Thank you!

Ludo’.
Timothy Sample Feb. 17, 2019, 3:13 p.m. UTC | #2
Hi Ludo,

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

> Hi!
>
> Timothy Sample <samplet@ngyro.com> skribis:
>
>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>> phase to substitute in the absolute path of gnome-session.
>> [inputs]: Add gnome-session.
>
> This patch means that we’re pulling in GNOME even when we don’t actually
> need it:
>
> $ guix size gdm |tail -1
> total: 909.4 MiB
> $ guix size gdm gnome-session |tail -1
> total: 1011.8 MiB
>
> Do you think we could avoid that?

My understanding is that the login screen is more or less a normal user
session brought up by gnome-session for the “gdm” user.  Shy of
re-implementing the parts of gnome-session we need, I don’t have any
ideas on how to avoid this dependency.  I know that GDM sends it a list
of components to initialize (e.g., GNOME Shell), but I don’t know what
else it does for GDM.

My guess is that it would be possible to trim down some of these
packages to recover the space.  GDM is very heavy-weight software, but
1G seems like a lot.

:(


-- Tim
Ludovic Courtès March 4, 2019, 10:38 a.m. UTC | #3
Hi Timothy,

Timothy Sample <samplet@ngyro.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi!
>>
>> Timothy Sample <samplet@ngyro.com> skribis:
>>
>>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>>> phase to substitute in the absolute path of gnome-session.
>>> [inputs]: Add gnome-session.
>>
>> This patch means that we’re pulling in GNOME even when we don’t actually
>> need it:
>>
>> $ guix size gdm |tail -1
>> total: 909.4 MiB
>> $ guix size gdm gnome-session |tail -1
>> total: 1011.8 MiB
>>
>> Do you think we could avoid that?
>
> My understanding is that the login screen is more or less a normal user
> session brought up by gnome-session for the “gdm” user.  Shy of
> re-implementing the parts of gnome-session we need, I don’t have any
> ideas on how to avoid this dependency.  I know that GDM sends it a list
> of components to initialize (e.g., GNOME Shell), but I don’t know what
> else it does for GDM.

GDM does seem to work without that dependency though (on current
master); or is there missing functionality?

If we must have it though, let’s have it, and we can then see how to
trim that closure.

Thanks,
Ludo’.
Timothy Sample March 4, 2019, 4:47 p.m. UTC | #4
Hi Ludo,

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

> [...]
>
>>>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>>>> phase to substitute in the absolute path of gnome-session.
>>>> [inputs]: Add gnome-session.
>
> [...]
>
> GDM does seem to work without that dependency though (on current
> master); or is there missing functionality?

It turns out you committed this patch to master as
def6d6b61685f69421df80cb524ba94da5dadd42.

If I revert the commit, GDM does not work (without GNOME installed in
the system profile).

If there is a way to work around GNOME Session, I’m not clever enough to
think of it.  :(

> If we must have it though, let’s have it, and we can then see how to
> trim that closure.

I looked at this briefly when you first brought it up, because I thought
there would be something blindingly obvious that I could cut out.
Unfortunately, I didn’t find anything.  It probably can be tightened up,
it just needs to examined a bit more carefully.


-- Tim
Ludovic Courtès March 4, 2019, 9:08 p.m. UTC | #5
Hello!

Timothy Sample <samplet@ngyro.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> [...]
>>
>>>>> * gnu/packages/gnome.scm (gdm)[arguments]: Modify the pre-configure
>>>>> phase to substitute in the absolute path of gnome-session.
>>>>> [inputs]: Add gnome-session.
>>
>> [...]
>>
>> GDM does seem to work without that dependency though (on current
>> master); or is there missing functionality?
>
> It turns out you committed this patch to master as
> def6d6b61685f69421df80cb524ba94da5dadd42.

Oh, true; two weeks of vacations and everything is forgotten.  :-)

> If I revert the commit, GDM does not work (without GNOME installed in
> the system profile).
>
> If there is a way to work around GNOME Session, I’m not clever enough to
> think of it.  :(

Alright, well so be it.

Then I guess the next step is to stare at ‘guix size gdm’ in search of
ways to trim the closure.  It might not be that hard actually:

--8<---------------cut here---------------start------------->8---
$ guix size gdm |head
store item                                                       total    self
/gnu/store/bvnj04sqiwc1gcis29swk6likyc5dw8f-llvm-6.0.1             268.1   104.5   7.7%
/gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0              161.9    93.7   6.9%
/gnu/store/b7fqhszxl02g6pfm3vw6b3cjz472qrly-python-3.7.0           182.8    74.6   5.5%
/gnu/store/j6g996l8kxxv8c76a9c61n3gi4s0wvdr-mesa-18.3.1            360.5    63.8   4.7%
/gnu/store/dna8kpb00kq176rz8x69yy4j33my2q55-perl-5.28.0            146.3    58.2   4.3%
/gnu/store/g87hamjyipk1j6dfq5pjfzfnfb64spbv-python2-2.7.15         163.6    56.6   4.2%
/gnu/store/fh42kncsw279yn24kcqiydmqbzg3iv3a-mozjs-52.0-1.6507e63   209.6    54.0   4.0%
/gnu/store/f2y93basw0ykg7spgxbxsy95l64fhbc9-gtk+-3.24.2            702.4    45.5   3.4%
/gnu/store/9alic3caqhay3h8mx4iihpmyj6ymqpcx-guile-2.2.4            121.9    44.4   3.3%
--8<---------------cut here---------------end--------------->8---

That GCC is out of place and that LLVM is surely too big.

>> If we must have it though, let’s have it, and we can then see how to
>> trim that closure.
>
> I looked at this briefly when you first brought it up, because I thought
> there would be something blindingly obvious that I could cut out.
> Unfortunately, I didn’t find anything.  It probably can be tightened up,
> it just needs to examined a bit more carefully.

Yup, we’ll see.

Closing this issue now anyway.

Thank you!

Ludo’.