zsh-users
 help / color / mirror / code / Atom feed
* help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
@ 2020-06-09 10:06 Michael Fothergill
  2020-06-09 10:11 ` Roman Perepelitsa
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Fothergill @ 2020-06-09 10:06 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]

I am running gentoo stable on FX 8350 box. I installed zsh following
instructions given on gentoo wiki pages.
I did it quite correctly because when I first ran chsh -s /bin/zsh  instead
of running the start up script it asked for a password to
be entered.

Apparently that is a bad thing.

My .zshrc file is in my /home/user directory:

bucketlist /home/mikef # more .zshrc
#~!/bin/zsh

#Completion
autoload -U compinit
compinit

# Correction

setopt correctall


#Prompt

autoload -U promptinit
promptinit
prompt gentoo
bucketlist /home/mikef #

My /etc/shells file looks like this:

mikef@bucketlist /etc % more shells
# /etc/shells: valid login shells
/bin/bash
/bin/csh
/bin/dash
/bin/esh
/bin/fish
/bin/ksh
/bin/mksh
/bin/sash
/bin/sh
/bin/tcsh
/bin/zsh
mikef@bucketlist /etc %

I think I have managed to install zsh:

mikef@bucketlist /etc % equery l zsh
 * Searching for zsh ...
[IP-] [  ] app-shells/zsh-5.8:0
mikef@bucketlist /etc %

mikef@bucketlist /etc % echo "My current shell is $SHELL ($0)"
My current shell is /bin/zsh (zsh)
mikef@bucketlist /etc %

If you know of any diagnostic tests to check whether zsh is really running
properly or not I would appreciate it.

My fear is that it has been installed in an incorrect or half-cocked
fashion.

Comments appreciated.

Regards

Michael Fothergill

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-09 10:06 help with installing and correctly configuring zsh on an amd 64 box running gentoo stable Michael Fothergill
@ 2020-06-09 10:11 ` Roman Perepelitsa
       [not found]   ` <CANc=Sd1W4ZtzJSGfmfdpgNx6n_9cEjxjnxsQZxxz8AJH+RDNKA@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Roman Perepelitsa @ 2020-06-09 10:11 UTC (permalink / raw)
  To: Michael Fothergill; +Cc: Zsh Users

On Tue, Jun 9, 2020 at 12:07 PM Michael Fothergill
<michael.fothergill@gmail.com> wrote:
> I did it quite correctly because when I first ran chsh -s /bin/zsh  instead
> of running the start up script it asked for a password to
> be entered.

Are you worried about `chsh -s /bin/zsh` asking for your password?
That's the expected behavior of this command. Changing one's own login
shell requires password for all users except root.

Roman.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
       [not found]   ` <CANc=Sd1W4ZtzJSGfmfdpgNx6n_9cEjxjnxsQZxxz8AJH+RDNKA@mail.gmail.com>
@ 2020-06-09 10:26     ` Roman Perepelitsa
       [not found]       ` <CANc=Sd2wUomQRuVvWu5A07_JWjLeJnDviTrWm00GqVamEKqvMA@mail.gmail.com>
  2020-06-10 11:06       ` Michael Fothergill
  0 siblings, 2 replies; 11+ messages in thread
From: Roman Perepelitsa @ 2020-06-09 10:26 UTC (permalink / raw)
  To: Michael Fothergill; +Cc: Zsh Users

On Tue, Jun 9, 2020 at 12:21 PM Michael Fothergill
<michael.fothergill@gmail.com> wrote:
>
> A great many thanks for telling me that........
>
> I trust it does not matter that I was never prompted with the start up script when I installed zsh.......?

What do you mean by the startup script? If you mean
zsh-newuser-install, it triggers automatically when you start zsh as
non-root and there is no ~/.zshrc. You can also run it manually from
zsh with the following command:

  autoload -Uz zsh-newuser-install
  zsh-newuser-install -f

> I am going to try to install powerlevel 10K next.
>
> Wish me luck.

Good luck :-)


Roman.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
       [not found]       ` <CANc=Sd2wUomQRuVvWu5A07_JWjLeJnDviTrWm00GqVamEKqvMA@mail.gmail.com>
