We derive expressions for the differential distributions and the total cross section of the double-parton interaction in direct photon interaction with proton and nuclei. We demonstrate that in this case the cross section is more directly related to the nucleon generalized parton distribution than in the case of double-parton interactions in the proton-proton collisions. We focus on the production of two dijets each containing charm (anticharm) quarks and carrying x 1 , x 2 > 0.2 fractions of the photon momentum. Numerical results are presented for the e-p collisions at LHeC, HERA, and for the ultraperipheral A A and p A collisions at the LHC. We find that the events of this kind would be abundantly produced at the LHeC. For √ s = 1.3 TeV the expected rate is 2 × 10 9 events for 1 year (10 7 s) of running and the luminosity 10 34 cm −2 s −1 , for the transverse cutoff of p t > 5 GeV. This would make it feasible to use these processes for the model independent determination of two parton GPDs in nucleon and in nuclei. We also find that a significant number of such double-parton interactions should be produced in p-Pb and Pb-Pb collisions at the LHC: ∼6 × 10 4 for Pb-Pb, and ∼7 × 10 3 for p-Pb collisions for the same transverse momentum cutoff and running time 10 6 s, and in HERA where 1.2 × 10 5 events were produced for the integrated HERA luminosity of 1.2 fb −1 . Further studies are necessary to identify the kinematics where these MPIs could be separated from conventional 2-to-4 multijet events.