unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* GDM future work
@ 2018-12-30 16:56 Timothy Sample
  2019-01-05 21:21 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Timothy Sample @ 2018-12-30 16:56 UTC (permalink / raw)
  To: guix-devel

Hi Guix,

I have been using GDM on GuixSD for the past few days, and I am quite
happy with it.  A few patches that make it usable just landed on
master.

Now, there is a lot of room left for cleaning it up, but I need some
advice.

The main issue is the way that GDM launches the session bus (the
instance of D-Bus that manages the session).  It launches it from a
clean environment that has little more than what PAM gives from
“/etc/environment” (and “~/.pam_environment”, if it exists).  The result
is that D-Bus can’t find any services, because it doesn’t have
“XDG_DATA_DIRS” set.

Currently, this is solved by patching GDM to thread “XDG_DATA_DIRS” into
the process the launches D-Bus, but that’s not great.  There are at
least two better options.

(1) Extend the PAM environment service so that it puts important
environment variables for D-Bus in “/etc/environment”.  This is easy to
do, and fits pretty naturally with the way that GDM works.

(2) Set up a wrapper script for D-Bus like the wrapper script we
currently use for X.  This way, we could very precisely set up where the
session bus looks for system and user service files.  This seems to be
more like “the Guix way”, but it would mean threading a
“GDM_DBUS_LAUNCH” environment variable through the GDM code (like we
currently do with “GDM_X_SERVER”).

Besides these two options, I get tempted to think even bigger.  We could
replace a lot of the GDM session initialization code with our own code,
and then if we only had per-session Shepherd instances….  That’s
probably too big for right now.  :)

I lean towards option 2, because my understanding is that, in general,
Guix prefers static configuration over dynamic configuration.  This
means that the discoverability gained by option 1 is actually a
liability, since it creates a way for dependencies to exist which are
not declared statically.  The other advantage that option 2 has is that
it would be possible to find service files from the user’s profile.  By
doing this, we avoid having to tell everyone about “~/.pam_environment”
and what to put in there to make D-Bus aware of services in the user’s
profile.

Thoughts?

Besides this, there are few straight-forward things to do.  We need to
make a “libgdm” package that does not depend on “gnome-shell” [1].  It
would be nice to fill out the config record and get rid of the opaque
configuration text file.  We need documentation for GDM in the manual.
Finally, I already miss the Guix logo from SLiM, so even if it is not
the default, I would like a Guix theme to be available.  :)

I will chip away at these as I have time, but of course anyone is
welcome to jump on them if I’m too slow.


[1] https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00231.html


-- Tim

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDM future work
  2018-12-30 16:56 GDM future work Timothy Sample
@ 2019-01-05 21:21 ` Ludovic Courtès
  2019-01-06 15:10   ` Timothy Sample
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2019-01-05 21:21 UTC (permalink / raw)
  To: Timothy Sample; +Cc: guix-devel

Hi Timothy!

Timothy Sample <samplet@ngyro.com> skribis:

> I have been using GDM on GuixSD for the past few days, and I am quite
> happy with it.  A few patches that make it usable just landed on
> master.

Nice!

> The main issue is the way that GDM launches the session bus (the
> instance of D-Bus that manages the session).  It launches it from a
> clean environment that has little more than what PAM gives from
> “/etc/environment” (and “~/.pam_environment”, if it exists).  The result
> is that D-Bus can’t find any services, because it doesn’t have
> “XDG_DATA_DIRS” set.
>
> Currently, this is solved by patching GDM to thread “XDG_DATA_DIRS” into
> the process the launches D-Bus, but that’s not great.  There are at
> least two better options.
>
> (1) Extend the PAM environment service so that it puts important
> environment variables for D-Bus in “/etc/environment”.  This is easy to
> do, and fits pretty naturally with the way that GDM works.
>
> (2) Set up a wrapper script for D-Bus like the wrapper script we
> currently use for X.  This way, we could very precisely set up where the
> session bus looks for system and user service files.  This seems to be
> more like “the Guix way”, but it would mean threading a
> “GDM_DBUS_LAUNCH” environment variable through the GDM code (like we
> currently do with “GDM_X_SERVER”).

Option #2 looks reasonable to me (for the reasons you wrote, “static
binding” and all.)

> Besides these two options, I get tempted to think even bigger.  We could
> replace a lot of the GDM session initialization code with our own code,
> and then if we only had per-session Shepherd instances….  That’s
> probably too big for right now.  :)

Heh, sounds tempting… once 1.0 is out!  :-)