@ 2020-06-09 10:33         ` Roman Perepelitsa
  0 siblings, 0 replies; 11+ messages in thread
From: Roman Perepelitsa @ 2020-06-09 10:33 UTC (permalink / raw)
  To: Michael Fothergill; +Cc: Zsh Users

On Tue, Jun 9, 2020 at 12:30 PM Michael Fothergill
<michael.fothergill@gmail.com> wrote:
>
> I think I created a .zshrc file right away at the start of installing zsh.  So I may have suppressed the appearance of the install script.
>
> I will try running the command you gave and see if I can get it to run.

Note that it's not necessary to run zsh-newuser-install. The purpose
of this script is to create ~/.zshrc. If you've already got a suitable
~/.zshrc (perhaps you've copied it from somewhere), you are all set.

Roman.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-09 10:26     ` Roman Perepelitsa
       [not found]       ` <CANc=Sd2wUomQRuVvWu5A07_JWjLeJnDviTrWm00GqVamEKqvMA@mail.gmail.com>
@ 2020-06-10 11:06       ` Michael Fothergill
  2020-06-10 11:56         ` david rayner
  2020-06-11 11:48         ` Roman Perepelitsa
  1 sibling, 2 replies; 11+ messages in thread
From: Michael Fothergill @ 2020-06-10 11:06 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 2188 bytes --]

Many thanks for the help and advice.

My .zshrc file now looks like this:

���  mikef more .zshrc
source "/usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme"

plugins=(
    git
    bundler
    dotenv
    osx
    rake
    rbenv
    ruby
)


ZSH_THEME="robbyrussell"

zstyle ':completion::complete:*' use-cache 1

#!/bin/zsh

#Completion
autoload -U compinit
compinit

# Correction

setopt correctall


#Prompt

autoload -U promptinit
promptinit
prompt gentoo

alias myip="curl http://ipecho.net/plain; echo"

���  mikef

I had originally intended to install powerlevel10k but I found a wiki page
on gentoo
advising on installing powerlevel 9k:

https://wiki.gentoo.org/wiki/Powerlevel9k

i follow the instructions in it and added the

source "/usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme"

to the .zshrc file.


When Iog in I get the following error message when I start up a terminal
prompt:


/home/mikef/.zshrc:source:1: no such file or directory:
/usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme
mikef@bucketlist ~ %

Suggestions on what is wrong here are appreciated.

I noticed that there is a gentoo overlay called fulgurance that might help
me a bit:

https://github.com/Fulgurance/fulgurance-overlay

Has anyone used it on the list here?

Comments appreciated.

Regards

MF

On Tue, 9 Jun 2020 at 11:26, Roman Perepelitsa <roman.perepelitsa@gmail.com>
wrote:

> On Tue, Jun 9, 2020 at 12:21 PM Michael Fothergill
> <michael.fothergill@gmail.com> wrote:
> >
> > A great many thanks for telling me that........
> >
> > I trust it does not matter that I was never prompted with the start up
> script when I installed zsh.......?
>
> What do you mean by the startup script? If you mean
> zsh-newuser-install, it triggers automatically when you start zsh as
> non-root and there is no ~/.zshrc. You can also run it manually from
> zsh with the following command:
>
>   autoload -Uz zsh-newuser-install
>   zsh-newuser-install -f
>
> > I am going to try to install powerlevel 10K next.
> >
> > Wish me luck.
>
> Good luck :-)
>
>
> Roman.
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-10 11:06       ` Michael Fothergill
@ 2020-06-10 11:56         ` david rayner
  2020-06-11 11:38           ` Michael Fothergill
  2020-06-11 11:48         ` Roman Perepelitsa
  1 sibling, 1 reply; 11+ messages in thread
From: david rayner @ 2020-06-10 11:56 UTC (permalink / raw)
  To: zsh-users

a few setopts you may want

setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE    # dont put commands beginning with space in 
history
setopt interactivecomments  # allows end of command line comments

setopt extendedglob
setopt extended_glob
setopt no_case_glob
# allow ls **.c instead of **/*.c
setopt GLOBSTARSHORT
setopt autopushd pushdignoredups autocd

