Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccountsService set icon not working for avatar larger than 1MB #14

Open
1earch opened this issue Sep 14, 2020 · 5 comments
Open

AccountsService set icon not working for avatar larger than 1MB #14

1earch opened this issue Sep 14, 2020 · 5 comments
Labels
Incomplete Cannot be verified, the reporter needs to give more info.

Comments

@1earch
Copy link

1earch commented Sep 14, 2020

Hello,

When selecting a custom avatar larger than 96x96, it is not applied on behalf of AccountsService. Would it be possible to add a warning message? In addition, it could be great that the script performs an automatic resize after warning the user.

I can work on a PR if needed... In this case, do you have a preference on the image manipulation lib?

@bluesabre
Copy link
Owner

I've not seen this. Is the 96x96 file restriction documented somewhere, or is this a problem with Mugshot itself?

@bluesabre
Copy link
Owner

@1earch Just following up here... do you have a link to this documented requirement?

@bluesabre bluesabre added the Incomplete Cannot be verified, the reporter needs to give more info. label Sep 27, 2022
@1earch
Copy link
Author

1earch commented Oct 2, 2022

Hi @bluesabre,

Sorry for the delay! Totally missed out the last notification!
I haven't seen any documentation around this point...

Here are the steps to reproduce, in order to see AccountsService error:

  1. Open Mugshot in verbose mode
  2. Search for a new icon in JPG whose size is 850x850 (other may also confirm the bug)
  3. Get the /tmp/ filepath for the user
  4. Execute DBus command which will be executed by mugshot:
$ dbus-send --system --print-reply --dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User1000 org.freedesktop.Accounts.User.SetIconFile string:/tmp/...
Error org.freedesktop.Accounts.Error.Failed: file '/tmp/...' is too large to be used as an icon

@1earch
Copy link
Author

1earch commented Oct 2, 2022

Just found the limitation here: https://github.com/freedesktop/accountsservice/blob/0247dd0359df854768c21e6d5a49d35d6be563ae/src/user.c#L1784

There is an artificial limit of 1MB

@1earch
Copy link
Author

1earch commented Oct 2, 2022

I also found this thread, indicating that the bug was fixed, but I still get it with 0.4.3

@1earch 1earch changed the title AccountsService set icon not working for avatar larger than 96x96 AccountsService set icon not working for avatar larger than 1MB Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Incomplete Cannot be verified, the reporter needs to give more info.
Projects
None yet
Development

No branches or pull requests

2 participants