There is no direct relationship between the surnames Wen and Lin in ancient times.
The surname Lin originated from Huang Degong during the Zhou Dynasty. He was a descendant of Huang Degong, the grandson of Huangdi, and was named Lin Guogong and Linhou. Among the people surnamed Lin who ran away are many famous historical figures, such as Lin Zelu, Lin Juemin, Lin Su, etc.
There are three theories about the origin of the surname Wen: one is that it is derived from the surname Jiang, which comes from Ziya, Prince Jiang of the early Western Zhou Dynasty. It is a surname named after the name of a feudal town. The second is that it is derived from the place name, which comes from the Wen State in the Western Zhou Dynasty. It is a surname named after the country. The third one is from another clan or someone changed his surname.
In short, there is no direct relationship between the ancient surnames Wen and Lin.