Multiple slim services

  • Done
  • quality assurance status badge
Details
3 participants
  • André A. Gomes
  • Carlo Zancanaro
  • Josselin Poiret
Owner
unassigned
Submitted by
André A. Gomes
Severity
normal
A
A
André A. Gomes wrote on 12 May 2022 23:56
(address . bug-guix@gnu.org)
87o802wh2p.fsf@gmail.com
Hi Guix,

The manual (see (info "(guix) X Window")) mentions that it's possible to
add two slim services but it seems not to work. When I tried to
reconfigure the system it gives the following error:

Toggle snippet (3 lines)
guix system: error: more than one target service of type 'slim'

Thanks.


--
André A. Gomes
"You cannot even find the ruins..."
J
J
Josselin Poiret wrote on 13 May 2022 08:38
87bkw2szrt.fsf@jpoiret.xyz
Hello André,

André A. Gomes <andremegafone@gmail.com> writes:

Toggle quote (10 lines)
> Hi Guix,
>
> The manual (see (info "(guix) X Window")) mentions that it's possible to
> add two slim services but it seems not to work. When I tried to
> reconfigure the system it gives the following error:
>
> --8<---------------cut here---------------start------------->8---
> guix system: error: more than one target service of type 'slim'
> --8<---------------cut here---------------end--------------->8---

If I understand the relevant code properly, this should happen only when
you try to extend a service type (eg. slim-service-type) with another
service, but you have multiple instances of the given service type, and
so guix system can't disambiguate between the two (it would be better if
you could manually specify that imho, but alas). Could you post a
snippet of your config, especially the service part?

Best,
--
Josselin Poiret
A
A
André A. Gomes wrote on 16 May 2022 23:39
(name . Josselin Poiret via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
87fsl9ma1g.fsf@gmail.com
Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

Toggle quote (21 lines)
> Hello André,
>
> André A. Gomes <andremegafone@gmail.com> writes:
>
>> Hi Guix,
>>
>> The manual (see (info "(guix) X Window")) mentions that it's possible to
>> add two slim services but it seems not to work. When I tried to
>> reconfigure the system it gives the following error:
>>
>> --8<---------------cut here---------------start------------->8---
>> guix system: error: more than one target service of type 'slim'
>> --8<---------------cut here---------------end--------------->8---
>
> If I understand the relevant code properly, this should happen only when
> you try to extend a service type (eg. slim-service-type) with another
> service, but you have multiple instances of the given service type, and
> so guix system can't disambiguate between the two (it would be better if
> you could manually specify that imho, but alas). Could you post a
> snippet of your config, especially the service part?

Here it goes. The manual states that you can have two slim services on
different ttys. Am I misinterpreting something? Thank you!

Toggle snippet (34 lines)
(services (cons* (set-xorg-configuration (xorg-configuration
(modules (list xf86-input-libinput
xf86-input-evdev
xf86-input-wacom))
(keyboard-layout keyboard-layout)
(server-arguments
;; disable screen-saver timeout
(append (list "-s" "0")
%default-xorg-server-arguments))
(extra-config (list xorg-touchpad
xorg-monitor)))
slim-service-type)
(service slim-service-type (slim-configuration (display ":0")
(vt "vt7")))
;; Doesn't work to add a 2nd service of the same type,
;; contrary to what the docs say
;; (service slim-service-type (slim-configuration (display ":0")
;; (vt "vt8")))
(modify-services %desktop-services
(guix-service-type
config => (guix-configuration
(inherit config)
(substitute-urls
(append (list "https://substitutes.nonguix.org")
%default-substitute-urls))
(authorized-keys
(append (list (plain-file "non-guix.pub"
nonguix-key))
%default-authorized-guix-keys))))
(delete gdm-service-type)
(delete (screen-locker-service xlockmore "xlock")))))


--
André A. Gomes
"You cannot even find the ruins..."
C
C
Carlo Zancanaro wrote on 17 May 2022 01:29
(name . André A. Gomes)(address . andremegafone@gmail.com)
87h75pavec.fsf@zancanaro.id.au
Hi André,

