powerline status-line on ubuntu server 14.04 (no gui)

1.5k views Asked by At

First of all, is it even possible to get powerline looking like on the image below in a Non-GUI Ubuntu installation?

https://i.stack.imgur.com/jMohr.png

So far I've installed it using Vundle, but removed it in favor of the pip installation, but as shown below, I cannot get the proper symbols to show, only the ugly place holder blocks:

enter image description here

Per the official installation instruction I downloaded and installed the patched fonts in ~/.fonts, after trying "Fontconfig" unsuccessfully. I also refreshed the font cache for the system, and restarted vim, but it stayed the same. The only changes I made on .vimrc were...

> set t_Co=256
> rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/ 
> laststatus=2

The instructions I followed: askubuntu-powerline and powerline-docs

Ubuntu Server 14.04

Vim - 7.4.52

Xterm = 256 color

Thanks!

1

There are 1 answers

0
zsolt On

Yes it is! You need a way to use the patched font in the console. There is only one patched terminal font, Terminus, but I couldn't get it to work.

I discovered fbterm, a terminal emulator for the framebuffer that allows you to customize the font and size, even add a background image.

Set up fbterm and add your user to the video group:

sudo apt-get install fbterm
sudo usermod -a -G video $USER

In your ~/.fbtermrc file change font-name to your favorite font. (use the fc-list command to get the names)

font-names=SourceCode Pro for Powerline
font-size=18

Launch fbterm

fbterm

To get full color support set the TERM variable to fbterm before launching vim/tmux

TERM=fbterm tmux -2u

If the symbols don't line up perfectly, experiment with different fonts and sizes.