Linux can answer the question, but you're considering Linux as a monolithic platform which it isn't. If you ask "how do you build a UI for Gnome / KDE / Android?" then the answers are pretty clear.
Linux is a mess, but at least it's unapologetically so.