A while back I saw a plan for a greenhouse that used solar desalination to provide water for plants but don't know if was ever built
edit: Looks like they exist https://www.researchgate.net/figure/The-seawater-greenhouse-...
Not a rhetorical question, I genuinely don’t know. I assume it varies by desert, but farming and power are both way out of my domain.
So the question is whether a greenhouse/farm in the desert is easier than solar in the desert connected through grid to vertical farm somewhere else.
I have no data. My guess is the ongoing logistics of piping electricity out of the desert is easier than fertiliser into the desert and produce out to where people live.
https://assets-global.website-files.com/5ef8b3d80f5e290ff335...
Not "per se" a knock against greenhouses, but definitely one of the things you're looking for is a closed system rather than the sort of greenhouse you'd get in many places in America, where it's just a robust plastic tent-on-a-concrete-slab, and they don't care much if the water runs off. In a desert you'd be really concerned about making sure the whole works has very, very low water-losses.
The key thing to make this useful is to conceptualize it not as the sort of area, like the Nile, where they've already got an ample water supply. To make this useful, it's best to think of something where there's basically no water supply at all, and we're trying to crack the problem of "okay, how could we grow crops here?" Something that right now, is just bone-dry barren desert. Most of the solutions we rely on in the wetter world just don't really care much about water loss.
Something that could fit the definition of a greenhouse, with windowed ceilings, might well be a viable solution. But I do suspect there's some correlation between making a grow site more bunker-like and lowering water loss (especially if it's recessed into the earth).
The other huge upside of a truly sealed system is it's another approach to pest control. Sealing the system could potentially completely eliminate the need for pesticides and herbicides. Right now those have huge negative externalities.