SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
#!/bin/bash
username=alexsson
userhome=/home/$username
export XAUTHORITY="$userhome/.Xauthority"
export DISPLAY=":0.0"
case "${1}" in
pre)
su $username -c "/usr/bin/i3lock -B 4 -k --timecolor=ffffff80 --datecolor=ffffff99" &
sleep 1s;
;;
esac
Since, the script itself is executed by "root" (I believe, please correct me if I am wrong), one have to run the lock with a specified username. I would also like to know if it is possible to write a more general script where username is not required.
Do you know where I can find more information regarding elogind? I want to know how to change the "lock"-app, how to "register" e.t.c. The documentation seems to be difficult to find.
I take a look in the SBo/desktop/i3lock for 14.2 and it is patched to disable pam support, see here.
In current which is using pam, to use elogind, the program must be linked to pam libraries.
IMHO, if you are using SBo 14.2 to build i3 for using in current, I think it's better to use the last available version of i3* so the SlackBuild needs some modification and don't disable pam support.
And maybe using xss-lock as locker:
Here is the snippet from i3 4.19 ${HOME}/.config/i3/config:
Code:
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
Last edited by walecha; 12-31-2020 at 07:41 AM.
Reason: xss-lock
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.