Preserve custom app icon across updates
-
Is there a good way of keeping our custom app icons for each update? I've had Vivaldi for less than a week and have already had to update twice, so while this isn't a major issue, it is still tedious.
I've changed the app.icns default, and that gets reverted, and any icon files I drop into the package contents for easy access. gets deleted after each update.
EDIT: For those who are looking to do this on mac, here's what @OakdaleFTL made for us.
- Make a folder titled "Vicons" in your user folder and move your custom icon titled "app.icns" to it
- Type "cd ~/Vicons" in terminal
- Type "cat > fix" in terminal
- Write this script
cd ~/Vicons cp app.icns app\ copy.icns mv -f app.icns /Applications/Vivaldi.app/Contents/Resources/app.icns mv -f app\ copy.icns app.icns
- End by pressing ctrl + D and typing "chmod 755 fix"
- Type "./fix"
- For future updates, just run the fix script by double clicking
-
This post is deleted! -
@quincy8888 We've been here before... But since the introduction of Catalina the default shell is zsh and it works a little differently than bash. So:
Updated Instructions
In your home directory, make a new folder "Vicons" and move the file app.icns you want to keep into it.
In the Terminal, and type
cd ~/Vicons
Use
cat > fix
(Each line ends with Enter...) to create the script:cd ~/Vicons # just in case...
cp app.icons app\ copy.icns
mv -f app.icns /Applications/Vivaldi.app/Contents/Resources/app.icns
mv -f app\ copy.icns app.icns # rename copy
( end the file with a ^-D )to make the file "fix".
then set its execute status with
chmod 755 fix
With Vivaldi not running, simply move to the Vicons directory and enter./fix
and your new Vivaldi is good to go!(Sorry for the delay: I ran into a snag in my understanding that had to be unsnarled...)
Edit (6/11/23): BEWARE! Typo in line 2 of script, "cp app.icons app\ copy.icns" should be "cp app.icns app\ copy.icns"...
-
@OakdaleFTL Thank you for the help! I couldn't find answers anywhere so this was appreciated.
To summarize what I did--
- Made a folder titled "Vicons" in my documents folder
- Typed "cd ~/Documents/Vicons" in terminal
- Typed "cat > fix" in terminal
- Wrote this script:
cd ~/Documents/Vicons
cp app.icons app\ copy.icns
mv -f app.icns /Applications/Vivaldi.app/Contents/Resources/app.icns
mv -f app\ copy.icns app.icns - Ended by pressing ctrl + D
- Typed "chmod 755 fix"
- Quit Vivaldi and then typed "./fix"
This ended up replacing the original app.icns with my custom one, but the custom is no longer in the vicons folder. My question is, will I need to readd this custom icon and run ./fix each time I update?
Thanks again!
-
@quincy8888 You did move your custom icons (named "app.icns") file to /Vicons ? It should still be there...
Do you see "app copy.icns" in /Vicons ? (The scripted command
mv -f app\ copy.icns app.icns
acts as Bash'srename
moving the file onto itself!)I don't see what went wrong for you...
Did the Terminal display any errors?
Here's what I got when I double-clicked the "fix" icon:
(Oddly, it worked with Vivaldi running... Hm.)
-
@quincy8888 A tip (...in case you think you might have mis-typed some part of the script): User
chmod -x fix
for revert it to a text file.(See
man chmod
, Modes section.) -
Save your new icon somewhere, open the folder where Vivaldi is stored, press Cmd-i to open the Info window. Drag the new icon to the upper left corner of the Info window and drop it. You will have to do that after every update, but it is quick and easy.
-
@Streptococcus You've somewhat missed the point:
Changing the displayed icon of the app via Get Info only changes it in /Applications folder and the Dock. Replacing the file app.icns in the app's /Resources folder changes the icon(s) used by the app everywhere...throughout the program.
And using the script let's you do that with a single double-click.Also, setting up the script helps introduce one to the Terminal and the shell, zsh, which will occasionally come in quite handy!
-
@OakdaleFTL I appreciate that you took a screenshot of what you saw, because that helped me solve the issue. During the copy step, app.icns was misspelled as app.icons, so it wasn't correctly completing. I typed out the code myself instead of copy/pasting, but I guess I didn't catch the error either.
Thanks for all the help
-
@quincy8888 said in Preserve custom app icon across updates:
was misspelled
Such causes my most common failures when using the Terminal. That's why I mentioned the utility of
chmod
! Being able to revert the executable script to plain text is an indispensable boon...Edit: Just re-read your post... Yikes! The "typo" was mine! So sorry...
Thanks, for fixing "fix" and for promoting my humble self! And for the excellent good sense to spare others the pain of my typos by putting a clear rendition (typo-free) at the beginning of your thread.
-
@OakdaleFTL et al: The moral is, Either wear your glasses or liberally use ⌘+ everywhere!