Whenever I start konsol, I will be prompted that my permission is insufficient

I accidentally deleted the /bin/zsh file before, and then reinstalled zsh, so my .zshrc file was changed.

I copied another .zshrc file from the skeleton. Although the appearance of konsol changed back to the original, the following prompt appeared:


It says:

/home/$USER/.zshrc:12:insufficient privilege: /home/$USER
/home/$USER/.zshrc:13:insufficient privilege: /home/$USER
/home/$USER/.zshrc:14:insufficient privilege: /home/$USER

and with a 126 ERROR
This message also appears when I run the zsh program.

My .zshrc file is the system default. The only change I have made is to reinstall the zsh program.

So is there any way to solve this problem?

You must take ownership of the home folder.

Can you give me a clearer indication? I think I already have ownership of this folder.

Then show ls -l of that folder.

1 Like

无标题
He listed all my files, not including hidden files.

I’m confused - it looks like you’re trying to run .zshrc, not source it.

Ok, it also seems all your files are -x (executable). You’ve been playing with your permissions…

So try removing ‘executable’ from your .zshrc.

.
Then try in terminal again…

Save time with a quick alias to reload/clear terminal

alias rc='source /home/tiango/.zshrc && clear'

You should also consider running Timeshift - then copying back any past edition is more trivial…

1 Like

Screenshot_20220720_131450
It still doesn’t seem to solve this problem.

Ah, I should have found timeshift at that time…

please post the text content from the terminal - not pictures as they are of limited use.

cat .zshrc

Paste the text into a new comment - select the text and click on </> in the comment toolbar.

# Created by newuser for 5.9
# Use powerline
USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
  source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
  source /usr/share/zsh/manjaro-zsh-prompt
fi

That’s all there is.

I think the permissions on the files in /usr/share/zsh has been tampered with.

Judging from the lines which yields permission errors - we are looking at the sourced files

Either one of these files

/usr/share/zsh/manjaro-zsh-config
/usr/share/zsh/manjaro-zsh-prompt

What does this command yield

ls -l /usr/share/zsh
ls -l /usr/share/zsh                                                         127 ✘ 
总计 212
drwxr-xr-x  3 root root  4096  6月17日 16:15 5.9
drwxr-xr-x 15 root root  4096  6月17日 16:15 functions
-rw-r--r--  1 root root  8443 2021年11月16日 manjaro-zsh-config
-rw-r--r--  1 root root   999 2021年11月16日 manjaro-zsh-prompt
-rw-r--r--  1 root root 84347 2021年11月16日 p10k-portable.zsh
-rw-r--r--  1 root root 89932 2021年11月16日 p10k.zsh
drwxr-xr-x  5 root root  4096  6月17日 16:15 plugins
drwxr-xr-x  3 root root  4096  7月20日 10:39 scripts
drwxr-xr-x  2 root root  4096  7月19日 08:21 site-functions
-rw-r--r--  1 root root   321 2021年11月16日 zsh-maia-prompt

I have no clue nothing at all …

07:30:18 nix@tiger ~ → ls -l /usr/share/zsh
total 212
drwxr-xr-x  3 root root  4096 Jul 20 07:28 5.9
drwxr-xr-x 15 root root  4096 Jul 20 07:28 functions
-rw-r--r--  1 root root  8443 Nov 15  2021 manjaro-zsh-config
-rw-r--r--  1 root root   999 Nov 15  2021 manjaro-zsh-prompt
-rw-r--r--  1 root root 84347 Nov 15  2021 p10k-portable.zsh
-rw-r--r--  1 root root 89932 Nov 15  2021 p10k.zsh
drwxr-xr-x  5 root root  4096 Jul 20 07:28 plugins
drwxr-xr-x  3 root root  4096 Jul 20 07:28 scripts
drwxr-xr-x  2 root root  4096 Jul 20 07:28 site-functions
-rw-r--r--  1 root root   321 Nov 15  2021 zsh-maia-prompt

07:30:26 nix@tiger ~ → cat .zshrc
# Use powerline
USE_POWERLINE="true"
# Source manjaro-zsh-configuration
if [[ -e /usr/share/zsh/manjaro-zsh-config ]]; then
  source /usr/share/zsh/manjaro-zsh-config
fi
# Use manjaro zsh prompt
if [[ -e /usr/share/zsh/manjaro-zsh-prompt ]]; then
  source /usr/share/zsh/manjaro-zsh-prompt
fi

The permission issue goes deeper int the configuration. I think I would test something like this

In Konsole → Settings → Manage Profiles → New → call it bash - use the default command /bin/bash and save the changes - Select the profile and click Set as Default and click OK.

Then close Konsole - and reopen it - and execute the command

sudo pacman -Rns zsh manjaro-zsh-config

Then reinstall the packages

sudo pacman -Syu zsh manjaro-zsh-config

Test if it solved the issue by executing

zsh

If this fixed it you should get the default prompt without permission errors - if not I am even more clueless.

If it worked you can set the default Konsole profile back to Manjaro.

1 Like

I wonder if it’s because I reinstalled Zsh? Or is it konsol? It seems to me that konsol has also been reinstalled.

Is it possible that I can save the system configuration, that is, save the programs and drivers I installed, and then reinstall the system? (of course, this is also a forced situation. I don’t want to reinstall the system again…)

For debug, you can run zsh -x , and paste text (block with errors : can use btn “search” in konsole toolbar) here in </>

1 Like

All the errors I can find are in a pile of random codes.Are you sure you want to copy them?

And it looks more like a file name than an error.

Then close Konsole - and reopen it - and execute the command

sudo pacman -Rns zsh manjaro-zsh-config

I confirmed that I used the -Rns command to delete zsh and manjaro-zsh-config, but it still said that I would break dependencies(:3_ヽ)_

sudo pacman -Rns zsh manjaro-zsh-config
[sudo] password for tianqo: 
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing zsh breaks dependency 'zsh' required by manjaro-kde-settings

It was an idea - untested - I’d say don’t do it - just try reinstalling the packages.

If I delete manjaro-kde-settings and others, what consequences will there be in reloading, because reinstalling zsh after uninstallation was originally one of my ideas.

OK - lets hold that thought for a moment.

If you switch your global theme to Plasma default Breeze - including the splash and the login screen (the greeter theme) - you can remove the Manjaro specific packages.

Using the Plasma defaults is not bad at all - and an added benefit is, you will be closer to upstream - and that in itself is a win when you sync Plasma updates.

Other than that I have no idea what is causing your issue - and I think it is not worth the effort pursuing this, because some fancy graphics in the shell is not that important.

Switch your default profile to bash - if you want some of the features you could use oh-my-bash.

I think what you said is right. I’ll let it go for the time being. I’ll try again when I have the ability or make a backup of the system in the future.

And thank you for taking pains to solve this problem for me.