On Mon, May 16 2022, André A. Gomes wrote:
Toggle quote (4 lines)
> Here it goes. The manual states that you can have two slim
> services on different ttys. Am I misinterpreting something?
> Thank you!

I don't think you're misinterpreting anything, but Josselin is
correct when they say

On Fri, May 13 2022, Josselin Poiret wrote:
Toggle quote (4 lines)
> If I understand the relevant code properly, this should happen
> only when you try to extend a service type (eg.
> slim-service-type) with another service

In your case, you're using set-xorg-configuration which tries to
extend your slim-service-type service. Unfortunately, you want to
define two of them, which causes the extension mechanism to fail
complaining about the ambiguity.

You should be able to fix this by adding the xorg-configuration
directly into the slim service that you're defining, something
like this:

(cons* (service slim-service-type (slim-configuration
(display ":0")
(vt "vt7")
(xorg-configuration
(xorg-configuration
(modules (list
xf86-input-libinput
xf86-input-evdev
xf86-input-wacom))
(keyboard-layout
keyboard-layout)
(server-arguments
;; disable screen-saver
timeout
(append (list "-s" "0")
%default-xorg-server-arguments))
(extra-config (list
xorg-touchpad
xorg-monitor))))))
(service slim-service-type (slim-configuration
(display ":0")
(vt "vt8")
;; I wasn't sure if you
wanted the same
;; xorg-configuration here,
so I left it out.
))
(modify-services %desktop-services
(delete gdm-service-type)
(delete (screen-locker-service xlockmore "xlock"))))

I hope that helps,

Carlo
A
A
André A. Gomes wrote on 17 May 2022 17:31
(name . Carlo Zancanaro)(address . carlo@zancanaro.id.au)
878rr0rx9r.fsf@gmail.com
Carlo Zancanaro <carlo@zancanaro.id.au> writes:

Toggle quote (53 lines)
> Hi André,
>
> On Mon, May 16 2022, André A. Gomes wrote:
>> Here it goes. The manual states that you can have two slim services
>> on different ttys. Am I misinterpreting something? Thank you!
>
> I don't think you're misinterpreting anything, but Josselin is correct
> when they say
>
> On Fri, May 13 2022, Josselin Poiret wrote:
>> If I understand the relevant code properly, this should happen only
>> when you try to extend a service type (eg. slim-service-type) with
>> another service
>
> In your case, you're using set-xorg-configuration which tries to extend
> your slim-service-type service. Unfortunately, you want to define two of
> them, which causes the extension mechanism to fail complaining about the
> ambiguity.
>
> You should be able to fix this by adding the xorg-configuration directly
> into the slim service that you're defining, something like this:
>
> (cons* (service slim-service-type (slim-configuration
> (display ":0")
> (vt "vt7")
> (xorg-configuration
> (xorg-configuration
> (modules (list
> xf86-input-libinput
> xf86-input-evdev
> xf86-input-wacom))
> (keyboard-layout
> keyboard-layout)
> (server-arguments
> ;; disable screen-saver
> timeout
> (append (list "-s" "0")
> %default-xorg-server-arguments))
> (extra-config (list
> xorg-touchpad
> xorg-monitor))))))
> (service slim-service-type (slim-configuration
> (display ":0")
> (vt "vt8")
> ;; I wasn't sure if you
> wanted the same
> ;; xorg-configuration here,
> so I left it out.
> ))
> (modify-services %desktop-services
> (delete gdm-service-type)
> (delete (screen-locker-service xlockmore "xlock"))))

Hi Carlo Zancanaro,

It all makes sense now! I really appreciate your help, thanks :)


--
André A. Gomes
"You cannot even find the ruins..."
A
A
André A. Gomes wrote on 17 May 2022 17:38
(address . 55391-done@debbugs.gnu.org)
87y1z0qiea.fsf@gmail.com

?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 55391
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