We demonstrate the possibility to perform distributed quantum computing using only single-photon sources (atom-cavity-like systems), linear optics, and photon detectors. The qubits are encoded in stable ground states of the sources. To implement a universal two-qubit gate, two photons should be generated simultaneously and pass through a linear optics network, where a measurement is performed on them. Gate operations can be repeated until a success is heralded without destroying the qubits at any stage of the operation. In contrast with other schemes, this does not require explicit qubit-qubit interactions, a priori entangled ancillas, nor the feeding of photons into photon sources.