Desktop-Environment icon indicating copy to clipboard operation
Desktop-Environment copied to clipboard

Login screen: Rewritten from scratch

Open ADeswanta opened this issue 4 years ago • 27 comments

I've rewritten the login screen with a few files and take a bit of reference from the current one.

Some elements need to be worked/usable (checked for done):

  • [x] Power menu
  • [x] Session mode
  • [x] Brightness controller
  • [x] Battery indicator (no dialog)
  • [x] Keyboard layouts
  • [x] Time and date
  • [x] Password reset feature/information
  • [x] Time format option

and some tests:

  • [x] Login to the session
  • [x] Switch to another session
  • [x] Power menu functionality
  • [x] Keyboard layout
  • [x] Clock, battery, and brightness Indicators
  • [ ] Brightness controller*

*Some testers if you have a laptop, please test it for brightness controller (DO NOT USE VM)

NOTE: Please do some tests before merging this PR and use web-greeter (instead of lightdm-webkit2-greeter) to test the login screen

How to test:

  1. Install lightdm and web-greeter package
  2. Copy this theme to /usr/share/web-greeter/themes
  3. Edit the /etc/ligthdm/lightdm.conf: This will set the greeter-session (default greeter session) to web-greeter
  4. Edit the /etc/lightdm/lightdm-webkit2-greeter.conf: This will set the webkit_theme (default greeter theme) to this theme avdanos and also set the safe_mode to false to prevent blocking API requests (but for now, the API won't be working, so it's optional)
  5. Then, Restart your computer

These items will be fixed/added/checked for the following commits.

ADeswanta avatar Jun 23 '22 03:06 ADeswanta

Will test this now. Can I ask which distro/system you are testing this on, and which parameters?

thearctiic avatar Jun 25 '22 20:06 thearctiic

Will test this now. Can I ask which distro/system you are testing this on, and which parameters?

I'm using Ubuntu 22.04 for main system and Arch Linux (latest) as testing machine (same as tester using)

ADeswanta avatar Jun 26 '22 00:06 ADeswanta

avdanosLogin.log

Power menu and keyboard layout functions work, everything else doesn't. When trying to log into a session, all fields and buttons get greyed out and the session hangs. Nothing happens. It causes a failure popup, the same as when you try to use the indicators for Brightness, Power and other things as well as switching sessions. I have attached the greeter log.

thearctiic avatar Jun 26 '22 21:06 thearctiic

avdanosLogin.log

Power menu and keyboard layout functions work, everything else doesn't. When trying to log into a session, all fields and buttons get greyed out and the session hangs. Nothing happens. It causes a failure popup, the same as when you try to use the indicators for Brightness, Power and other things as well as switching sessions. I have attached the greeter log.

I've fixed some errors, you can test it again.

ADeswanta avatar Jun 29 '22 10:06 ADeswanta

image Just a slight nitpick: why do we have 2 folders for the same thing?

thearctiic avatar Jun 29 '22 13:06 thearctiic

avdanosLogin.log New log file for you! Successful login still hangs with an error.

Also, the API on my server has been updated: inputting an incorrect key on the login screen now returns a server issue, when it should return an incorrect API key message. Most likely due to line 149 of auth.js:

if (request.status !== 200) return this.failed(LoginFailedIssue.SERVER);

Incorrect API key now returns 401 error code in request.status, as suggested by sammy, as well as responding 401 in the response as well. Apologies for the pain.

Edit: the UI fix for the battery and brightness indicator work, they are no longer an issue. They are greyed out on my PC, as they should be; not tested on my laptop yet however so don't assume this is 100% working yet. Session switching still fails, it shows a blank box when you click it.

thearctiic avatar Jun 29 '22 14:06 thearctiic

image Just a slight nitpick: why do we have 2 folders for the same thing?

It's for a backup/reference. I actually to replace with the original one, but I'm afraid if the original was replaced.

ADeswanta avatar Jun 29 '22 14:06 ADeswanta

avdanosLogin.log New log file for you! Successful login still hangs with an error.

Also, the API on my server has been updated: inputting an incorrect key on the login screen now returns a server issue, when it should return an incorrect API key message. Most likely due to line 149 of auth.js:

if (request.status !== 200) return this.failed(LoginFailedIssue.SERVER);

Incorrect API key now returns 405 error code in request.status, as suggested by sammy, as well as responding 405 in the response as well. Apologies for the pain.

Edit: the UI fix for the battery and brightness indicator work, they are no longer an issue. They are greyed out on my PC, as they should be; not tested on my laptop yet however so don't assume this is 100% working yet. Session switching still fails, it shows a blank box when you click it.