> Besides this, there are few straight-forward things to do.  We need to
> make a “libgdm” package that does not depend on “gnome-shell” [1].  It
> would be nice to fill out the config record and get rid of the opaque
> configuration text file.  We need documentation for GDM in the manual.
> Finally, I already miss the Guix logo from SLiM, so even if it is not
> the default, I would like a Guix theme to be available.  :)
>
> I will chip away at these as I have time, but of course anyone is
> welcome to jump on them if I’m too slow.

Cool, I’d be happy to test it, let us know when you’d like to get test
feedback!

Thanks for working on it!

Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDM future work
  2019-01-05 21:21 ` Ludovic Courtès
@ 2019-01-06 15:10   ` Timothy Sample
  2019-01-09 15:17     ` Ricardo Wurmus
  2019-01-09 21:40     ` Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Timothy Sample @ 2019-01-06 15:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludo,

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

> [...]
>
> Option #2 looks reasonable to me (for the reasons you wrote, “static
> binding” and all.)

Thanks for confirming my intuition.

>
> [...]
>
>> Besides this, there are few straight-forward things to do.  We need to
>> make a “libgdm” package that does not depend on “gnome-shell” [1].  It
>> would be nice to fill out the config record and get rid of the opaque
>> configuration text file.  We need documentation for GDM in the manual.
>> Finally, I already miss the Guix logo from SLiM, so even if it is not
>> the default, I would like a Guix theme to be available.  :)
>>
>> I will chip away at these as I have time, but of course anyone is
>> welcome to jump on them if I’m too slow.
>
> Cool, I’d be happy to test it, let us know when you’d like to get test
> feedback!

It should be okay for testing as it is.  It will not work unless
“gnome-desktop-service” is included in your services.  It does work with
other window managers, but the session switching UI doesn’t seem to
work.  With a bit of fiddling, I got it to start EXWM, but I suspect
it’s only because “exdm” comes before “gnome” when sorted.  (For the
record, I had to remove the “TryExec” key from its desktop entry file.)

Before testing, be sure you can roll-back your system from the
bootloader just in case.  ;)

> Thanks for working on it!

You’re welcome!


-- Tim

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDM future work
  2019-01-06 15:10   ` Timothy Sample
@ 2019-01-09 15:17     ` Ricardo Wurmus
  2019-01-09 21:40     ` Ludovic Courtès
  1 sibling, 0 replies; 7+ messages in thread
From: Ricardo Wurmus @ 2019-01-09 15:17 UTC (permalink / raw)
  To: Timothy Sample; +Cc: guix-devel


Hi Tim,

I tested with (gdm-service) and (gnome-desktop-service) on the
wip-gnome3.30 branch in a virtual machine.  GDM seems to work fine as
far as I can tell.

Thanks!

-- 
Ricardo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDM future work
  2019-01-06 15:10   ` Timothy Sample
  2019-01-09 15:17     ` Ricardo Wurmus
@ 2019-01-09 21:40     ` Ludovic Courtès
  2019-01-09 22:32       ` Timothy Sample
  1 sibling, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2019-01-09 21:40 UTC (permalink / raw)
  To: Timothy Sample; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

Hello Timothy!

Timothy Sample <samplet@ngyro.com> skribis:

> It should be okay for testing as it is.  It will not work unless
> “gnome-desktop-service” is included in your services.  It does work with
> other window managers, but the session switching UI doesn’t seem to
> work.  With a bit of fiddling, I got it to start EXWM, but I suspect
> it’s only because “exdm” comes before “gnome” when sorted.  (For the
> record, I had to remove the “TryExec” key from its desktop entry file.)

I tested in ‘guix system vm’ on ‘master’.  The welcome screen is fairly
gray (do you know how we can change the background image?); it does show
the list of users, specifically those that have a proper password set:


[-- Attachment #2: screenshot --]
[-- Type: image/png, Size: 245828 bytes --]

[-- Attachment #3: Type: text/plain, Size: 186 bytes --]


Logging into GNOME works and screen locking works as well.

I didn’t find a way to select a session other than GNOME, though.
How’s that supposed to work?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDM future work
  2019-01-09 21:40     ` Ludovic Courtès
@ 2019-01-09 22:32       ` Timothy Sample
  2019-01-10  0:15         ` Catonano
  0 siblings, 1 reply; 7+ messages in thread
From: Timothy Sample @ 2019-01-09 22:32 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Hi Ludo,

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

> Hello Timothy!
>
> Timothy Sample <samplet@ngyro.com> skribis:
>
>> It should be okay for testing as it is.  It will not work unless
>> “gnome-desktop-service” is included in your services.  It does work with
>> other window managers, but the session switching UI doesn’t seem to
>> work.  With a bit of fiddling, I got it to start EXWM, but I suspect
>> it’s only because “exdm” comes before “gnome” when sorted.  (For the
>> record, I had to remove the “TryExec” key from its desktop entry file.)
>
> I tested in ‘guix system vm’ on ‘master’.  The welcome screen is fairly
> gray (do you know how we can change the background image?);

