-
Notifications
You must be signed in to change notification settings - Fork 322
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
Why do I see the default terminal icon when I'm setting my own? (OS X) #71
Comments
Same issue here. |
No, I'm afraid that's how the notification work, as it's the terminal that initiates the message. The only way to avoid this is to use your custom |
This happens because of the way notifications in macOS work. The notification shows the referring app's icon, and as we're using terminal-notifier to push notifications for macOS, we have the icon of terminal-notifier. To work around this, you'll need to compile terminal-notifier with your own app.icns. Download the source, change out the AppIcon bundle with your own in Xcode, recompile terminal-notifier and pop it into node-notifier. ( Now that you have your own terminal-notifier inside node-notifier, remove all the If you have any questions, feel free to ping me 🙂 ~ |
Thanks @kurisubrooks but I won't try it at the moment, since that wasn't urgent and it looks like it's not that straight forward. The Notifications API works nicely on OSX so I'll rely on this one now.. |
@georgebgk The most important things are the next two steps. |
If you are running a packaged electron app, you need to have the we just experienced this when building the OSX app with yakyak. they didn't match and the terminal started appearing. |
Change the icon using customise-terminal-notifier. executed command: `customise-terminal-notifier -i ./app/images/redmine_icon_color_64.png -b com.emsk.redmine-notifier` mikaelbr/node-notifier#71 julienXX/terminal-notifier#131 https://github.com/vitorgalvao/tiny-scripts/blob/master/customise-terminal-notifier
Here is a step by step:
THEN you have to USE the custom path when calling for a notification in electron so it uses your version and not OSX's.
|
Another quick solution here (inspired by @mbushpilot2b):
|
hey @fritx Thanks for quick solution. |
@tolgaergin hey, did you replace the icns with an existing one of your own? |
These instruction are horrible, please see thisHere's a quick guide how to do it. (If you don't have an ICNS file, here's a converter)
Here you go! Hope this helps. |
@georgebgk oops, I don't think it is a good idea to replace Terminal.icns directly, It seems that would cause other apps on your computer, which are using node-terminal as well, to show the replaced icon, not the original one. That would be confusing. |
@fritx You are incorrect. I replace Terminal.icns only in my project. It does not affect others, I tested |
@georgebgk I tried your method and my electron app still shows the terminal icon. Is there some cache clean command I need to run? I tried this: https://gist.github.com/fabiofl/5873100 but it didn't fix the issue. I'm pretty sure I have placed the icon correctly but there might be an issue as get info on terminal-notifier.app shows the correct icon but notice the titlebar still has the terminal icon: |
My personal solution is to create an application with a fully transparent icon, and call it's sender ID with |
@rien333 can u show some code? |
idk, nothing too fancy: |
For anyone who finds their way to this issue. I found this script from 'vitorgalvao/tiny-scripts' which had since been removed from the repo. I brought it back to life incase it can help anyone else here. https://github.com/code-with-sam/customise-terminal-notifier |
Oh no! Did anybody find a solution to this? Having to create a window+renderer just to show a notification is crazy :\ |
Just customize terminal-notifier icns file. |
This solved my problem and you only need to have your icns file ready: run this command in terminal after downloading :customise-terminal-notifier ** path/customise-terminal-notifier-master/customise-terminal-notifier -i path/Terminal.icns -b com.bundle.identifier |
It worked with custom icon.... But the click event doesn't response.... |
Do anyone has a solution to use thru Changing directly the files in node modules isn't really a stable solution |
Rebuild terminal-notifier, point node-notifier to rebuilt binary. |
@gbougakov do you have more details ? I saw your post: #71 (comment) ;) We don't want to make this procedure each time we install our node_modules. Thanks a lot for your help ! |
@Aarbel Sorry for that post. It is horrible, has a lot of caveats, do not follow it.
First, clone the When initialising const notifier = new NotificationCenter({
customPath: 'path/to/terminal-notifier.app'
}) That's it! |
Did you faced this error ? |
i could change the icon but the click is not working, and i can't se extra buttons |
@Aarbel your path is wrong, inside the terminal-notifier.app is /Contents/MacOS/terminal-notifier |
@BluFenix00 i just left |
About |
With |
the problem was the version of terminal-notifier, if you want to try the process of replace the icon with xcode, make sure that you are working on terminal-notifier 1.7.2 |
It has a question that the notification can't show a close button when try to hover it. like below: must meet the following criteria: |
Anyone using electron builder and node-notifier and still facing this issue, here are quick easy solutions below, works on both win 10.0.17134 and macOS Version: 10.15.4 In your electron main process:
You also need to configure electron builder build config as below:
|
Worked for me thanks. For reference, the two keys you have to change are |
I read every comment on this. So, it seems like we can't just dynamically use a custom icon, right? I'm using this on a minecraft-project which should send me their custom player-heads, which i download via "request"-module in advance. So, now big hope on getting custom icons to work with this, right? :/ |
This happens on OS X (didn't test other platforms) when I'm not have the
icon
option:and when I have it:
Am I missing something? How could I get rid of the terminal icon next to the title?
The text was updated successfully, but these errors were encountered: