XLock issue

Moderator: BarryK

Post Reply
User avatar
OscarTalks
Posts: 623
Joined: Tue Jul 14, 2020 10:11 pm
Location: London UK
Has thanked: 2 times
Been thanked: 247 times

XLock issue

Post by OscarTalks »

Not sure if this is something which is important or if it can or should be looked at. I think it has been this way for some time.
Here is the scenario:-
You are exploring your desktop and you click on the "Lock" icon or XLock menu entry to see what it is about.
The little window opens asking you to enter a chosen Key (Password).
You think "Oh, OK, that is interesting, when I want to lock my screen later I will come back to this and enter my Key".
So you close the little window (via the top right corner "X") and continue your exploring or whatever you are doing.
At the end of your session, you try the "Lock" icon again and it doesn't work.
This seems to be because closing the little "Key" window without entering a key creates a blank file at /root/.xlockrc
This blank file prevents XLock from opening, because it is supposed to contain encrypted data of the password key (which was not entered by the user).
So is there some code which could be added to the XLock program which will prevent this from happening?

User avatar
MochiMoppel
Posts: 1243
Joined: Mon Jun 15, 2020 6:25 am
Location: Japan
Has thanked: 21 times
Been thanked: 444 times

Re: XLock issue

Post by MochiMoppel »

OscarTalks wrote:

is there some code which could be added to the XLock program which will prevent this from happening?

Adding one line in file /usr/local/apps/Xlock/AppRun should do the trick:

if [ ! -f $HOME/.xlockrc ];then
XLOCKPARAMS="`cat $HOME/.config/Xlock/xlockscreenparams`"
rxvt -g 36x1 -title "Create key (password)" -e xlock $XLOCKPARAMS
[ ! -s $HOME/.xlockrc ] && rm $HOME/.xlockrc

I've never used Xlock and my version is old, so test carefully ;)
Is this really an EasyOS specific issue?

User avatar
OscarTalks
Posts: 623
Joined: Tue Jul 14, 2020 10:11 pm
Location: London UK
Has thanked: 2 times
Been thanked: 247 times

Re: XLock issue

Post by OscarTalks »

Hello Mochi,

Thanks for the reply. I have tested your suggested solution and it appears to work fine. I don't use Xlock myself either. I have looked at it in the past to see what it does, but don't personally have a need for it. There was a thread in the Bionic section of the forum in which someone was asking why his Xlock was not working, so maybe that was an example of the scenario I described. It alerted me to this issue so I thought it would be good to ask about it.

You are correct in saying that the issue applies more widely to all Puppies (as far as I know). I was thinking about posting in another section, but since it does also apply to EasyOS which I have been testing recently, and because I think the script is originally a BarryK creation (although others have worked on it too) I thought I would mention it here first.

Post Reply

Return to “EasyOS”