Cut a sized rectangular window into a dome
to be safe, I would do it with the actual math: trigonometry.



I woun't bore you with the details, but the arc lenght gives you the angle, so:


calculate the "h" value with the formula you see in the picture ("L" is the lenght of the arc, "D" is the diameter of the sphere)
create a cube and make it half its size (press S and type "0.5"), so that it is 1 unit wide
merge two vertices in the top face with the vertices under them to create a triangular prism 

 


select the other 2 vertices in the top face and press G, Z and type "-1" to bring them on the bottom face
without deselecting them, press G, Z and type the value of "h" you calculated before: this way you triangle has the same angle of the desired arc
place your triangle so that is has the acute vertex in the center of the sphere and scale it up until the vertical face is all outside the sphere






scale the triangle on the Y axis (in my case) to change the window's width, and rotate the triangle on the Y or z axis to adjust its position
on the sphere, create a Boolean Modifier, set the triangle as Target and the Overlap Threshold to 0 (you might want to add a Solidify Modifier too)






NOTE:

this solution works if the window's width is small: in that case the angular error is negligeable. If the window is large, from the Top view you'll need to rotate a lateral side of the horizontal degrees you need, keeping the anchor point in the center of the sphere



POSSIBLE VARIANT:

instead of moving arounf the vertices of the top face, you could also bring them at the bottom (press G, Z and type "-1"), then rotate the whole top face arounf the center of the sphere of the angle that you can calculate as 2*L/D