I’m not sure about this yet.  The manual says that the default “greeter”
(UI for logging in) can be themed using “gnome-settings-daemon”.  I’d
like something more fun, too, but it is low on the priorities list right
now.  :)

> it does show the list of users, specifically those that have a proper
> password set:
>
>
>
> Logging into GNOME works and screen locking works as well.

\o/

> I didn’t find a way to select a session other than GNOME, though.
> How’s that supposed to work?

Like I said before, this is broken.  Looking at screenshots on the Web,
there’s supposed to be a little gear icon that shows up beside the “Sign
In” button.  We have a problem with GNOME right now where some buttons
are invisible but still work (e.g., the calendar month changing
buttons).  The session switching button is not just invisible, though.
Clicking where it should be doesn’t do anything.  So far, I have no
leads, but I haven’t spent much time on it yet.

Thanks for testing!


-- Tim

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: GDM future work
  2019-01-09 22:32       ` Timothy Sample
@ 2019-01-10  0:15         ` Catonano
  0 siblings, 0 replies; 7+ messages in thread
From: Catonano @ 2019-01-10  0:15 UTC (permalink / raw)
  To: Timothy Sample; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2932 bytes --]

Il giorno mer 9 gen 2019 alle ore 23:33 Timothy Sample <samplet@ngyro.com>
ha scritto:

> Hi Ludo,
>
> Ludovic Courtès <ludo@gnu.org> writes:
>
> > Hello Timothy!
> >
> > Timothy Sample <samplet@ngyro.com> skribis:
> >
> >> It should be okay for testing as it is.  It will not work unless
> >> “gnome-desktop-service” is included in your services.  It does work with
> >> other window managers, but the session switching UI doesn’t seem to
> >> work.  With a bit of fiddling, I got it to start EXWM, but I suspect
> >> it’s only because “exdm” comes before “gnome” when sorted.  (For the
> >> record, I had to remove the “TryExec” key from its desktop entry file.)
> >
> > I tested in ‘guix system vm’ on ‘master’.  The welcome screen is fairly
> > gray (do you know how we can change the background image?);
>
> I’m not sure about this yet.  The manual says that the default “greeter”
> (UI for logging in) can be themed using “gnome-settings-daemon”.  I’d
> like something more fun, too, but it is low on the priorities list right
> now.  :)
>
> > it does show the list of users, specifically those that have a proper
> > password set:
> >
> >
> >
> > Logging into GNOME works and screen locking works as well.
>
> \o/
>
> > I didn’t find a way to select a session other than GNOME, though.
> > How’s that supposed to work?
>
> Like I said before, this is broken.  Looking at screenshots on the Web,
> there’s supposed to be a little gear icon that shows up beside the “Sign
> In” button.  We have a problem with GNOME right now where some buttons
> are invisible but still work (e.g., the calendar month changing
> buttons).  The session switching button is not just invisible, though.
> Clicking where it should be doesn’t do anything.  So far, I have no
> leads, but I haven’t spent much time on it yet.
>
> Thanks for testing!
>
>
> -- Tim
>


On Ubuntu there are  these files:

:~$ ls /usr/share/xsessions/
gnome-classic.desktop  ubuntu-communitheme-snap.desktop
gnome.desktop          ubuntu.desktop
gnome-xorg.desktop     xfce.desktop

and

~$ ls /usr/share/wayland-sessions/
gnome.desktop
ubuntu-communitheme-snap-wayland.desktop
ubuntu-wayland.desktop


These are the sessions that the greeter proposes

For example, the contents of /usr/share/xsessions/ubuntu.desktop are
[Desktop Entry]
Name=Ubuntu
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu gnome-session --$
TryExec=gnome-shell
Type=Application
DesktopNames=ubuntu:GNOME
X-Ubuntu-Gettext-Domain=gnome-session-3.0

and the contents of /usr/share/wayland-sessions/gnome.desktop are

[Desktop Entry]
Name=GNOME
Comment=This session logs you into GNOME
Exec=gnome-session --session=gnome
TryExec=gnome-shell
Type=Application
DesktopNames=GNOME
X-Ubuntu-Gettext-Domain=gnome-session-3.0

[-- Attachment #2: Type: text/html, Size: 3971 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-01-10  0:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-30 16:56 GDM future work Timothy Sample
2019-01-05 21:21 ` Ludovic Courtès
2019-01-06 15:10   ` Timothy Sample
2019-01-09 15:17     ` Ricardo Wurmus
2019-01-09 21:40     ` Ludovic Courtès
2019-01-09 22:32       ` Timothy Sample
2019-01-10  0:15         ` Catonano

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).