1726, in on the qui vive "on the alert," from French être sur le qui vive "be on the alert," from the phrase qui voulez-vous qui vive? sentinel's challenge, "whom do you wish to live?" In other words "(long) live who?" meaning "whose side are you on?" (The answer might be Vive la France, Vive le roi, etc.). From qui (from Latin qui "who") + vive, third person singular present subjunctive of vivre, from Latin vivere "to live" (see viva).
"mode of living," especially a working agreement between contending parties, 1844, Latin, literally "way of living or getting along" (see modus).
Modus vivendi is any temporary compromise that enables parties to carry on pending settlement of a dispute that would otherwise paralyse their activities. [Fowler]