Have an active display (desktop?) without screensaver with the keyboard locked out
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.
Have an active display (desktop?) without screensaver with the keyboard locked out
I want to have my computer display a running program but have the keyboard and mouse password protected. Is this possible?
I looked at the "running "fake" display with keyboard input" thread, but that is not what I want. I want to have something like top running on the monitor, with the keyboard and mouse disabled, and the screen saver turned off.
I think xtrlock is exactly what you're looking for. It's in the Debian repositories, not sure about other distros.
It changes the mouse cursor to a padlock (displays when you move the mouse) and doesn't obstruct the screen in any way. You type the current user's password and it unlocks. It doesn't accept any other keyboard input, it just unlocks when the password is typed.
xtrlock is excatly what I am looking for. I was able to get it compiled and installed without any errors. However, when I try to start it gives me a
"password entry has no pwd" error.
I looked through the source code, not that I am a guru in such things, but from what I can tell it is getting the password based on the uid ...which makes sense.... but I am not able to figure out what file, or where, it is looking in for the password.
pwd is the current working directory, maybe it is the user home dir in password entry point of view ?
Does /etc/passwd home directory look correct for the uid you use ?
if (strlen(pw->pw_passwd) < 13) {
fputs("password entry has no pwd\n",stderr); exit(1);
... I think in this case it is telling me it can't find the password. Since this is a debian based program... I wonder where it is looking for the password information?
You may find the answer by searching how pw is declared in xtrlock source code file
[edit]
the struct of pw_passwd member is defined in /usr/include/pwd.h, this include file is used for passwords stored in /etc/passwd but in Slackware, passwords are in /etc/shadow!
So you need to rewrite the program to include shadow support if it does not support it
Basically you have to include /usr/include/shadow.h; define a pointer to the spwd structure and use getspnam() instead of getpwnam()
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.