I am assuming that you are referring to more of a "cow whip" rather than a lunge whip, correct? If so, then yes, you have to desensitize to the sound. All of our horses have to be trained for whips because they are used every time we work cows. When we get to the pens and 6 whips start swinging and popping in a tight spot, your horse better be used to it.
First of all, do not pop it while facing the horse. I want my horses to be sensitive to the pop of the lunge whip, yet completely quiet with the sound of the cow whip. The cow whip is much louder than a lunge. If the horse is very scared of it, I will start by having someone hold the horse or tie it if its sain enough (all will be by the time I start training them to the whip). I usually stand around 20-30' away from the horse and face in the same direction that the horses body is facing, not looking at the horse. I start with a consistant, rhythmic overhand swing, without actually cracking the whip. I have an 8' nylon whip, it has a lot more weight to it than a leather whip if thats what you are using. My husband carries a 12' whip, but I've thrown my shoulder out with his, so I prefer the smaller whip. Again, do not look at him, most horses think that you are directing it at them, and I do not want them to lose sensitivity to my drive, just allow him to get used to the sound. The overhand pop usually isn't as loud as overhead, so I start with that. Plus I can throw out a basic overhand pop every few seconds with a steady rhythm, so it allows them to get used to the sound. Once they are used to that, I start with some louder cracks until they could care less.
Once they are done with it at the distance, I will stand on their right side (I carry the whip in my right hand), and hold onto the horse with my left hand. I start again with the same routine right next to the horse. If the horse moves, I drift with them, never disturbing the rhythm of the whip until they relax. Once they are calm, I will walk the horse while using the whip until they are used to the sound of the whip swinging and popping right next to and over them. They must be used to it swinging beside them and over their head. Also, let it fall on his rear or neck lightly a few times while swinging it. He has to be able to handle those types of slip ups because it will get a little harder to swing it on his back.
Some horses are ready pretty quickly for you to just get on and use the whip once you have done the ground work. I've found horses that are improperly trained at first take a little more work. One thing that my husband and I have done with trickier horses to get them used to the whip from the rider position is to ride them next to a horse that is already broke to the whip. We ride them closely side by side, start with the new horse on one side of the broke horse and the whip on the other. Allow the trained horse to be the buffer between the scared horse and the whip. Once they are ok at the stand still, get them used to moving in unison with the other horse while still popping the whip. We've used this method successfully several times.
If for some reason you are referring to a lunge whip, I would still use the same technique. Even if we have horses that we aren't planning to use for cow work, we still break them to the whip. Getting used to the sound has made the horses pretty quiet with gun shots and fireworks as well. Have fun with the trail challenge.