unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Meiyo Peng <meiyo@riseup.net>
To: Reza Alizadeh Majd <r.majd@pantherx.org>
Cc: help-guix@gnu.org
Subject: Re: Problem on LXQt service definition
Date: Wed, 15 May 2019 11:28:20 +0800	[thread overview]
Message-ID: <87d0kk5rcb.fsf@riseup.net> (raw)
In-Reply-To: <fd9ccb67-d5ec-432d-9aab-28eb7ffe1254@www.fastmail.com>

Hi,

Reza Alizadeh Majd writes:

> I'll try to create a service for `lxqt-desktop` based on same definition on [nixos](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/desktop-managers/lxqt.nix).
> but my service definition won't start and  here is my proposed definition for this service:

Thank you for your work on LXQt.

> ;;;
> ;;; LXQt desktop service.
> ;;;
>
> (define-record-type* <lxqt-desktop-configuration> lxqt-desktop-configuration
>   make-lxqt-desktop-configuration
>   lxqt-desktop-configuration
>   (lxqt-package lxqt-package (default lxqt)))
>
> (define (lxqt-shepherd-service config)
>   "Return a shepherd service for @command{lxqt-session}"
>   (let ((lxqt-session ((package-direct-input-selector "lxqt-session")
>                        (lxqt-package config))))
>     (list (shepherd-service
>             (provision '(lxqt))
>             ; (requirement '())
>             (documentation "Run the lxqt session")
>             (start #~(make-forkexec-constructor
>                       (list(string-append #$lxqt-session "/bin/startlxqt"))
>                       #:environment-variables
>                       (list (string-append "XDG_CONFIG_DIRS="
>                                            "$XDG_CONFIG_DIRS;/run/current-system/profile/etc/xdg")
>                             (string-append "XDG_DATA_DIRS="
>                                            "$XDG_DATA_DIRS;/run/current-system/profile/share"))
>             (stop #~(make-kill-destructor))))))

I don't think we should start the LXQt session from a shepherd service.
A desktop session should be started by a display manager like GDM or
SDDM.  A display manager can find these desktop sessions and provides
choices on login screen if a desktop package provides correct session
files in prefix/share/xsessions (or prefix/share/wayland-sessions for
wayland sessions).  I am not a nix expert but I think the nix file you
referred to tries to define a desktop session file for LXQt rather than
automatically start it upon system startup.

> (define lxqt-desktop-service-type
>   (service-type
>     (name 'lxqt-desktop)
>     (extensions
>       (list
>             (service-extension shepherd-root-service-type
>                                lxqt-shepherd-service)
>             (service-extension profile-service-type
>                                (compose list
>                                         lxqt-package))))
>     (default-value (lxqt-desktop-configuration))
>     (description "Run the LXQt desktop environment.")))
>
> (define-deprecated (lxqt-desktop-service #:key
>                                          (config
>                                           (lxqt-desktop-configuration)))
>   lxqt-desktop-service-type
>   "Return a service that adds the @code{lxqt} package to the system profile, and
> extends polkit with the actions from @code{lxqt-policykit}."
>   (service lxqt-desktop-service-type config))

Apparently we should not use (define-deprecated ...) to define new variables.

> could anyone help on this matter ?

What are you trying to achieve by adding the lxqt-desktop-service-type?


--
Meiyo Peng
https://www.pengmeiyu.com/

  reply	other threads:[~2019-05-15  3:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13 18:33 Problem on LXQt service definition Reza Alizadeh Majd
2019-05-15  3:28 ` Meiyo Peng [this message]
2019-05-15  9:47   ` Reza Alizadeh Majd
2019-05-15 13:53     ` L p R n d n

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0kk5rcb.fsf@riseup.net \
    --to=meiyo@riseup.net \
    --cc=help-guix@gnu.org \
    --cc=r.majd@pantherx.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).