Webkit greeter lacks an User Pic support.

Bug #939819 reported by Andrea Virgillito
44
This bug affects 10 people
Affects Status Importance Assigned to Milestone
LightDM GTK Greeter
Fix Released
Wishlist
Unassigned
LightDM Webkit Greeter
Fix Released
Undecided
Unassigned

Bug Description

Why don't we put an user pic nearby the account selection area? I think it's a good idea to focus better the selected user, together with the wallpaper transition effect.

summary: - Webkit greeter lacks an User Pic and an Access Button for the listed
- users.
+ Webkit greeter lacks an User Pic support and an Access Button for the
+ listed users.
summary: - Webkit greeter lacks an User Pic support and an Access Button for the
- listed users.
+ Webkit greeter lacks an User Pic support.
description: updated
Revision history for this message
Brice Terzaghi (terzag) wrote :

Not sure if this is the place to report this but I'm currently developing a lightdm webkit theme and have problems with user pics.

In the original theme, user pic is displayed but there is a bug if the user has no pic (i.e. no ~/.face file) : rather than displaying the stock person icon, it displays the webkit missing file icon.

This comes from the fact that the code checks if user.image.length is > 0, assuming that if the file exists, length will be > 0 and it will be = 0 if the file doesn't exists. Well, that's wrong: user.image is a string ("/home/username/.face") which is sent back by LightDM (or the LightDM WebKit engine specifically? I have no experience with other greeters or LightDM in general) even if the file doesn't exist. So the theme always thinks a ~/.face file exists, even if it's not the case.

Either this is a bug in the LightDM webkit engine (maybe it should send back an empty string for user.image if ~/.face or ~/.face.icon doesn't exists?) or it's not and in that case the existence of the file has to be tested through JavaScript (which is not an easy task, although it might be possible with the new File API of HTML 5).

Revision history for this message
Filip (wattos-o) wrote :

This is not really a major bug and can be easily worked around by doing the following in your javascript:

    if (user.image) {
      image.src = user.image
      image.onerror= function(e) {
        e.currentTarget.src= "img/avatar.svg";
      }
    } else {
      image.src = "img/avatar.svg";
    }

As a matter of fact, you should do that anyway, because there is no guarantee that the user pic still exists (it could have been deleted by the user from the system). So in that case your theme would show a backup anyway.

Changed in lightdm-gtk-greeter:
importance: Undecided → Wishlist
Changed in lightdm-gtk-greeter:
status: New → Fix Committed
milestone: none → 1.5.1
Revision history for this message
Andrea Virgillito (andrea900) wrote :

Great news!
What about the release date?

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

1.5.1 has just been released (there's still some ui work in progress, it's not included yet, should land in 1.5.2 next sunday hopefully).

Changed in lightdm-gtk-greeter:
status: Fix Committed → Fix Released
Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

I mean, the ui rework isn't included (user-avatar support is)

Revision history for this message
Andrea Virgillito (andrea900) wrote :
Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :
Changed in lightdm-webkit-greeter:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.