How to add my name on every page corner in Lyx?

For adding your name to the header/footer, LyX provides "fancy" heading via the fancyhdr package. First, activate these style headings (Document > Settings... > Page Layout > Heading Style):

enter image description here

Now add the following code to your LaTeX Preamble (also under Document > Settings...):

\fancyhf{}               % Clear fancy header/footer
\fancyfoot[L]{My name}   % My name in Left footer
\fancyfoot[R]{\thepage}  % Page number in Right footer
\makeatletter
\let\ps@plain\ps@fancy   % Plain page style = fancy page style
\makeatother

The first three lines set clears the header/footer, and sets the L and R footer respectively. The last three lines replaces the plain page style (typically associated with title pages and the like) to be equivalent to the fancy page style. This might not be necessary in your case.


Here is a solution that doesn't require headers or footers. It exploits the command \AddToShipoutPicture of the eso-pic package.

I'm assuming that you want your name in the upper left corner, but it can be adjusted to be everywhere in the page.

Code:

\documentclass{article}
\usepackage{eso-pic}
\usepackage{blindtext} % just for the example

\AddToShipoutPicture{%
  \AtPageUpperLeft{%
    \hspace*{20pt}\makebox(200,-20)[lt]{%
      \footnotesize%
      \textbf{user42356}%
}}}

\begin{document}

\blinddocument % just for the example

\end{document} 

Output:

enter image description here

P.S. To add this stuff in the preamble in LyX, go to Document --> Settings --> LaTeX Preamble and insert the required lines, i.e.

\usepackage{eso-pic}

\AddToShipoutPicture{%
  \AtPageUpperLeft{%
    \hspace*{20pt}\makebox(200,-20)[lt]{%
      \footnotesize%
      \textbf{user42356}%
}}}