You are not logged in.

#1 2019-02-06 23:42:50

karcher
Member
Registered: 2018-01-09
Posts: 133

[SOLVED] Issues with powerline and zsh

Hi all,

I have switched to zsh and powerline some time ago. Today I've installed some bundles with Antigen and every time I was reloading my zsh config with:

$ source ~/.zshrc
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems robbyrussell/oh-my-zsh is already installed!
Seems rupa/z is already installed!
...
Antigen: Theme "agnoster" is already active.

my prompt was changing form and colors. E.g. before sourcing it had the form user@host and after sourcing it only user. It seems that the correct prompt is the second one. So in order to have the powerline appearing correctly I have to source my zsh config every time. I see the same behavior regardless of the terminal (Konsole, Terminator or Terminology ) I'm using.

Any ideas why is this happening?

I also find weird that this line:

Seems robbyrussell/oh-my-zsh is already installed!

appears several times.

Besides that, I found another thing weird. I tried to run this command:

$ chsh -s $(which zsh)
Changing shell for user.
Password: 
chsh: "/usr/sbin/zsh" is not listed in /etc/shells.
Use chsh -l to see list.

Indeed:

cat /etc/shells     
# Pathnames of valid login shells.
# See shells(5) for details.

/bin/sh
/bin/bash
/usr/bin/git-shell
/bin/zsh
/usr/bin/zsh

but:

$ which $SHELL
/usr/bin/zsh

and:

$which zsh 
/usr/sbin/zsh

Could someone please enlighten me?

Last edited by karcher (2019-02-08 10:07:53)

Offline

#2 2019-02-06 23:56:19

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: [SOLVED] Issues with powerline and zsh

Hello there,

Out of curiosity, do you happen to have conflicting zsh packages installed?

pacman -Qo /usr/sbin/zsh
pacman -Qo /usr/bin/zsh
pacman -Qo /bin/zsh
pacman -Qkk zsh

Regards

Offline

#3 2019-02-07 00:06:07

karcher
Member
Registered: 2018-01-09
Posts: 133

Re: [SOLVED] Issues with powerline and zsh

@bugsmanagement: Thanks for your response!

I don't see anything weird in the results:

/usr/bin/zsh is owned by zsh 5.7.1-1
/usr/bin/zsh is owned by zsh 5.7.1-1
/usr/bin/zsh is owned by zsh 5.7.1-1
zsh: 1171 total files, 0 missing files

Offline

#4 2019-02-07 00:13:22

loqs
Member
Registered: 2014-03-06
Posts: 14,248

Re: [SOLVED] Issues with powerline and zsh

Why is /usr/sbin in your $PATH ?

Offline

#5 2019-02-07 00:16:48

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: [SOLVED] Issues with powerline and zsh

You might simply have a broken on-my-zsh install, try re-installing it using the install script. There have been a lot of fixes implemented that might remedy this.

EDIT:

loqs wrote:

Why is /usr/sbin in your $PATH ?

Though this might be causing the problem here.

Regards

Last edited by bugsmanagement (2019-02-07 00:31:01)

Offline

#6 2019-02-07 00:30:18

karcher
Member
Registered: 2018-01-09
Posts: 133

Re: [SOLVED] Issues with powerline and zsh

@loqs: Thanks for your response!
No idea...Is it wrong?

$ ls -la /usr/sbin
lrwxrwxrwx 1 root root 3 Dec  6 15:19 /usr/sbin -> bin

@bugsmanagement: Yes, I guess I could try to reinstall it.

Offline

#7 2019-02-07 01:07:18

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 29,738
Website

Re: [SOLVED] Issues with powerline and zsh

bugsmanagement wrote:

You might simply have a broken on-my-zsh install

Every OMZ install is broken. It really is only good for taking a perfectly good shell, and turning it into a fragile, bloated mess.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Online

#8 2019-02-07 01:15:44

bugsmanagement
Member
Registered: 2017-04-21
Posts: 201

Re: [SOLVED] Issues with powerline and zsh

jasonwryan wrote:

Every OMZ install is broken. It really is only good for taking a perfectly good shell, and turning it into a fragile, bloated mess.

My 2 cents, I on the other find OMZ quite functional, the prompt contains useful information for me to consume (including useful shortcuts), and sadly (or happily) I like me eyecandy especially in instances when I'm staring down at the terminal for more than 15 hours a day.

Last edited by bugsmanagement (2019-02-07 01:18:33)

Offline

#9 2019-02-07 09:15:52

seth
Member
Registered: 2012-09-03
Posts: 24,984

Re: [SOLVED] Issues with powerline and zsh

You can have all of that perfectly fine w/o buying into OMZ.
If you want some enrichment w/o actually having to know what you're doing, grml-zsh-config is a usable enhancment.
The nifty (or not, matter of personal taste ;-) powerline arrow look is completely independent of any of that.

@karcher, none of these lines should appear AT ALL. It means that you're (or probably rather OMZ is) sourcing the same stuff over and over again. .zshrc is sourced when you start zsh, you're now probably just skipping the execution of some source files, thus ultimately changing their order (those lines executed twice shuffle to the end)
Some competing PS1 definitions from contradicting OMZ packages and their interaction will cause the different prompts.

OMZ is complete FUBAR, this is not fixable.

Offline

#10 2019-02-08 10:07:29

karcher
Member
Registered: 2018-01-09
Posts: 133

Re: [SOLVED] Issues with powerline and zsh

I finally got it working, at least for the normal user. This is what I basically did:

1. Replaced powerline with python-powerline-git from the AUR (strangely enough powerline docs point to the AUR packages although there is a package in the repos)
https://powerline.readthedocs.io/en/mas … linux.html
https://www.archlinux.org/packages/comm … powerline/

2. Replaced zsh-theme-powerlevel9k from the repos with the Antigen version

3. Reinstalled Nerd-Fonts

4. Reconfigured my .zshrc. Apparently this was the culprit since by looking better into it, I found out that apart from the powerlevel9k theme, the agnoster theme was also there.
I also had to play around with the order of the settings. E.g. these lines:

POWERLEVEL9K_MODE='nerdfont-complete'
antigen theme bhilburn/powerlevel9k powerlevel9k

were causing trouble with the icons. Before all this I removed the antigen config folder:

$ rm -rf ~/.antigen

I tried to do the same for the root user by linking my .zshrc:

$ sudo ln -s $HOME/.zshrc /root/.zshrc

but when I start a new tab in the TE I see these 2 lines in the beginning:

QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0

and the powerlevel9k theme is slightly differently (not so bad but I don't like these messages about "wrong ownership").

Offline

Board footer

Powered by FluxBB