Solved rxvt-unicode / urxvt unable to get powerline to work properly.

Does anybody have a step by step tutorial on how to actually get powerline to work? I partially successfully managed to install powerline into bash in urxvt in my last FreeBSD install but the issue I had there was that I had to launch urxvt via urxvt, not using rofi or any other program, in order to get correct powerline fonts. The issue I have now is that I get bash: : command not found multiple times in bash and there is not even a propper line to write on, I am just on a new line.

I have installed powerline via pkg, I have tried to compile urxvt myself, I have installed powerline status via pip, I have tried to install the regular powerline fonts and then I tried to use the patched fonts. I have tried multiple fonts in the settings of my .Xresources to no avail. Nothing works.
 
I have tried multiple fonts in the settings of my .Xresources
Try ~/.Xdefaults instead, works for me (also with x11/rofi), doesn't work with ~/.Xresources on my system neither.

If problem persists check files/resources. urxvt(1):

Code:
RESOURCES
  ....
  You can set and change the resources using X11 tools like xrdb. Many
  distribution do also load settings from the ~/.Xresources file when X
  starts. urxvt will consult the following    files/resources    in order, with
  later settings overwriting earlier ones:

     1. app-defaults file in $XAPPLRESDIR
     2. $HOME/.Xdefaults
     3. RESOURCE_MANAGER property on root-window of    screen 0
     4. SCREEN_RESOURCES property on root-window of    the current screen
     5. $XENVIRONMENT file OR $HOME/.Xdefaults-<nodename>
     6. resources specified    via -xrm on the    commandline
 
Right now I have two issues: the line
Code:
. $HOME/Gitclones/powerline/build/lib/powerline/bindings/bash/powerline.sh
inside .bashrc is causing errors

Code:
bash: /home/user/Gitclones/powerline/build/lib/powerline/bindings/bash/../../../scripts/powerline-config: No such file or directory
bash: /home/userGitclones/powerline/build/lib/powerline/bindings/bash/../../../scripts/powerline-config: No such file or directory

and my powerline is not arrows, its weird scandinavian letters.
 
Right now I have two issues: the line Code:
. $HOME/Gitclones/powerline/build/lib/powerline/bindings/bash/powerline.sh
inside .bashrc is causing errors
The root path names of the power-line installation in your .bashrc and error message indicate a local GitHub copy. It could be a $PATH environment problem: https://powerline.readthedocs.io/en/latest/installation.html#pip-installation.

The packages misc/py-powerline-status and x11-fonts/powerline-fonts work just fine:

powerline.png

and my powerline is not arrows, its weird scandinavian letters.
The power-line font may not be set correctly or in a configuration file the terminal doesn't read. In the above screenshot x11/rxvt-unicode reads it's configuration from ~/.Xdefaults.
 
urxvt does not load the new font, even though it says it has. If I execute neofetch its says "Terminal Font: DejaVu Sans Mono for Powerline", however the font stays the same. After installing py-powerline-status and changing the path of powerline.sh I get the correct colors as the background color and format however the glyphs/arrows are still scandinavian letters and other letters such as ï and î. I have executed xrdb .Xdefaults and tried as well as xrdb .Xdefaults -merge, to no avail. The only way to change the font is by executing urxvt inside urxvt as urxvt -fn xft:DejaVu\ Sans\ Mono\ for\ Powerline. My .Xdefaults is identical to yours, and changing it to yours yields the same result, weird letters and the wrong font when executing urxvt normaly. Restarting the computer has no effect on changing the font of urxvt.
 
... however the glyphs/arrows are still scandinavian letters and other letters such as ï and î.

I could reproduce a similar output of powerline, the locale (localization) is most likely responsible:

powerline2.png

Edit /etc/login.conf:

Code:
default:\
        .....
        :umask=022:\
        :charset=UTF-8:\
        :lang=C.UTF-8:

Afterwards run # cap_mkdb /etc/login.conf, if logged in as user, log out, log in. I had my locale set in the above manner, after editing to original state the powerline showed those artifacts in the screenshot.
 
I have executed xrdb .Xdefaults and tried as well as xrdb .Xdefaults -merge, to no avail. The only way to change the font is by executing urxvt inside urxvt as urxvt -fn xft:DejaVu\ Sans\ Mono\ for\ Powerline.
Have you set the font path for xorg as adviced in the post-install message of x11-fonts/powerline-fonts ( pkg info -D powerline-fonts)?

/usr/local/etc/X11/xorg.conf.d/files.conf:

Code:
Section "Files"
    FontPath "/usr/local/share/fonts/powerline-fonts"
EndSection

If you have other fonts installed, add them to the file ( pkg info -D '*' | grep FontPath) .
 
Both setting charset/lang and adding powerline-fonts to the correct file config solved it! I had added powerline fonts in the wrong xorg font config file and the charset was set to another language than Swedish, because of my keyboard :) Thanks a lot T-Daemon! You're the best!
 
Back
Top