How do I extract Parallels Desktop's dock icon? Parallels Desktop has ugly red bars on its icon. How can I remove those bars?
First, see this article. It eliminates the red bar well.

Anyway dock icon when Parallels is not running shows bad icon. You can replace this icon in app's resource folder. Anyway we don't have the clean icon now. To get the clean icon, follow these steps.


Find Parallels Desktop's PID.
Run GDB as superuser. Attach to Parallels Desktop.
Execute Objective-C that saves code for current dock icon image into a file.


See this console log.

Hoons-MacBook-Air:~ Eonil$ ps -A | grep Parallels\ Desktop
 4223 ??         0:01.79 /Applications/Parallels Desktop.app/Contents/MacOS/prl_client_app -psn_0_950504
 4259 ttys007    0:00.00 grep Parallels Desktop
Hoons-MacBook-Air:~ Eonil$ sudo gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov  3 21:59:02 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".
(gdb) attach 4223
Attaching to process 4223.
Reading symbols for shared libraries . done
Reading symbols for shared libraries ....................................................................................................................................................................................................... done
0x00007fff8d17f67a in mach_msg_trap ()
(gdb) po [[[[[[NSApplication sharedApplication] dockTile] contentView] image] TIFFRepresentation] writeToFile:@"/Users/Eonil/Temp/t.tiff" atomically:YES]
0x1 does not appear to point to a valid object.
(gdb) quit
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from process 4223.
Hoons-MacBook-Air:~ Eonil$ open /Users/Eonil/Temp/t.tiff
Hoons-MacBook-Air:~ Eonil$ 


You'll see the icon with Preview app.
Take care about you have to replace the file path /Users/Eonil/Temp/t.tiff to path exists on your computer.

This hack will extract current icon. So if you want to extract other icon, just make your Parallels to show the other icon and use this hack at the time.