To use the Ubuntu font (or any other system font), use XeTeX
sudo apt-get install texlive-xetex
Once you have created your document in LyX, add some TeX code at the start of the document (using the TeX button): \fontspec{Ubuntu}
. This makes the whole document use the Ubuntu font. If you want to switch to another font at some point use the \fontspec
command again with the font name of the other font.

To allow this to render to a DVI/PDF/etc., some settings need to be changed in Document>Settings.
Click on 'LaTeX Preamble' and enter this into the text box:
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}

Also, under 'Language', set the encoding to Unicode (XeTeX) (utf8)
.

Now export the document as LaTeX(pdflatex):

This will appear to do nothing but will actually output to DOCUMENT_NAME.tex.
Now open a teminal (Applications->Accessories->Terminal) and enter:
cd ~/Documents
xelatex ubuntu.tex
xdg-open ubuntu.pdf
Replace ~/Documents
with the path of the folder containing your document and ubuntu
with the name of the document. This should create a PDF file of the output of your document and open it in the default PDF reader:

Doesn't it look pretty? :D
Thanks to Marcel Stimberg for suggesting XeTeX and providing the useful links to resources. I suggest people to have a look at those for more details.