On 10/06/2020 12:06, Michael Fothergill wrote:
> Many thanks for the help and advice.
>
> My .zshrc file now looks like this:
>
> ���  mikef more .zshrc
> source "/usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme"
>
> plugins=(
>      git
>      bundler
>      dotenv
>      osx
>      rake
>      rbenv
>      ruby
> )
>
>
> ZSH_THEME="robbyrussell"
>
> zstyle ':completion::complete:*' use-cache 1
>
> #!/bin/zsh
>
> #Completion
> autoload -U compinit
> compinit
>
> # Correction
>
> setopt correctall
>
>
> #Prompt
>
> autoload -U promptinit
> promptinit
> prompt gentoo
>
> alias myip="curl http://ipecho.net/plain; echo"
>
> ���  mikef
>
> I had originally intended to install powerlevel10k but I found a wiki page
> on gentoo
> advising on installing powerlevel 9k:
>
> https://wiki.gentoo.org/wiki/Powerlevel9k
>
> i follow the instructions in it and added the
>
> source "/usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme"
>
> to the .zshrc file.
>
>
> When Iog in I get the following error message when I start up a terminal
> prompt:
>
>
> /home/mikef/.zshrc:source:1: no such file or directory:
> /usr/share/zsh-theme-powerlevel9k/powerlevel9k.zsh-theme
> mikef@bucketlist ~ %
>
> Suggestions on what is wrong here are appreciated.
>
> I noticed that there is a gentoo overlay called fulgurance that might help
> me a bit:
>
> https://github.com/Fulgurance/fulgurance-overlay
>
> Has anyone used it on the list here?
>
> Comments appreciated.
>
> Regards
>
> MF
>
> On Tue, 9 Jun 2020 at 11:26, Roman Perepelitsa <roman.perepelitsa@gmail.com>
> wrote:
>
>> On Tue, Jun 9, 2020 at 12:21 PM Michael Fothergill
>> <michael.fothergill@gmail.com> wrote:
>>> A great many thanks for telling me that........
>>>
>>> I trust it does not matter that I was never prompted with the start up
>> script when I installed zsh.......?
>>
>> What do you mean by the startup script? If you mean
>> zsh-newuser-install, it triggers automatically when you start zsh as
>> non-root and there is no ~/.zshrc. You can also run it manually from
>> zsh with the following command:
>>
>>    autoload -Uz zsh-newuser-install
>>    zsh-newuser-install -f
>>
>>> I am going to try to install powerlevel 10K next.
>>>
>>> Wish me luck.
>> Good luck :-)
>>
>>
>> Roman.
>>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-10 11:56         ` david rayner
@ 2020-06-11 11:38           ` Michael Fothergill
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Fothergill @ 2020-06-11 11:38 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

A great many thanks for the help and tips.

I found the powerlevel9k directory in /root on my gentoo install.

The powerlevel9k-theme file lives in it.

The path to it I had in my .zshrc file was wrong.

I have corrected that now.

I had to use chown and chgrp to change the permissions from root to user
for /root and /root/powerlevel9k directories and
/root/powerlevel9k/powerlvel9k-theme file.

Running powerlevel9k from a konsole terminal shows the blue box attachment
to the prompt with a little ampersand sign inside it.

I think that means that powerlevel 9k is working a bit now.

But it is generating a lot of error messages.

I am getting a lot of left and right hand prompt segment command not found
print icon errors.....

Suggestions on this would be appreciated.

Cheers

MF

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-10 11:06       ` Michael Fothergill
  2020-06-10 11:56         ` david rayner
@ 2020-06-11 11:48         ` Roman Perepelitsa
  2020-06-11 12:21           ` Michael Fothergill
  1 sibling, 1 reply; 11+ messages in thread
From: Roman Perepelitsa @ 2020-06-11 11:48 UTC (permalink / raw)
  To: Michael Fothergill; +Cc: Zsh Users

On Wed, Jun 10, 2020 at 1:07 PM Michael Fothergill
<michael.fothergill@gmail.com> wrote:
> I had originally intended to install powerlevel10k but I found a wiki page
> on gentoo advising on installing powerlevel 9k:
>
> https://wiki.gentoo.org/wiki/Powerlevel9k

These are installation instructions for Powerlevel9k on Gentoo. They
shouldn't be confused with advice to install Powerlevel9k on Gentoo.

Powerlevel9k has been discontinued. The first line of its homepage reads:

> Powerlevel9k is deprecated and now unmaintained. Please use Powerlevel10k!

