to answer myself:

it turned out that \myheader is left undefined when no option is passed. so i 
just define it (empty) and the following works

--------------------------beamerthememytheme.sty---------------
\def\myheader{}
\DeclareOptionBeamer{header}{\def\myheader{#1}}
\ProcessOptionsBeamer

\mode<presentation>

\setbeamertemplate{background canvas}{
  \includegraphics[width=\paperwidth]{header\myheader}
}

\mode

-------------------------------------------------------------------------

porting lyx to tex would be a great summer of code project btw...

Reply via email to