* Lock screen gnome @ 2018-12-14 20:20 Peter Baumgarten 2018-12-14 22:33 ` Timothy Sample 0 siblings, 1 reply; 7+ messages in thread From: Peter Baumgarten @ 2018-12-14 20:20 UTC (permalink / raw) To: help-guix [-- Attachment #1: Type: text/plain, Size: 1733 bytes --] I just installed guixsd with gnome, but I can not lock the screen when hit the meta key + L Is there anything extra I need to do add this functionality below is the config.scm I am using (use-modules (gnu) (gnu system nss)) (use-service-modules desktop) (use-package-modules certs gnome gnuzilla emacs video) (operating-system (host-name "guix") (timezone "Europe/Paris") (locale "en_US.utf8") ;; Use the UEFI variant of GRUB with the EFI System ;; Partition mounted on /boot/efi. (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi"))) (file-systems (cons* (file-system (device (file-system-label "my-root")) (mount-point "/") (type "btrfs")) (file-system (device (file-system-label "my-boot")) (mount-point "/boot") (type "ext2")) (file-system (device "/dev/sda1") (mount-point "/boot/efi") (type "vfat")) %base-file-systems)) (swap-devices '("/dev/sda3")) (users (cons (user-account (name "me") (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video")) (home-directory "/home/me")) %base-user-accounts)) ;; This is where we specify system-wide packages. (packages (cons* nss-certs ;for HTTPS access gvfs ;for user mounts icecat ;main web browser emacs ;emacs youtube-dl ;download youtube videos %base-packages)) ;; Add GNOME and/or Xfce---we can choose at the log-in ;; screen with F1. Use the "desktop" services, which ;; include the X11 log-in service, networking with ;; NetworkManager, and more. (services (cons* (gnome-desktop-service) %desktop-services)) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) [-- Attachment #2: Type: text/html, Size: 6270 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lock screen gnome 2018-12-14 20:20 Lock screen gnome Peter Baumgarten @ 2018-12-14 22:33 ` Timothy Sample 2018-12-16 5:05 ` Chris Marusich 2018-12-19 13:52 ` Ludovic Courtès 0 siblings, 2 replies; 7+ messages in thread From: Timothy Sample @ 2018-12-14 22:33 UTC (permalink / raw) To: Peter Baumgarten; +Cc: help-guix Hi Peter, "Peter Baumgarten" <me@peterbaumgarten.com> writes: > I just installed guixsd with gnome, but I can not lock the screen when > hit the meta key + L > > Is there anything extra I need to do add this functionality below is > the config.scm I am using AFAIK, the lock screen requires GDM, which currently does not work on GuixSD [1]. For now, I use xlock to lock my screen. If I want to lock and suspend, I use the following rather unglamorous command: $ xlock & (sleep 3; loginctl suspend) If anyone has any better advice, I would love to hear it! Someday I would like to return to fixing GDM, but I am a bit traumatized. It is a very slow and frustrating package to debug. 1. https://lists.gnu.org/archive/html/guix-devel/2017-08/msg00268.html https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00231.html > [...] -- Tim ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lock screen gnome 2018-12-14 22:33 ` Timothy Sample @ 2018-12-16 5:05 ` Chris Marusich 2018-12-16 17:35 ` Peter Baumgarten 2018-12-19 13:52 ` Ludovic Courtès 1 sibling, 1 reply; 7+ messages in thread From: Chris Marusich @ 2018-12-16 5:05 UTC (permalink / raw) To: Peter Baumgarten, Timothy Sample; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 3507 bytes --] Hi Peter and Timothy, Timothy Sample <samplet@ngyro.com> writes: > [...] If I want to lock and suspend, I use the following rather > unglamorous command: > > $ xlock & (sleep 3; loginctl suspend) > > If anyone has any better advice, I would love to hear it! I do something similar, but with xscreensaver. I set it up so that my screen automatically locks after a period of no activity, and also so that I can manually lock it on demand. Here's how I do it. First, in my OS configuration file, I replace all screen lockers in %desktop-services with a screen locker service that uses xscreensaver: (services (cons* (screen-locker-service xscreensaver) (remove-screen-lockers %desktop-services))) The procedure remove-screen-lockers is a custom procedure I've defined in my OS config file. Here it is: (define (remove-services kind-to-remove) "Return a procedure that accepts a single argument (a list of <service> objects) and returns a new list that contains the same elements, but with the specified kind-to-remove removed." (lambda (services) (remove (match-lambda ((? service? s) (eq? kind-to-remove (service-kind s)))) services))) (define remove-screen-lockers (remove-services 'screen-locker)) You don't have to remove all the other screen lockers, but I didn't need them, so I decided to remove them. This installs specifically the "xscreensaver" program as a setuid-root program. This makes it possible to manually start the xscreensaver program and to configure it (both via the "xscreensaver" program). Because I also want to be able to manually lock the screen on demand (via the separate "xscreensaver-command" program), I also install the xscreensaver package to my system profile by adding it to the "packages" field of my OS declaration. You probably don't want to add it to your user profile, since if you do that, your user profile's "xscreensaver" program (which is not setuid-root) will take precedence (via the PATH environment variable) over the setuid-root "xscreensaver" program installed in /run/setuid-programs. Although it's technically possible for xscreensaver to function correctly without being setuid root [1], I haven't figured out how to do it on GuixSD at this time. Once the xscreensaver package is installed, I create an alias in my ~/.bashrc that enables me to lock the screen on demand after xscreensaver has been started. alias lk='xscreensaver-command -activate' Finally, to start xscreensaver automatically when I log into a desktop session, I create an autostart file [2] named ~/.config/autostart/xscreensaver.desktop with the following contents: [Desktop Entry] Version=1.0 Type=Application Name=XScreenSaver Comment=Launch XScreenSaver Exec=xscreensaver -nosplash StartupNotify=false Terminal=false Hidden=false Reconfigure your system and reboot to verify that it still boots. To lock the screen while logged into GNOME or similar, just open a terminal (e.g., GNOME Terminal) and run lk. You can also configure xscreensaver by running xscreensaver-prefs. From there, you can configure xscreenlocker to lock the screen after a certain period of idle time. Anyway, I hope that helps! Footnotes: [1] https://www.jwz.org/xscreensaver/faq.html#setuid [2] https://specifications.freedesktop.org/autostart-spec/0.5/ -- Chris [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lock screen gnome 2018-12-16 5:05 ` Chris Marusich @ 2018-12-16 17:35 ` Peter Baumgarten 0 siblings, 0 replies; 7+ messages in thread From: Peter Baumgarten @ 2018-12-16 17:35 UTC (permalink / raw) To: Timothy Sample, Chris Marusich; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 3928 bytes --] Thank you both. I'm glad it is not a mistake I did. I would like to fix the GDM bug(s) but right now I do not know scheme nor do I know much about how GDM, X, and Wayland work. I am learning scheme from this book though. https://mitpress.mit.edu/sites/default/files/sicp/index.html On Sun, Dec 16, 2018, at 5:05 AM, Chris Marusich wrote: > Hi Peter and Timothy, > > Timothy Sample <samplet@ngyro.com> writes: > > > [...] If I want to lock and suspend, I use the following rather > > unglamorous command: > > > > $ xlock & (sleep 3; loginctl suspend) > > > > If anyone has any better advice, I would love to hear it! > > I do something similar, but with xscreensaver. I set it up so that my > screen automatically locks after a period of no activity, and also so > that I can manually lock it on demand. Here's how I do it. > > First, in my OS configuration file, I replace all screen lockers in > %desktop-services with a screen locker service that uses xscreensaver: > > (services (cons* > (screen-locker-service xscreensaver) > (remove-screen-lockers %desktop-services))) > > The procedure remove-screen-lockers is a custom procedure I've defined > in my OS config file. Here it is: > > (define (remove-services kind-to-remove) > "Return a procedure that accepts a single argument (a list of > <service> objects) and returns a new list that contains the same > elements, but with the specified kind-to-remove removed." > (lambda (services) > (remove (match-lambda > ((? service? s) > (eq? kind-to-remove (service-kind s)))) > services))) > > (define remove-screen-lockers > (remove-services 'screen-locker)) > > You don't have to remove all the other screen lockers, but I didn't need > them, so I decided to remove them. > > This installs specifically the "xscreensaver" program as a setuid-root > program. This makes it possible to manually start the xscreensaver > program and to configure it (both via the "xscreensaver" program). > > Because I also want to be able to manually lock the screen on demand > (via the separate "xscreensaver-command" program), I also install the > xscreensaver package to my system profile by adding it to the "packages" > field of my OS declaration. You probably don't want to add it to your > user profile, since if you do that, your user profile's "xscreensaver" > program (which is not setuid-root) will take precedence (via the PATH > environment variable) over the setuid-root "xscreensaver" program > installed in /run/setuid-programs. Although it's technically possible > for xscreensaver to function correctly without being setuid root [1], I > haven't figured out how to do it on GuixSD at this time. > > Once the xscreensaver package is installed, I create an alias in my > ~/.bashrc that enables me to lock the screen on demand after > xscreensaver has been started. > > alias lk='xscreensaver-command -activate' > > Finally, to start xscreensaver automatically when I log into a desktop > session, I create an autostart file [2] named > ~/.config/autostart/xscreensaver.desktop with the following contents: > > [Desktop Entry] > Version=1.0 > Type=Application > Name=XScreenSaver > Comment=Launch XScreenSaver > Exec=xscreensaver -nosplash > StartupNotify=false > Terminal=false > Hidden=false > > Reconfigure your system and reboot to verify that it still boots. To > lock the screen while logged into GNOME or similar, just open a terminal > (e.g., GNOME Terminal) and run lk. You can also configure xscreensaver > by running xscreensaver-prefs. From there, you can configure > xscreenlocker to lock the screen after a certain period of idle time. > > Anyway, I hope that helps! > > Footnotes: > [1] https://www.jwz.org/xscreensaver/faq.html#setuid > > [2] https://specifications.freedesktop.org/autostart-spec/0.5/ > > -- > Chris > [-- Attachment #2: Type: text/html, Size: 5954 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lock screen gnome 2018-12-14 22:33 ` Timothy Sample 2018-12-16 5:05 ` Chris Marusich @ 2018-12-19 13:52 ` Ludovic Courtès 2018-12-19 19:43 ` Gábor Boskovits 1 sibling, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2018-12-19 13:52 UTC (permalink / raw) To: Timothy Sample; +Cc: Peter Baumgarten, help-guix Hi Timothy, Timothy Sample <samplet@ngyro.com> skribis: > Someday I would like to return to fixing GDM, but I am a bit > traumatized. It is a very slow and frustrating package to debug. > > 1. https://lists.gnu.org/archive/html/guix-devel/2017-08/msg00268.html > https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00231.html I would love to have GDM fixed for 1.0 though, because this GNOME screen-locking issue, among other things, is really problematic. Is there anything we can do to help or otherwise provide motivation? :-) Thanks, Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lock screen gnome 2018-12-19 13:52 ` Ludovic Courtès @ 2018-12-19 19:43 ` Gábor Boskovits 2018-12-20 14:48 ` Timothy Sample 0 siblings, 1 reply; 7+ messages in thread From: Gábor Boskovits @ 2018-12-19 19:43 UTC (permalink / raw) To: Ludovic Courtès; +Cc: help-guix, Peter Baumgarten Hello, Ludovic Courtès <ludo@gnu.org> ezt írta (időpont: 2018. dec. 19., Sze, 14:53): > > Hi Timothy, > > Timothy Sample <samplet@ngyro.com> skribis: > > > Someday I would like to return to fixing GDM, but I am a bit > > traumatized. It is a very slow and frustrating package to debug. > > > > 1. https://lists.gnu.org/archive/html/guix-devel/2017-08/msg00268.html > > https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00231.html > > I would love to have GDM fixed for 1.0 though, because this GNOME > screen-locking issue, among other things, is really problematic. > > Is there anything we can do to help or otherwise provide motivation? > :-) > > Thanks, > Ludo’. > Yes, I also believe we need this. Along with the screen-locking multi-monitor support and i18n support comes to mind. If we can help in any way, please feel free to contact us. Thanks, g_bor ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Lock screen gnome 2018-12-19 19:43 ` Gábor Boskovits @ 2018-12-20 14:48 ` Timothy Sample 0 siblings, 0 replies; 7+ messages in thread From: Timothy Sample @ 2018-12-20 14:48 UTC (permalink / raw) To: Gábor Boskovits; +Cc: Peter Baumgarten, help-guix Hi Ludo and Gábor, Gábor Boskovits <boskovits@gmail.com> writes: > Hello, > > Ludovic Courtès <ludo@gnu.org> ezt írta (időpont: 2018. dec. 19., Sze, 14:53): >> >> Hi Timothy, >> >> Timothy Sample <samplet@ngyro.com> skribis: >> >> > Someday I would like to return to fixing GDM, but I am a bit >> > traumatized. It is a very slow and frustrating package to debug. >> > >> > 1. https://lists.gnu.org/archive/html/guix-devel/2017-08/msg00268.html >> > https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00231.html >> >> I would love to have GDM fixed for 1.0 though, because this GNOME >> screen-locking issue, among other things, is really problematic. >> >> Is there anything we can do to help or otherwise provide motivation? >> :-) >> >> Thanks, >> Ludo’. >> > > Yes, I also believe we need this. Along with the screen-locking > multi-monitor support and i18n support comes to mind. > > If we can help in any way, please feel free to contact us. > > Thanks, > g_bor The way I was testing it was by running it in a VM. This made testing any little idea take way too long. It would be nice to have a faster way of testing it. If anyone has any experience running a nested instance of GDM, being able to do that would be a big help. (The trade off is that figuring that out might be just as hard as fixing GDM in the first place.) Other than that, I agree that this is a critical feature. GNOME needs GDM to work smoothly, and GNOME is pretty important for wider adoption. I am happy to take another look at this (eventually!), but I do not have any particular expertise here, so if anyone else is feeling brave, they would have just as good a chance at fixing it as me. :) -- Tim ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-20 14:49 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-12-14 20:20 Lock screen gnome Peter Baumgarten 2018-12-14 22:33 ` Timothy Sample 2018-12-16 5:05 ` Chris Marusich 2018-12-16 17:35 ` Peter Baumgarten 2018-12-19 13:52 ` Ludovic Courtès 2018-12-19 19:43 ` Gábor Boskovits 2018-12-20 14:48 ` Timothy Sample
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).