all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#73859: lightdm-service-type is almost unusable
@ 2024-10-18  9:23 Dariqq
  2024-10-23 14:48 ` Maxim Cournoyer
  2024-10-24  0:51 ` bug#73859: lightdm Feng Shu
  0 siblings, 2 replies; 4+ messages in thread
From: Dariqq @ 2024-10-18  9:23 UTC (permalink / raw)
  To: 73859

Hi Guix,

This is to report some of the issues and workarounds when trying to 
setup lightdm-service-type.


1. Unable to choose a session (https://issues.guix.gnu.org/68055)

This appearently never worked: https://issues.guix.gnu.org/57168#0

This means one currently has to specify the default session with 
something like

(service lightdm-service-type
	 (lightdm-configuration
	  (seats
	   (list
	    (lightdm-seat-configuration
	     (name "*")
	     (user-session "xfce"))))))

2. gtkgreeter chooses the wrong default session

This is related to 1. If one already had set the default user session 
(i.e. from using default configuration => default.xsession) or one wants 
to use a different session, lightdm gtkgreeter still requests the old one.

After a lot of searching I found this 
https://github.com/Xubuntu/lightdm-gtk-greeter/issues/163 .

I.e. lightdm asks the accountsservice for the default-session rather 
than lightm which still has cashed the old/wrong one. Thus with no 
option to select a different session one is unable to login.

The workaorund here is to delete/modify /var/lib/AccountService/users to 
make sure accountsservice recreates/updates the configurration.


3. After the lightdms users .Xauthority file is created it has wrong 
permissions on subsequent boots.

this can be "fixed" by manually setting less restrictive permissions on 
/var/lib/lightdm/.Xauthority

This might be fixed by making the lightdm-activiation snippet actually 
useful: It currently searches for a file named "directory" to fix 
permissions rather than the content of the variable 'directory'.

(find-files "directory"  #:directories? #t) vs
(find-files directory  #:directories? #t)

here 
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/lightdm.scm#n527

4. tigervnnc

default tigervnc is (file-append tigervnc-server "bin/Xvnc") rather than 
(file-append tigervnc-server "/bin/Xvnc")






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

* bug#73859: lightdm-service-type is almost unusable
  2024-10-18  9:23 bug#73859: lightdm-service-type is almost unusable Dariqq
@ 2024-10-23 14:48 ` Maxim Cournoyer
  2024-10-23 18:15   ` Dariqq
  2024-10-24  0:51 ` bug#73859: lightdm Feng Shu
  1 sibling, 1 reply; 4+ messages in thread
From: Maxim Cournoyer @ 2024-10-23 14:48 UTC (permalink / raw)
  To: Dariqq; +Cc: 73859

Hi Dariqq,

Dariqq <dariqq@posteo.net> writes:

> Hi Guix,
>
> This is to report some of the issues and workarounds when trying to
> setup lightdm-service-type.

Thank you for taking the time to report these detailed findings!

>
> 1. Unable to choose a session (https://issues.guix.gnu.org/68055)
>
> This appearently never worked: https://issues.guix.gnu.org/57168#0

Indeed.  This definitely makes the session manager much less useful.
I'd really like to find a solution to that; I think the issue is
reported upstream here:
https://github.com/Xubuntu/lightdm-gtk-greeter/issues/105.

Just a hunch: perhaps something in the  environment the greeter
runs is missing to have d-bus communication properly working?

> This means one currently has to specify the default session with
> something like
>
> (service lightdm-service-type
> 	 (lightdm-configuration
> 	  (seats
> 	   (list
> 	    (lightdm-seat-configuration
> 	     (name "*")
> 	     (user-session "xfce"))))))
>

[...]

> This might be fixed by making the lightdm-activiation snippet actually
> useful: It currently searches for a file named "directory" to fix
> permissions rather than the content of the variable 'directory'.
>
> (find-files "directory"  #:directories? #t) vs
> (find-files directory  #:directories? #t)
>
> here
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/lightdm.scm#n527

Fixed.

> 4. tigervnnc
>
> default tigervnc is (file-append tigervnc-server "bin/Xvnc") rather
> than (file-append tigervnc-server "/bin/Xvnc")

Also fixed (see commit e4e1e16bc1).

-- 
Thanks,
Maxim




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

* bug#73859: lightdm-service-type is almost unusable
  2024-10-23 14:48 ` Maxim Cournoyer
@ 2024-10-23 18:15   ` Dariqq
  0 siblings, 0 replies; 4+ messages in thread
From: Dariqq @ 2024-10-23 18:15 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 73859

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

Hi Maxim

On 23.10.24 16:48, Maxim Cournoyer wrote:
> Hi Dariqq,
> 
> Dariqq <dariqq@posteo.net> writes:
> 
>> Hi Guix,
>>
>> This is to report some of the issues and workarounds when trying to
>> setup lightdm-service-type.
> 
> Thank you for taking the time to report these detailed findings!
> 
>>
>> 1. Unable to choose a session (https://issues.guix.gnu.org/68055)
>>
>> This appearently never worked: https://issues.guix.gnu.org/57168#0
> 
> Indeed.  This definitely makes the session manager much less useful.
> I'd really like to find a solution to that; I think the issue is
> reported upstream here:
> https://github.com/Xubuntu/lightdm-gtk-greeter/issues/105.
> 
> Just a hunch: perhaps something in the  environment the greeter
> runs is missing to have d-bus communication properly working?
> 
Found all these while trying to switch from xfce to mate on a 32 bit 
machine (plus skipping some tests in mates dependency tree to get it to 
build) and spent way to much time trying to understand how to change the 
default session.

Remotivated by your response I looked into how the greeter actually 
finds the session:

1. The menu just calls out to lightdm_get_sessions
https://github.com/Xubuntu/lightdm-gtk-greeter/blob/master/src/lightdm-gtk-greeter.c#L3186

2. This eventually reaches update_sessions
https://github.com/canonical/lightdm/blob/main/liblightdm-gobject/session.c#L181

Could it just be that it is using the "wrong" values for the session dir 
and not the ones we specified in the lightdm config?
 From what config files (if any) are we reading here?


If this is indeed the issue can we set sysconfdir to /etc and let it 
read the lightdm config file from /etc/lightdm/lightdm.conf (via 
config_load_from_standard_locations)?

I tried something like this (diff attached) and seems to work. I was 
able to choose between xfce and mate and log into either of them.
(only slightly awkward thing is that wed need to overwrite sysconfdir 
for 'make install' and should probably rename the 
lightdm-configuration->greeters-config-dir function).



>> This means one currently has to specify the default session with
>> something like
>>
>> (service lightdm-service-type
>> 	 (lightdm-configuration
>> 	  (seats
>> 	   (list
>> 	    (lightdm-seat-configuration
>> 	     (name "*")
>> 	     (user-session "xfce"))))))
>>
> 
> [...]
> 
>> This might be fixed by making the lightdm-activiation snippet actually
>> useful: It currently searches for a file named "directory" to fix
>> permissions rather than the content of the variable 'directory'.
>>
>> (find-files "directory"  #:directories? #t) vs
>> (find-files directory  #:directories? #t)
>>
>> here
>> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/lightdm.scm#n527
> 
> Fixed.
> 
>> 4. tigervnnc
>>
>> default tigervnc is (file-append tigervnc-server "bin/Xvnc") rather
>> than (file-append tigervnc-server "/bin/Xvnc")
> 
> Also fixed (see commit e4e1e16bc1).
> 

Thanks :)

[-- Attachment #2: lightdm.diff --]
[-- Type: text/x-patch, Size: 2286 bytes --]

diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 5152eb6479..b210b11bc6 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -385,6 +385,7 @@ (define-public lightdm
       #:parallel-tests? #f             ; fails when run in parallel
       #:configure-flags
       #~(list "--localstatedir=/var"
+              "--sysconfdir=/etc"
               "--enable-gtk-doc"
               ;; Otherwise the test suite fails on such a warning.
               "CFLAGS=-Wno-error=missing-prototypes")
@@ -412,7 +413,11 @@ (define-public lightdm
                 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
               ;; Avoid printing locale warnings, which trip up the text
               ;; matching tests.
-              (unsetenv "LC_ALL"))))))
+              (unsetenv "LC_ALL")))
+          (replace 'install
+           (lambda* (#:key make-flags #:allow-other-keys)
+             (apply invoke "make" "install" (string-append "sysconfdir=" #$output "/etc")
+                    make-flags))))))
     (inputs
      (list audit
            bash-minimal                 ;for cross-compilation
diff --git a/gnu/services/lightdm.scm b/gnu/services/lightdm.scm
index 798c106563..9dff263854 100644
--- a/gnu/services/lightdm.scm
+++ b/gnu/services/lightdm.scm
@@ -401,10 +401,11 @@ (define (lightdm-configuration->greeters-config-dir config)
   "Return a directory containing all the serialized greeter configurations
 from CONFIG, a <lightdm-configuration> object."
   (file-union "etc-lightdm"
-              (append-map (lambda (g)
-                            `((,(greeter-configuration->conf-name g)
-                               ,(greeter-configuration->file g))))
-                          (lightdm-configuration-greeters config))))
+              (cons `("lightdm.conf" ,(lightdm-configuration-file config))
+               (append-map (lambda (g)
+                             `((,(greeter-configuration->conf-name g)
+                                ,(greeter-configuration->file g))))
+                           (lightdm-configuration-greeters config)))))
 
 (define (lightdm-configuration->packages config)
   "Return all the greeter packages and their assets defined in CONFIG, a

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

* bug#73859: lightdm
  2024-10-18  9:23 bug#73859: lightdm-service-type is almost unusable Dariqq
  2024-10-23 14:48 ` Maxim Cournoyer
@ 2024-10-24  0:51 ` Feng Shu
  1 sibling, 0 replies; 4+ messages in thread
From: Feng Shu @ 2024-10-24  0:51 UTC (permalink / raw)
  To: 73859


Wow, good news.

Some month ago, I have spend many times to find why session can not be
found, but not success


-- 





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

end of thread, other threads:[~2024-10-24  0:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18  9:23 bug#73859: lightdm-service-type is almost unusable Dariqq
2024-10-23 14:48 ` Maxim Cournoyer
2024-10-23 18:15   ` Dariqq
2024-10-24  0:51 ` bug#73859: lightdm Feng Shu

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.