Beamer navigation bar with characters between sections

I'm trying to define a custom theme for beamer. I would like to have a horizontal list of all sections but with a character between them. What I have is:

\setbeamertemplate{headline}[text line]{\insertsectionnavigationhorizontal{\paperwidth}{}{}}


And what I would like to see is something like:

Section1 | Section2 | Section3 | Section4


Is that possible?

-

Yes, it is possible; not trivial, but possible:

(I will add some explanation when I have time)

\documentclass{beamer}
\usepackage{totcount}
\usepackage{tikz}

\regtotcounter{section}
\newcounter{vertrules}

\setbeamercolor*{frametitle}{fg=green!40!black}

{%
\vskip1.5ex%
\end{beamercolorbox}%
\setcounter{vertrules}{\totvalue{section}}
\ifnum\thevertrules<2 \else
\begin{tikzpicture}[remember picture,overlay]
\foreach \i in {1,2,...,\thevertrules}
\draw[ultra thick,green!40!black] (\i*\sectionboxwd+0.5\i,0) -- (\i*\sectionboxwd+0.5\i,1);
\end{tikzpicture}%
\fi%
}

\hspace*{-6pt}\setlength\fboxsep{0pt}%
\parbox[c][4ex][t]{\dimexpr\sectionboxwd-5pt\relax}{%
\hfill\parbox{\dimexpr\sectionboxwd-12pt\relax}{%
}\hfill\mbox{}%
}\hspace*{6pt}%
}

\newlength\sectionboxwd

\AtBeginDocument{%
\ifnum\totvalue{section}>0
\setlength\sectionboxwd{\dimexpr\paperwidth/\totvalue{section}\relax}
\else
\setlength\sectionboxwd{\paperwidth}
\fi
}

\begin{document}

\section{Test Section One with a really long title}
\begin{frame}\frametitle{Test frame one}test\end{frame}
\section{Test Section Two}
\begin{frame}\frametitle{Test frame two}test\end{frame}
\section{Test Section Three}
\begin{frame}\frametitle{Test frame three}test\end{frame}
\section{Test Section Four}
\begin{frame}\frametitle{Test frame four}test\end{frame}

\end{document}


And some images showing the result with the vertical rules:

-
Thanks for your help! That's nearly what I was looking for, can you give me a hint how to modify that code to have everything left aligned? ---------------------------------------------- Section1 | Section2 | Section3 ---------------------------------------------- And maybe how to replace the line with a character. Thanks in advance! If that's not possible or too complex, don't mind :) –  Bertram Nudelbach Jun 5 '12 at 7:40
Oh dear, I'm not able to format that comment correct. What I mean is, that the sections have only the minimal width required for showing the text. Although this might have the result that not all sections were shown if too much sections are defined (as with normal \insertsectionnavigationhorizontal). –  Bertram Nudelbach Jun 5 '12 at 7:49

So I played around a bit with the solution provided by Gonzola Medina and here is what I wanted to have - thanks again!

\setbeamertemplate{section in head/foot shaded}{%
}

}


It prints all sections and places | between them. The color white is because it should be white for my color scheme.