You are right that the sentence is ungrammatical if you take the object of "want" to be "replace Windows" and the subject of "replace" to be "the Chinese government". But it is grammatical if you analyze it as an instance of the construction "X wants Y to Z", where Y is (semantically) the subject of the infinitive Z.
To a first approximation, relative clauses in English are formed by taking a sentence and moving some noun phrase to the front, while optionally adding "that" after the moved noun phrase.
E.g., "I saw the man" -> "the man that I saw _" (where _ marks the place where "the man" would have been if it was a regular sentence; called the gap or trace in linguistics.)
In this case the transformation is "the Chinese government wants the OS to replace Windows" -> "the OS that the Chinese government wants _ to replace Windows."
That is still not how I read it. I think it is reasonable to say "Ogg Vorbis is trying to replace MP3". I thereby feel it reasonable to say "I want Ogg Vorbis to replace MP3". If we now want to refer to this thing, we can replace "Ogg Vorbis" with "a file format". However, we care which file format among many, so we qualify it as "the file format saurik wants to replace MP3". I think the difference here is that I am quite happy using the name of these software products as a way to refer to their projects, which I then am more than happy to treat as actors capable of trying to accomplish abstract tasks. "Uber wants to disrupt the taxi industry." "Uber wants to replace taxis." "Random people on Hacker News want Uber to replace taxis." "A first look at the new service random users on Hacker News want to replace taxis." (I also think this is more what canjobear meant, as Y has become the subject. It isn't that X wants Y with a goal of Z, it is that X wants Y to accomplish its goal of Z.)
You are right that the sentence is ungrammatical if you take the object of "want" to be "replace Windows" and the subject of "replace" to be "the Chinese government". But it is grammatical if you analyze it as an instance of the construction "X wants Y to Z", where Y is (semantically) the subject of the infinitive Z.
To a first approximation, relative clauses in English are formed by taking a sentence and moving some noun phrase to the front, while optionally adding "that" after the moved noun phrase.
E.g., "I saw the man" -> "the man that I saw _" (where _ marks the place where "the man" would have been if it was a regular sentence; called the gap or trace in linguistics.)
In this case the transformation is "the Chinese government wants the OS to replace Windows" -> "the OS that the Chinese government wants _ to replace Windows."
I agree it sounds somewhat awkward.