You are not logged in.

#1 2023-04-18 21:38:01

gremlin
Member
Registered: 2022-07-19
Posts: 18

[solved] zsh by default, it appears, but it'll get activated only

Whenever I open a terminal Yakuake, the prompt will be

[user1@my_comp dir1]$

However:

[user1@my_comp dir1]$echo $SHELL
/bin/zsh

But then

[user1@my_comp dir1]$ exec $SHELL
my_comp%

Which implies that only after do I call "exec $SHELL", does zsh get activated.

How can it be, given that "echo $SHELL" returns "zhs" already?
And why then does the prompt change after the "exec" command?


In the Terminator terminal the prompt initially will be the correct one:

my_comp%

Last edited by gremlin (2023-04-21 12:37:04)

Offline

#2 2023-04-18 23:20:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,491
Website

Re: [solved] zsh by default, it appears, but it'll get activated only

Your prompt is different because a different (set of) startup files are read.  I'd wager one or the other of Terminator or Yakuake runs a login shell while the other runs a regular shell.

But if your configs were set up properly this shouldn't make this kind of difference anyways.  Please post your .zshrc and .zprofile.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-04-19 06:28:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,057

Re: [solved] zsh by default, it appears, but it'll get activated only

~/.zshenv and ~/.zlogin - if they exist.

Do you use OMZ?

Offline

#4 2023-04-19 15:45:34

gremlin
Member
Registered: 2022-07-19
Posts: 18

Re: [solved] zsh by default, it appears, but it'll get activated only

~/.zshrc 

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
source "$HOME/.cargo/env"

HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory

bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word


export PATH="$HOME/.local/bin:$PATH"

The rest of the abovementioned files don't exist

I don't use OMZ

Offline

#5 2023-04-19 15:46:19

gremlin
Member
Registered: 2022-07-19
Posts: 18

Re: [solved] zsh by default, it appears, but it'll get activated only

>I'd wager one or the other of Terminator or Yakuake runs a login shell while the other runs a regular shell.

What does it depend on? And how to find out whether or not?

Offline

#6 2023-04-19 16:15:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,057

Re: [solved] zsh by default, it appears, but it'll get activated only

cat /proc/$$/cmdline

to see how zsh was invoked.
~/.zshenv is always sourced, create the file and have it "echo I AM ZSHELL" or so to track its invocation.

But you don't set a custom prompt?

ls /etc/zsh

Offline

#7 2023-04-19 16:58:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,491
Website

Re: [solved] zsh by default, it appears, but it'll get activated only

By any chance to you have a .bashrc or .bash_profile that exec's zsh?  Could one of the two terminals actually start bash which in turn starts zsh (but only after setting a prompt variable)?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2023-04-21 03:13:23

gremlin
Member
Registered: 2022-07-19
Posts: 18

Re: [solved] zsh by default, it appears, but it'll get activated only

$ cat /proc/$$/cmdline
/bin/bash
$ ls /etc/zsh
zprofile

> By any chance to you have a .bashrc or .bash_profile that exec's zsh?
No

Offline

#9 2023-04-21 03:43:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,491
Website

Re: [solved] zsh by default, it appears, but it'll get activated only

Well there you go, one of Yakuake is not running zsh, but bash.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2023-04-21 06:48:52

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,057

Re: [solved] zsh by default, it appears, but it'll get activated only

… and your bashrc or some {/etc/,$HOME/.}profile* is mis-setting SHELL

Offline

#11 2023-04-21 08:32:21

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,679

Re: [solved] zsh by default, it appears, but it'll get activated only

Yakuake menu -> Manage profiles... -> Edit "Shell [Default]" -> Set Command as appropriate

Offline

#12 2023-04-21 12:36:14

gremlin
Member
Registered: 2022-07-19
Posts: 18

Re: [solved] zsh by default, it appears, but it'll get activated only

Thanks

Offline

Board footer

Powered by FluxBB