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

[Bug report] Only works on 1 of 4 apps I tried #2

Open
thataboy opened this issue Jun 24, 2024 · 1 comment
Open

[Bug report] Only works on 1 of 4 apps I tried #2

thataboy opened this issue Jun 24, 2024 · 1 comment

Comments

@thataboy
Copy link

thataboy commented Jun 24, 2024

Using iconset v1 on Sonoma 14.5

It only works on one app (Spotify) out of the four I tried. The others that didn't work were Google chrome, Google chrome beta, and foobar2000; they get a generic blue folder icon instead.

It is not the icns file that is the problem because I'm able to set Spotify.app to the chrome icns file but setting Google Chrome.app to the spotify icon gives me a blue folder for icon.

command and output:

sudo iconset folder ~/Downloads/icons
Password:
[i] The following icons were successfully set:
  - Spotify.icns Spotify.app

[x] The following icons failed to set:
  - Google Chrome Beta.icns - Missing permissions to set attribute
  - foobar2000.icns - Missing permissions to set attribute
  - Google Chrome.icns - Missing permissions to set attribute

[i] Cache purged successfully. Updated icons will show on Application relaunch

Incidentally, this is the exact behavior I get with this test Applescript

use framework "Foundation"
use framework "AppKit"
use scripting additions

set sourcePath to "/Volumes/T7/Downloads/chrome dark.icns"
set destPath to "/Applications/Google Chrome Beta.app"
set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath)
(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)

which I think uses the same Foundation call as your app.

I'm not sure what makes Spotify different. Maybe because it's an Electron app?

Thanks

@tale
Copy link
Owner

tale commented Jul 1, 2024

Have you tried running iconset with sudo? That's what the specific issue that was logged out will generally mean. And yes it depends on how the app was installed. It's why App Store apps need sudo as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants