Make Gary's secret onions: In a bowl, combine all the ingredients except the onions and oil. Working in batches, grind the spice mixture in a clean coffee grinder. Return half of the spice mixture to the bowl and reserve the remaining spice mixture. Add the onions to the bowl of spice mixture and mix to combine. Store the onions in the refrigerator, covered, to marinate for at least 3 hours and up to overnight. Heat the 2 tablespoons oil in a large skillet over medium heat. Add the marinated onions and reserved spice mixture and cook, stirring occasionally, until translucent. Set aside covered with foil to keep warm.
Make the tangy relish and cheese steak: In a mini food processor, combine the ketchup, capers, cornichons, green peppercorns, and celery salt and pulse four or five times. Add the vinegars and pulse two to three times until just blended. Set aside.
When ready to serve, heat the 2 teaspoons oil in a large nonstick skillet over medium-high heat. Add the beef and cook, stirring, until just cooked through. Remove from the heat.
Slather the bottom halves of the rolls with the tangy relish and top with the beef, onions, cheese and the top halves of the rolls. Slice and serve.