graphics issues with my terminal emulator

Hello there,

I'm writing this topic because I didn't find the answer about my issue. I'm currently running FreeBSD 12.0, I'm using dwm as window manager (and assistant to the regional manager) and my favorite shell is ZSH. I'm using ZSH at work, on my Linux PC, Solus Linux to be precise, and it works like a charm. I've installed ZSH, Oh-My-Zsh script to add functionalities and make it a bit prettier, and on top of that, I also installed PowerLevel9k Theme, which is absoluetly gorgeous.

I've installed ZSH on my FreeBSD laptop, I downloaded with git Oh-My-Zsh and Powerlevel9k, installed all of that, and it's not that great. It works the same, but it's ugly as hell. I've seen some topics talking about the number of colors my terminal can display, etc etc.
On terminator terminal, tput colors command tells me 237, simple terminal tells me 273, and it appears that I need 256 to have the good render (it then sould be working).

On my solus distro, I'm also using terminator as main terminal emulator, and it displays well.

I'm gonna show you fellas 2 pictures, one from my work's PC, and one from my personal laptop to show you what I'm dealing with.

If you have any ideas, I'd be glad to take them, and if there is the answer somewhere, please send me the link and accept my apologizes.

Deckard.
 

Attachments

  • Capture d’écran du 2019-10-01 17-12-25.png
    Capture d’écran du 2019-10-01 17-12-25.png
    47.2 KB · Views: 594
  • Screenshot-2019-10-04-21-31-25.png
    Screenshot-2019-10-04-21-31-25.png
    19.2 KB · Views: 574
You probably need to configure your terminal properly.
For example, this is what I have in my environment:
Code:
COLORTERM=truecolor
TERM=xterm-256color

I also use zsh with Oh my zsh! I use it with Arch and FreeBSD. The default configuration in FreeBSD is very very basic! I found the easiest way to replicate the configuration from Arch is to just take the files: /etc/zsh/zshrc, /etc/zsh/zprofile, /etc/zsh/keephack, ~/.zshrc and copy them to the FreeBSD box. Just be careful to put them in /usr/local/etc. To make sure they really get executed, put an echo command in "zshrc" and make sure the echo appears when you start your shell.

This worked like a charm for me and the look is exactly the same like in Arch.
 
Hi there, thanks for your answer ! Do you have the configuration of those files ? I'm gonna have to wait until monday if I want to get my configuration files from my Linux PC.

Thanks for your answer though !
 
Hi there, thanks for your answer ! Do you have the configuration of those files ? I'm gonna have to wait until monday if I want to get my configuration files from my Linux PC.

Thanks for your answer though !
Yes I do have them, you can get them from any default installation of zsh on Arch.

This is what my own configuration looks like. I am pasting it in an external bin because the code is too long for the forum.
Bash:
emulate sh -c 'source /etc/profile'
Bash:
autoload -U compinit promptinit
compinit
promptinit

prompt adam1

source ~/.profile

#alias ls='command ls --color=none'
alias reboot='shutdown -r now'
 
Thanks !

I still have few errors apparently. It is a bit better, but still not perfect.

the directory /usr/local/etc/zsh didn't exist, I've created it.
I created 3 files :
Bash:
deckard@mybsd  ~  ll /usr/local/etc/zsh

total 163

-rw-r--r--  1 root  wheel   3.1K Oct  5 17:39 keephack
-rw-r--r--  1 root  wheel    36B Oct  5 12:51 zprofile
-rw-r--r--  1 root  wheel   138K Oct  5 12:50 zshrc

all contains the shell arguments/scripts you gave me.

I also added at the end of my ~/.zshrc this :
Bash:
autoload -U compinit promptinit

compinit

promptinit


prompt adam1


source ~/.profile


#alias ls='command ls --color=none'

alias reboot='shutdown -r now'

I have now another error. The 'test' echoes well though.

Bash:
 deckard@mybsd  ~  source ~/.zshrc 

test

WARNING! Your terminal appears to support fewer than 256 colors!

If your terminal supports 256 colors, please export the appropriate environment variable

_before_ loading this theme in your ~/.zshrc. In most terminal emulators, putting

export TERM="xterm-256color" at the top of your ~/.zshrc is sufficient.

To change an environment variable in tcsh you use: setenv NAME "value"

where NAME is the name of the variable and "value" its new value.

deckard@mybsd ~ % echo $SHELL 

/usr/local/bin/zsh

deckard@mybsd ~ %


Deckard
 
Sure, you have to adapt to your environment. Notice the two environment variables from my first response - I have put them in my .profile. You could put them in the .zshrc, it's up to you.
Also, note that the files get read from /usr/local/etc and not /usr/local/etc/zsh. Just make sure the files are really loaded!
I personally put them in /usr/local/etc/zsh but I created three symlinks in the upper directory to be sure.
 
Back
Top