How is the Euler Equation for Consumption derived from from intertemporal budget constraint and lifetime utility function in basic macroeconomics
It is simply the chain rule, or you could see it from the total differential. 

Let $C_1$ be consumption today and $C_2$ be future consumption. 

In the second part you have $U(C_2 (C_1) )$, i.e. a utility function dependending on $C_2$, which is itself (through the budget constraint you used) a function of $C_1$. You take the derivative of U with respect to $C_1$, which equals:

$d U/d C_1 = \partial U(C_2)/ \partial C_2 * d C_2 / d C_1$.

The first part is just $ \partial U(C_2)/ \partial C_2 = U'(C_2)$.

From what you have written, it seems that you understand that $C_2(C_1)=(1 + R)(\bar{X} - C_1)$.

Taking the derivative of that for the second factor in the multiplication above yields the result.