can you show me your updated auth works and returned status?

ADeswanta avatar Jun 29 '22 14:06 ADeswanta

avdanosLogin.log New log file for you! Successful login still hangs with an error. Also, the API on my server has been updated: inputting an incorrect key on the login screen now returns a server issue, when it should return an incorrect API key message. Most likely due to line 149 of auth.js: if (request.status !== 200) return this.failed(LoginFailedIssue.SERVER); Incorrect API key now returns 405 error code in request.status, as suggested by sammy, as well as responding 405 in the response as well. Apologies for the pain. Edit: the UI fix for the battery and brightness indicator work, they are no longer an issue. They are greyed out on my PC, as they should be; not tested on my laptop yet however so don't assume this is 100% working yet. Session switching still fails, it shows a blank box when you click it.

can you show me your updated auth works and returned status?

I haven't modified the auth.js file at all, I updated it server-side.

image

  • Empty fields returns status 400
  • Invalid key returns status 401
  • Invalid credentials returns status 403
  • Successful login returns status 200

thearctiic avatar Jun 29 '22 14:06 thearctiic

avdanosLogin.log New log file for you! Successful login still hangs with an error.

Also, the API on my server has been updated: inputting an incorrect key on the login screen now returns a server issue, when it should return an incorrect API key message. Most likely due to line 149 of auth.js:

if (request.status !== 200) return this.failed(LoginFailedIssue.SERVER);

Incorrect API key now returns 401 error code in request.status, as suggested by sammy, as well as responding 401 in the response as well. Apologies for the pain.

Edit: the UI fix for the battery and brightness indicator work, they are no longer an issue. They are greyed out on my PC, as they should be; not tested on my laptop yet however so don't assume this is 100% working yet. Session switching still fails, it shows a blank box when you click it.

How about now?

ADeswanta avatar Jun 29 '22 15:06 ADeswanta

avdanosLogin.log Successful login hangs again... switching sessions menu now works though! Battery and brightness indicator needs to be disabled on PCs and machines that do not support it, otherwise they also cause errors to show up. I am sure this can be done somehow.

thearctiic avatar Jun 30 '22 16:06 thearctiic

Suggestion: user-profile.png (the profile picture) should sync with the one you set in the OS itself, and there should be a way to change the background without command line.

thearctiic avatar Jun 30 '22 17:06 thearctiic

avdanosLogin.log Successful login hangs again... switching sessions menu now works though! Battery and brightness indicator needs to be disabled on PCs and machines that do not support it, otherwise they also cause errors to show up. I am sure this can be done somehow.

It is fixed, now you can try again. The battery and brightness for unsupported devices were already disabled programmatically and cannot be hidden because menus weren't reallocated properly.

ADeswanta avatar Jul 01 '22 14:07 ADeswanta

@AdvendraDeswanta should this be merged?

AZProductions avatar Jul 06 '22 14:07 AZProductions

@AdvendraDeswanta should this be merged?

May be. Because enigmaPr0ject.tech authentication API does not work, why not use local authentication (standard login)?

ADeswanta avatar Jul 07 '22 03:07 ADeswanta

btw i think u have to use the dev branch not main

SEGPlayz avatar Jul 13 '22 11:07 SEGPlayz

btw i think u have to use the dev branch not main

It already used the dev branch not main.

ADeswanta avatar Jul 13 '22 23:07 ADeswanta

it seems like you are trying to merge from your repo:dev to this repo:main

lucasod3v avatar Jul 18 '22 08:07 lucasod3v

For Future Devs:

And the testing needs to be done on Arch our testers usually install KDE first Copied from DMs

install my custom login screen (https://github.com/Avdan-OS/Desktop-Environment/pull/20):

  1. Install lightdm and lightdm-webkit2-greeter package
  2. Copy theme to /usr/share/lightdm-webkit/themes
  3. Edit the /etc/ligthdm/lightdm.conf:
  4. Edit the /etc/lightdm/lightdm-webkit2-greeter.conf:

lightdm.conf, it's to set the lightdm engine (we use lightdm-webkit2-greeter) and on lightdm-webkit2-greeter.conf, it's to set the theme (we use avdanos theme)

don't forget to set secure_mode to false on lightdm-webkit2-greeter.conf

StoneMcYT avatar Jul 18 '22 13:07 StoneMcYT

@AdvendraDeswanta should this be merged?

May be. Because enigmaPr0ject.tech authentication API does not work, why not use local authentication (standard login)?

Yep disable the API login system (not sure why it was used in first place) and replace with normal local authentication

StoneMcYT avatar Jul 19 '22 09:07 StoneMcYT