From: "Peter Baumgarten" <me@peterbaumgarten.com>
To: Timothy Sample <samplet@ngyro.com>,
Chris Marusich <cmmarusich@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: Lock screen gnome
Date: Sun, 16 Dec 2018 12:35:21 -0500 [thread overview]
Message-ID: <ab55d862-967e-4fa4-b67c-32f04ad1e47c@sloti2d2t06> (raw)
In-Reply-To: <87r2eivz71.fsf@gmail.com>
[-- 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 --]
next prev parent reply other threads:[~2018-12-16 17:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-12-19 13:52 ` Ludovic Courtès
2018-12-19 19:43 ` Gábor Boskovits
2018-12-20 14:48 ` Timothy Sample
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=ab55d862-967e-4fa4-b67c-32f04ad1e47c@sloti2d2t06 \
--to=me@peterbaumgarten.com \
--cc=cmmarusich@gmail.com \
--cc=help-guix@gnu.org \
--cc=samplet@ngyro.com \
/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).