diff mbox series

[bug#40680] service: sddm: Have sddm-service-type conflict with other display managers.

Message ID 20200417144115.2475-1-efraim@flashner.co.il
State Accepted
Headers show
Series [bug#40680] service: sddm: Have sddm-service-type conflict with other display managers. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Efraim Flashner April 17, 2020, 2:41 p.m. UTC
* gnu/services/sddm.scm (sddm-shepherd-service)[shepherd-service]:
Conflict with 'xorg-server.
---

I was looking over the services list with raingloom on IRC and I noticed
that GDM and Slim both provision xorg-server, while SDDM provisions
display-manager. To ensure that they conflict with each other we can
either:

A: Have SDDM conflict with 'xorg-server

B: Have SDDM also provision 'xorg-server

I'm currently using SDDM (in Wayland mode) to launch an X session of
Enlightenment, so I think it's safe enough to say that SDDM can
provision 'xorg-server.

---

 gnu/services/sddm.scm | 1 +
 1 file changed, 1 insertion(+)

Comments

Ludovic Courtès April 17, 2020, 9 p.m. UTC | #1
Hi Efraim,

Efraim Flashner <efraim@flashner.co.il> skribis:

> * gnu/services/sddm.scm (sddm-shepherd-service)[shepherd-service]:
> Conflict with 'xorg-server.
> ---
>
> I was looking over the services list with raingloom on IRC and I noticed
> that GDM and Slim both provision xorg-server, while SDDM provisions
> display-manager. To ensure that they conflict with each other we can
> either:
>
> A: Have SDDM conflict with 'xorg-server
>
> B: Have SDDM also provision 'xorg-server
>
> I'm currently using SDDM (in Wayland mode) to launch an X session of
> Enlightenment, so I think it's safe enough to say that SDDM can
> provision 'xorg-server.
>
> ---
>
>  gnu/services/sddm.scm | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm
> index 1921afce95..aa08859513 100644
> --- a/gnu/services/sddm.scm
> +++ b/gnu/services/sddm.scm
> @@ -171,6 +171,7 @@ Relogin="              (if (sddm-configuration-relogin? config)
>           (documentation "SDDM display manager.")
>           (requirement '(user-processes))
>           (provision '(display-manager))
> +         (conflicts-with '(xorg-server))

‘conflicts-with’ doesn’t exist, right?  :-)

But yes, I think (provision '(xorg-server display-manager)) would be
fine.

Or we can even drop ‘display-manager’ since it’s not used anywhere else.

Thanks,
Ludo’.
Efraim Flashner April 18, 2020, 6:01 p.m. UTC | #2
On Fri, Apr 17, 2020 at 11:00:49PM +0200, Ludovic Courtès wrote:
> Hi Efraim,
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > * gnu/services/sddm.scm (sddm-shepherd-service)[shepherd-service]:
> > Conflict with 'xorg-server.
> > ---
> >
> > I was looking over the services list with raingloom on IRC and I noticed
> > that GDM and Slim both provision xorg-server, while SDDM provisions
> > display-manager. To ensure that they conflict with each other we can
> > either:
> >
> > A: Have SDDM conflict with 'xorg-server
> >
> > B: Have SDDM also provision 'xorg-server
> >
> > I'm currently using SDDM (in Wayland mode) to launch an X session of
> > Enlightenment, so I think it's safe enough to say that SDDM can
> > provision 'xorg-server.
> >
> > ---
> >
> >  gnu/services/sddm.scm | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm
> > index 1921afce95..aa08859513 100644
> > --- a/gnu/services/sddm.scm
> > +++ b/gnu/services/sddm.scm
> > @@ -171,6 +171,7 @@ Relogin="              (if (sddm-configuration-relogin? config)
> >           (documentation "SDDM display manager.")
> >           (requirement '(user-processes))
> >           (provision '(display-manager))
> > +         (conflicts-with '(xorg-server))
> 
> ‘conflicts-with’ doesn’t exist, right?  :-)
> 

I haven't tried it out for Guix services, but it exists for shepherd
services, according to the manual¹

> But yes, I think (provision '(xorg-server display-manager)) would be
> fine.
> 
> Or we can even drop ‘display-manager’ since it’s not used anywhere else.

Normally I'd be skeptical about dropping it since people might expect it
if they're using sddm, but it'd probably be fine.


¹ https://www.gnu.org/software/shepherd/manual/html_node/Methods-of-services.html#Methods-of-services
Ludovic Courtès April 18, 2020, 11:33 p.m. UTC | #3
Hi,

Efraim Flashner <efraim@flashner.co.il> skribis:

> On Fri, Apr 17, 2020 at 11:00:49PM +0200, Ludovic Courtès wrote:

[...]

>> > --- a/gnu/services/sddm.scm
>> > +++ b/gnu/services/sddm.scm
>> > @@ -171,6 +171,7 @@ Relogin="              (if (sddm-configuration-relogin? config)
>> >           (documentation "SDDM display manager.")
>> >           (requirement '(user-processes))
>> >           (provision '(display-manager))
>> > +         (conflicts-with '(xorg-server))
>> 
>> ‘conflicts-with’ doesn’t exist, right?  :-)
>> 
>
> I haven't tried it out for Guix services, but it exists for shepherd
> services, according to the manual¹

Right, it’s not available in Guix <shepherd-service>.

However, simplify adding ‘xorg-server’ to ‘provision’ should have the
desired effect: ‘guix system’ errors out if more than one service
provides the same symbol.

>> But yes, I think (provision '(xorg-server display-manager)) would be
>> fine.
>> 
>> Or we can even drop ‘display-manager’ since it’s not used anywhere else.
>
> Normally I'd be skeptical about dropping it since people might expect it
> if they're using sddm, but it'd probably be fine.

Yeah, maybe it’s safer to keep it.

Thanks,
Ludo’.
Efraim Flashner April 19, 2020, 6:07 a.m. UTC | #4
On Sun, Apr 19, 2020 at 01:33:07AM +0200, Ludovic Courtès wrote:
> Hi,
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > On Fri, Apr 17, 2020 at 11:00:49PM +0200, Ludovic Courtès wrote:
> 
> [...]
> 
> >> > --- a/gnu/services/sddm.scm
> >> > +++ b/gnu/services/sddm.scm
> >> > @@ -171,6 +171,7 @@ Relogin="              (if (sddm-configuration-relogin? config)
> >> >           (documentation "SDDM display manager.")
> >> >           (requirement '(user-processes))
> >> >           (provision '(display-manager))
> >> > +         (conflicts-with '(xorg-server))
> >> 
> >> ‘conflicts-with’ doesn’t exist, right?  :-)
> >> 
> >
> > I haven't tried it out for Guix services, but it exists for shepherd
> > services, according to the manual¹
> 
> Right, it’s not available in Guix <shepherd-service>.
> 
> However, simplify adding ‘xorg-server’ to ‘provision’ should have the
> desired effect: ‘guix system’ errors out if more than one service
> provides the same symbol.
> 
> >> But yes, I think (provision '(xorg-server display-manager)) would be
> >> fine.
> >> 
> >> Or we can even drop ‘display-manager’ since it’s not used anywhere else.
> >
> > Normally I'd be skeptical about dropping it since people might expect it
> > if they're using sddm, but it'd probably be fine.
> 
> Yeah, maybe it’s safer to keep it.
> 
> Thanks,
> Ludo’.

Sounds good. I put xorg-server first so it more closely matches with the
other ones.
diff mbox series

Patch

diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm
index 1921afce95..aa08859513 100644
--- a/gnu/services/sddm.scm
+++ b/gnu/services/sddm.scm
@@ -171,6 +171,7 @@  Relogin="              (if (sddm-configuration-relogin? config)
          (documentation "SDDM display manager.")
          (requirement '(user-processes))
          (provision '(display-manager))
+         (conflicts-with '(xorg-server))
          (start #~(make-forkexec-constructor #$sddm-command))
          (stop #~(make-kill-destructor)))))