Roman.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-11 11:48         ` Roman Perepelitsa
@ 2020-06-11 12:21           ` Michael Fothergill
  2020-06-12 16:20             ` Michael Fothergill
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Fothergill @ 2020-06-11 12:21 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 908 bytes --]

Many thanks for your help and advice.

I have now got powerlevel 10k running on my gentoo install.

I ran the wizard and it runs OK as a user.

It does not as root perhaps yet.

I have not run p10k configure yet.


Regards

MF

On Thu, 11 Jun 2020 at 12:48, Roman Perepelitsa <roman.perepelitsa@gmail.com>
wrote:

> On Wed, Jun 10, 2020 at 1:07 PM Michael Fothergill
> <michael.fothergill@gmail.com> wrote:
> > I had originally intended to install powerlevel10k but I found a wiki
> page
> > on gentoo advising on installing powerlevel 9k:
> >
> > https://wiki.gentoo.org/wiki/Powerlevel9k
>
> These are installation instructions for Powerlevel9k on Gentoo. They
> shouldn't be confused with advice to install Powerlevel9k on Gentoo.
>
> Powerlevel9k has been discontinued. The first line of its homepage reads:
>
> > Powerlevel9k is deprecated and now unmaintained. Please use
> Powerlevel10k!
>
> Roman.
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-11 12:21           ` Michael Fothergill
@ 2020-06-12 16:20             ` Michael Fothergill
  2020-06-12 16:35               ` Roman Perepelitsa
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Fothergill @ 2020-06-12 16:20 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

Many thanks for the  help and advice.

As well as installing zsh and powerlevel 10k on the gentoo install I have I
also did it with ubuntu.  Ubuntu is easier because prepared binary packages
are available to install things including the nerd fonts.

When i installed powerlevel10k using the omyzsh instructions I could get it
to run.

So I used the standard manual install instructions and it ended up in the
/root directory.  When I put that path into the .zshrc and ran exec zsh as
a user powerlevel 10k began to run.

The wizard ran and I set up a dozen or so prompt environment parameters and
at the end noticed a warning message:

Apply changes to ~/.zshrc?

   WARNING: ~/.zshrc is readonly and not owned by the user. Cannot modify
it.

(y)  Yes (disabled).

(n)  No. I know which changes to apply and will do it myself.

(r)  Restart from the beginning.
(q)  Quit and do nothing.

Choice [nrq]:


This meant I could not save the chosen options and carry on with them.

What sort of problem is this?

is it a file permissions problem?

I did not get that problem with the gentoo install.

Comments appreciated.

Regards

MF

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: help with installing and correctly configuring zsh on an amd 64 box running gentoo stable
  2020-06-12 16:20             ` Michael Fothergill
@ 2020-06-12 16:35               ` Roman Perepelitsa
  0 siblings, 0 replies; 11+ messages in thread
From: Roman Perepelitsa @ 2020-06-12 16:35 UTC (permalink / raw)
  To: Michael Fothergill; +Cc: Zsh Users

On Fri, Jun 12, 2020 at 6:22 PM Michael Fothergill
<michael.fothergill@gmail.com> wrote:
> So I used the standard manual install instructions and it ended up in the
> /root directory.  When I put that path into the .zshrc and ran exec zsh as
> a user powerlevel 10k began to run.

It seems like you are doing something unusual. Unless you have a
strong reason, I would advise against copying or sourcing anything
from /root. Better yet, don't log in as root, don't execute `sudo su`,
don't change the root's login shell, don't modify or create any files
under /root, etc. I don't know about Gentoo but when you install
Ubuntu you log in straight away as a regular user. Stay as that user.
If Gentoo doesn't create a regular user for you during installation
and logs you in as root, create a regular user with sudo privileges,
switch to that user and never again log in as root.

Now, supposing that you managed to log in as a regular user, you can
proceed with the installation of software following the standard
installation instructions. Sometimes you'll need to run commands via
`sudo`. That's fine. Only add `sudo` when the command wouldn't work
without it.

Roman.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-06-12 16:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 10:06 help with installing and correctly configuring zsh on an amd 64 box running gentoo stable Michael Fothergill
2020-06-09 10:11 ` Roman Perepelitsa
     [not found]   ` <CANc=Sd1W4ZtzJSGfmfdpgNx6n_9cEjxjnxsQZxxz8AJH+RDNKA@mail.gmail.com>
2020-06-09 10:26     ` Roman Perepelitsa
     [not found]       ` <CANc=Sd2wUomQRuVvWu5A07_JWjLeJnDviTrWm00GqVamEKqvMA@mail.gmail.com>
2020-06-09 10:33         ` Roman Perepelitsa
2020-06-10 11:06       ` Michael Fothergill
2020-06-10 11:56         ` david rayner
2020-06-11 11:38           ` Michael Fothergill
2020-06-11 11:48         ` Roman Perepelitsa
2020-06-11 12:21           ` Michael Fothergill
2020-06-12 16:20             ` Michael Fothergill
2020-06-12 16:35               ` Roman Perepelitsa

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).