bryanbecker / glitchdm

A LightDM Webkit Greeter Theme with unknown purpose. Extremely rare.
GNU General Public License v3.0
46 stars 2 forks source link

Theme breaks after logout #1

Open bajidu opened 7 years ago

bajidu commented 7 years ago

First start: everything fine. Logout: Theme breaks (message that theme is broken and the login boxes are missing). Using archlinux and got the webkit2-greeter 2.2.3.1 from the AUR. Im using i3 (if that is of any importance). After activating debug mode /var/log/lightdm/seat0-greeter.log tells me: file:///usr/share/lightdm-webkit/themes/glitchdm/js/main.js:1:30: CONSOLE ERROR ReferenceError: Can't find variable: lightdm. Any idea what I might have done wrong?

I'm pretty new to Linux so if im missing anything let me know!

bryanbecker commented 7 years ago

I see you closed this issue? Did you end up finding the problem?

bajidu commented 7 years ago

Hi there! Thanks for the awesome theme first. The issue has something to do with webkit2 greeter and javascript; I contributed to an issue there. Your theme as well as musfealla are bugged; Both claim they cant find the variable lightdm in main.js. Weirdly on reboot the first login usually works, but logging out causes the theme to crash - still shows, just the user and password forms are missing. Btw how can I "remove" the username, so that it only shows "blanks" login forms? Tried something with hidden users and stuff in the lightdm.conf but didnt work out directly. Sorry for all the trouble and thanks again!

2017-03-01 3:52 GMT+01:00 Bryan notifications@github.com:

I see you closed this issue? Did you end up finding the problem?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bryanbecker/glitchdm/issues/1#issuecomment-283229898, or mute the thread https://github.com/notifications/unsubscribe-auth/AY3inV0g28rJZ4_OfC19pr6gIOoJwe97ks5rhN1_gaJpZM4MN3I1 .

bryanbecker commented 7 years ago

If you know CSS and HTML, you can edit this super easily (bonus points for javascript).

If you just want to remove the entire username field (so there is only a password field, it's a pretty simple change)

I just pushed a commit that makes it slightly easier to do this by adding an ID attribute to the password and username fields.

Now just open index.html and edit the CSS for #usernameField and change from display: block; to display: none; here: https://github.com/bryanbecker/glitchdm/blob/master/index.html#L42-L44

bryanbecker commented 7 years ago

By the way, is this your issue? https://github.com/Antergos/web-greeter/issues/109

bajidu commented 7 years ago

Hi there! First of all, thanks for the explanation! Now that you say it it's so obvious! The issue I reported to is this one: https://github.com/Antergos/web-greeter/issues/108 which seemed closer to the problem I ran into! I just wonder why it works on the first login but not thereafter...

All the best!

2017-03-02 3:26 GMT+01:00 Bryan notifications@github.com:

By the way, is this your issue? Antergos/web-greeter#109 https://github.com/Antergos/web-greeter/issues/109

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bryanbecker/glitchdm/issues/1#issuecomment-283536964, or mute the thread https://github.com/notifications/unsubscribe-auth/AY3infUguz0db5TSYjSA8th38I-jd0nrks5rhijQgaJpZM4MN3I1 .

bajidu commented 7 years ago

I think I found the problem. The way main.js tries to access sessions is old and not used by newer versions of the greeter (check out mock.js in the _venders/js). So obviously there is no object "lightdm" to get any session from.

EDIT: Don't worry, I know its not your code in main.js anyway; Just so you know that the new version of mock.js of the greeter seems to vary quite a bit from the one in this project (and musfealla). I don't know if that is actually causing the problem or if themes should be self sufficient with their javascripts. Anyway thanks for the theme and all the help again!

bryanbecker commented 7 years ago

Thanks for the tip!

When I have a chance this week I'll look into updating the main.js