Issue with zsh, oh-my-zsh, and source...

11 views
Skip to first unread message

Scott Vargovich

unread,
Dec 9, 2020, 1:23:53 PM12/9/20
to linuxus...@googlegroups.com
I am running Artix (http://artixlinux.org) and have zsh and oh-my-zsh-git as my shell.  The prompt I'm specifying doesn't come up when I open termite.  Instead there is a '[user@host]' prompt that appears.  When I 'source .zshrc', vim opens.  When I exit vim, then the prompt I specified in .zshrc comes up.  Best case scenario I would like to have the specified prompt open when I open my shell.  Failing that, figuring out why the source command opens vim and fixing it would suffice.  Any ideas???
--
<><  Scott Vargovich  <><
------------------------------------------
OpenPGP Key ID: 29C36884
==========================
Ham Radio Call Sign: KE8CQC
==========================
GMRS Call Sign:  WQXJ287
------------------------------------------

Chris Miller

unread,
Dec 9, 2020, 2:00:45 PM12/9/20
to linuxus...@googlegroups.com
I suppose the first task is to figure out what the mystery shell is. Usually echo $SHELL will tell you.

I suspect it's opening some shell directly rather than using /bin/login. Another good test would be to log in using a TTY (ctrl+alt+fkey on X11) and see what shell behaves like there. If it's inconsistent with Termite, it's a Termite config issue. Otherwise you may need to chsh again to set the right shell.

--
--
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to linuxus...@googlegroups.com
To unsubscribe, send email to linuxusersgro...@googlegroups.com
For more options, visit our group at http://groups.google.com/group/linuxusersgroup
References can be found at: http://goo.gl/anqri
Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
---
You received this message because you are subscribed to the Google Groups "Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linuxusersgro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linuxusersgroup/CAE8T3AKFy5Z63jYbv8_eUsWQJpUbQUF9YP71vs9dPHSUjAy%3DPQ%40mail.gmail.com.

Daniel Eggleston

unread,
Dec 9, 2020, 3:33:45 PM12/9/20
to Linux Users Group
What's the behavior of these, from the "bad" prompt?

$ echo ZDT:$ZDOTDIR HOME:$HOME
$ ps
$ exec zsh -i

ZDOTDIR controls where it loads zshrc from. If that's empty, it'll fall back to $HOME. If both are empty, that might cause weirdness.

From the [user@host] prompt, if you 'exec zsh -i' and get your prompt, it says the shell was either not zsh, or it was not invoked as an interactive shell (ps will tell you which case that is).

Scott Vargovich

unread,
Dec 9, 2020, 4:01:40 PM12/9/20
to linuxus...@googlegroups.com
echo $SHELL
/bin/zsh

Console login acts the same.

Resetting the shell didn't do anything.




Scott Vargovich

unread,
Dec 9, 2020, 4:07:55 PM12/9/20
to linuxus...@googlegroups.com
echo ZDT:$ZDOTDIR HOME:/home/scott
ZDT:/home/scott/.config/zsh HOME:/home/scott

ps
   PID  TTY                   TIME  CMD
27745 pts/0          00:00:00  zsh
27673 pts/0          00:00:00  ps

exec zsh -i
[scott@hostname]$   --Not my chosen prompt.


--
--
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to linuxus...@googlegroups.com
To unsubscribe, send email to linuxusersgro...@googlegroups.com
For more options, visit our group at http://groups.google.com/group/linuxusersgroup
References can be found at: http://goo.gl/anqri
Please remember to abide by our list rules (http://tinyurl.com/LUG-Rules)
---
You received this message because you are subscribed to the Google Groups "Linux Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linuxusersgro...@googlegroups.com.

Chris Miller

unread,
Dec 9, 2020, 4:48:24 PM12/9/20
to linuxus...@googlegroups.com
Oh interesting. I ran the same on my install of ZSH and ZDOTDIR is unset, so my zshrc is at $HOME/.zshrc. Because your ZDOTDIR is at what appears to be $HOME/.config/zsh it'll be looking for zshrc in $HOME/.config/zsh/.zshrc.

You can probably trivially resolve this with ln -s $HOME/.config/zsh/.zshrc $HOME/.zshrc, assuming oh-my-zsh installed a new zshrc to ~ as it normally does. It may be worth reporting a bug to oh-my-zsh to have them respect ZDOTDIR if they don't already/if you can reproduce the bug using a new user.

Scott Vargovich

unread,
Dec 10, 2020, 11:35:38 AM12/10/20
to linuxus...@googlegroups.com
Thanks Chris!  That did it.  I don't have time right now to add a test user and try to reproduce it / submit a bug report at the moment, but I will try to remember later (the brain cells don't quite fire like they used to).  Merry Christmas or whatever holiday you celebrate this month.

Chris Miller

unread,
Dec 10, 2020, 12:41:20 PM12/10/20
to linuxus...@googlegroups.com

highs...@yahoo.de

unread,
Dec 12, 2020, 4:39:45 AM12/12/20
to linuxus...@googlegroups.com, Scott Vargovich
hello
to the newest version lxde
32bit


Regards Sophie


Reply all
Reply to author
Forward
0 new messages