Right, I thought of that. What specifically is of interest is how the USB triggers that during a sketch upload. My Yun has a USB out and I can easily connect the two devices via the traditional USB cable.
The two devices already trade a whole bunch of info via HTML when its working correctly. I was thinking I could use the virtual serial com to restart the mega remotely from a server command and just leave them connected via USB except for troubleshooting.