  We derive expressions for the differential distributions and the total cross
section of 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 case of $\gamma p$ collisions at LHeC, HERA and in the ultraperipheral
$AA$ and $pA$ collisions at the LHC. We find that the events of this kind would
be abundantly produced at the LHeC. For $\sqrt{s}=1.3$ TeV the expected rate is
$2\cdot 10^8$ events for the luminosity $10^{34}$ cm$^{-2}s^{-1}$, the running
time of $10^6$ s and 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. For HERA the total accumulated number of
the events is also high, but efficiency of the detection of charm seems too low
to study the process. 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: $\sim 6\cdot 10^4$ for $Pb-Pb$, and $\sim 7 \cdot 10^3$ for $p-Pb$
collisions for the same transverse momentum cutoff.
