-
Notifications
You must be signed in to change notification settings - Fork 16
Lockscreen/Switch User Screen Problem #2
Comments
Lol, idk why I wasn't watching my own repo. Sorry for the slow response. I think this is an upstream issue since the mock only gets loaded if the greeter is not found. It's hard for me to debug due to a recent issue with development tools breaking (Antergos/web-greeter#109). We'll need to wait until I can get devtools working again unless @lots0logs has the time and is willing to look into this. |
@internauta2000, that would be the lightdm mock I wrote. |
Yes sir. https://github.com/FallingSnow/lightdm-webkit2-material2/blob/master/src/index.js couple of lines down. |
That would imply that lightdm has not been initialized when the greeter loads in wake-up or switch-user mode. Maybe this is an issue with the newly created python code on the lightdm-webkit2-greeter repository? I can assume @cperalt06 is using that version, but I'm not sure about the version @internauta2000 uses. All I can say is that the mockup I created was back when antergos' repository was in plain C. I'd love to debug this further, but I'm going to need some more information from internauta2000. What release is he/she on with the webkit2-greeter, and what python version. It might be that the python code written by the antergos developer(s) has not accounted for deprecation and/or skips over some lines that result in the lightdm object not being created. This is all speculation at this point. You could try to wrap the LightDMMock initialization into a timeout, or listen for a specific set of keypresses instead to see if it's a timing issue. Also, might I suggest using a git-flow which replaces the mockup with an error message and fallback text-login in live code? It seems that this issue which internauta2000 is also experiencing in a way has been going on for some time now. -- I'm actually quite impressed that this mockup keeps the actual greeter framework from panicking so well. |
This issue predates the move to python and I can only assume it is one of the reasons the greeter is being moved to python. Webkit2gtk had many issues which is why I assume the move to python was made.
I don't believe anyone is running the prerelease of web-greeter other than the Antergos devs seeing as its not even on the AUR... you would need to manually install it if you wanted to use it. |
The issues within the antergos repository are all attributed to bad/outdated documentation and maybe even sparse testing last time I checked. (my issue for reference) I don't think that moving to python will fix any of that. But, that's just a thought. What we can do in the meantime is verify if it is a timing issue on said configurations, and if so try to solve that. -- If not, we can both write issues on their repository's chalking board. |
That is completely false. I'd love to know what facts you have used to draw such conclusions. The documentation is 100% up-to-date on the stable branch. You can see it here. It has been up-to-date since the release of version 2.0 last year, btw. In any case, this issue is most likely one of timing. Using |
I must admit, I haven't looked at the documentation since last time I wrote the mock. I based this entirely on the old manual which doesn't even exist anymore.
But how would a GreeterReady event help in determining if the lightdm object is available? You would either be calling GreeterReady on null, or call it on the object and always receive true. Perhaps listening for keypress to initialize the mockup if the lightdm object is not present is the best way to go, let's say <super>+<m> let sequenced = 0;
document.addEventListener("keydown", function(event) {
sequenced = sequenced === 0 ? event.keyCode : sequenced + event.keyCode;
switch(sequenced) {
case 168: // super+m
// initialize mockup if(!("lightdm" in window))
break;
case 184: // super+shift+m
// initialize mockup and override lightdm if it exists
break;
}
});
document.addEventListener("keyup", function() {
sequenced = 0;
}); |
The event will be attached to the global TBH, I do not think its a good practice for themes to load any mock scripts in production environments. Mock scripts are a development tool. They have absolutely no use in production. An end-user should never see the login screen running a mock script. Period. |
My point exactly. |
This should address your guys' concerns: e906b51 |
I just fetched that commit and rebuilt, it didn't work, lightdm didnt start at all with the newly built theme. |
You got the big red error message on your screen? |
No, just black screen and then I just got an option to use the default theme or the fallback theme :/ |
What do the error logs say, usually found in /var/log/lightdm. |
file:///usr/share/lightdm-webkit/themes/material3/bundle.js:59:5862: CONSOLE DEBUG Loading Theme |
Honestly, I have no idea why this is happening. The theme checks if lightdm exists at startup, if it doesn't, it either throws an error that should stop execution or load the mock. The error above suggests neither is happening. Can you give me some insight into what your doing to reproduce this issue? For example, does this happen only when you lock your session? |
The languages aren't loaded when they are accessed? Languages should be an array containing the language objects. -- That's all I can make of the error. |
@FallingSnow it happens when I try to use the theme, so for me it doesn't work at all. I'm using lightdm 1:1.20.0-2 and lightdm-webkit2-greeter 2.2.3-1 for arch/antergos repos if that matters. |
Can you compile the latest commit and try again please. If this doesn't work it has to be upstream and we are better off just waiting for web-greeter. |
I couldn't build it, I got an error with uglifyjs
I removed the following in uglifyjs config in webpack file, then I could build it. collapse_vars: true,
reduce_vars: true When I restarted lightdm it worked at the first login, but after I locked the screen and tried to login again, lightdm used the fallback theme instead. Error from log file
|
I reinstalled it via yaourt and looked at the log for lightdm and found this: Edit: Otherwise, it's fine so far. Thanks for fixing part of the problem! |
This could be the problem. |
It works for me as well, the only problem I have is the same as @cperalt06 has, when locking screen manually it loads the fallback theme |
@crdil Can you try changing this number to something like 10000, recompile, and see if it solves the problem? If that doesn't work maybe try CytoDev's pull request modifications. |
@FallingSnow I still get the same error, that lightdm variable can't be found. I tried both with increasing the setTimeout and pull request. |
@crdil That's odd... Might I suggest wrapping everything into a temporary Something like try {
// all code from index.js
} catch(excepton) {
window.console.error("Error occured in index.js", exception);
} |
I tried to use a try/catch block, but I still get the same error not the error from console.error |
Can confirm this, `$ sudo pacman -Qi lightdm-webkit2-greeter Name : lightdm-webkit2-greeter |
@0xHM, @crdil, I'm unsure about how the webkit greeter handles "native" js logging, I probably should check that out before suggesting potential error-chasing options... Another option would be to literally write all of it to the screen. Just for debugging purpouses ofcourse! -- Then again, if this is an issue with the actual source package - like I suspect, there is little we can do to fix it... bytheway, @crdil, apologies for the late reply! |
@cytodev Let me just give few notes, I'm using https://github.com/FallingSnow/LightDMMock as mock, there is also a bug in there file:///usr/share/lightdm-webkit/themes/arch/mock/LightDMMock.js:575:7: CONSOLE ERROR ReferenceError: Can't find variable: module This can be solved by adding above the last |
@0xHM That is an issue which can be easily resolved, the original branch already has an update compared to the branch @FallingSnow is using as mock. You can see if replacing the mockup with the original fixes this error. - It probably will, but if it doesn't please don't hesitate to file a bug against my repo! |
Lockscreen/Switch User Screen is redirecting to a sample/template Users with some template desktop environments. Which is to say not the ones that are on my system.
To reproduce, just type this in a terminal
dm-tool lock
or just switch users.
Edit:
Just in case you might need this since I noticed someone else had this issue:
The text was updated successfully, but these errors were encountered: