Hello, I'm trying to migrate the petrichor theme from webkit2 to web-greeter. (https://github.com/phillid/petrichor/tree/master). The code to update the icon of each user into petrichor.js (same as main.js) is as below :
var html = "";
for (i in lightdm.users)
{
user = lightdm.users[i];
if (user.image == null || user.image.match(/\.face$/))
image = '/usr/share/icons/Adwaita/256x256/emotes/face-laugh.png';
else
image = user.image;
html += '<a href="#" class="user" id="user-' + user.name +'" onclick="start_authentication(\'' + user.name + '\')">';
html += '<img class="avatar" src="file:///' + image + '" /><span class="name">'+user.display_name+'</span>';
if (user.name == lightdm.autologin_user && lightdm.autologin_timeout > 0)
html += '<span id="countdown-label"></span>';
html += '</a>';
}
document.getElementById('users').innerHTML = html;
The default Image is not working but it's normal as I should use the default image defined into web-greeter.yml
However the html section added into the web page do not work even if an icon is defined for the user. I receive an error message as the html page cannot access to /var/lib/AccountsService/icons/username.png.
I also had some problems accessing the avatar images.
If it helps here is what I did to solve them:
The folder where the image reside must either have read and execute permission for others or an ACL entry for lighdm user or lighdm group to give read and execute permission
The same step for the .face image
I hope it helps!
Hello, I'm trying to migrate the petrichor theme from webkit2 to web-greeter. (https://github.com/phillid/petrichor/tree/master). The code to update the icon of each user into petrichor.js (same as main.js) is as below :
var html = ""; for (i in lightdm.users) { user = lightdm.users[i];
The default Image is not working but it's normal as I should use the default image defined into web-greeter.yml
However the html section added into the web page do not work even if an icon is defined for the user. I receive an error message as the html page cannot access to /var/lib/AccountsService/icons/username.png.
Any idea to help me?