LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Have an active display (desktop?) without screensaver with the keyboard locked out (https://www.linuxquestions.org/questions/slackware-14/have-an-active-display-desktop-without-screensaver-with-the-keyboard-locked-out-669829/)

jjthomas 09-14-2008 05:44 AM

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.

-JJ

hollywoodb 09-16-2008 01:52 PM

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.

jjthomas 09-17-2008 06:12 AM

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.

Any suggestions?

-JJ

keefaz 09-17-2008 06:49 AM

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 ?

jjthomas 09-17-2008 07:01 AM

The code that generates the error is:
Code:

  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?

-JJ

keefaz 09-17-2008 07:08 AM

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()

jjthomas 09-17-2008 08:05 PM

I tried to compile it with xmkmf -DSHADOW_PWD. Still get the same error.

The readme file also says it dos not support shadow passwords.... I may have to go to plan B.

-JJ


All times are GMT -5. The time now is 09:07 AM.