You are not logged in.

#1 2017-09-15 12:05:59

Mjafko
Member
From: Slovenia
Registered: 2017-07-07
Posts: 4

[SOLVED] Terminal errors on opening or creating new tab

I have a small problem which bothers me. Whenever I open terminal or open new tab on it, first 3 lines are :

error: could not register 'sublime-text' database (database already registered)
error: could not register 'sublime-text' database (database already registered)
error: could not register 'sublime-text' database (database already registered)

Happens also while some commands are running like "pacman -Syu". I search on the internet for it seems like I cannot find a solution for it. Not very experienced with arch also.

Let me tell you I use Pantheon terminal, with oh-my-zsh.

Thank you for understanding.

Greetings,
Marko!

Last edited by Mjafko (2017-09-20 18:37:32)

Offline

#2 2017-09-15 12:27:38

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] Terminal errors on opening or creating new tab

with oh-my-zsh

Get rid of it. This is some error in your zshrc and OMZ is a mess and *very* likely the cause for this.

Offline

#3 2017-09-15 12:35:01

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [SOLVED] Terminal errors on opening or creating new tab

Since you mentioned pacman also having issues, look here: https://bbs.archlinux.org/viewtopic.php?id=191802

Offline

#4 2017-09-15 12:44:24

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

Re: [SOLVED] Terminal errors on opening or creating new tab

So let's recap: 1) you are using a ridiculously convoluted shell configuration that you don't understand, 2) you have an unofficial repo enabled in your pacman conf multiple times which I suspect you would not do so you are likely using some other tool that is appending things to your pacman conf, and 3) you have some automatic upgrade (my money is on partial upgrade) stashed away in your shell start up files*.

Any one of these would be a problem.  All three together is a recipe for disaster.  I may not be spot on with all three, if any of those are correct it seems you are trying to take shortcuts to avoid learning how to properly use your system.  There are no short cuts, stop, think, remove the shortcuts, and learn.


*edit: I suppose if #2 is correct, #3 could actually be due to a perfectly reasonable use of `checkupdates` in the shell startup files.  But given the other apparent problems, I still suspect there is some problematic `pacman -Sy` or similar in there.

edit2: let me guess, you followed this and just copied and pasted without even thinking about what those commands do (and without realizing even the authors of those commands meant two of them as an either-or).

Last edited by Trilby (2017-09-15 12:52:30)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-09-15 13:02:38

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [SOLVED] Terminal errors on opening or creating new tab

I'd actually buy that OMZ has some legit zsh slowdown (for pointless update checks), but got to admit that I wasn't aware that pacman yells an error if you add the same database multiple times (probably because I've never tried that ;-)

@Mjafko from your error description it seems as if you (or some script) added the same database 4 times, so clean up your pacman.conf.
Nevertheless, the fact that OMZ calls pacman with every new shell supports the truth that OMZ is a complete mess. Really look into zsh configuration and if you want to cover your learning time, cover it with grml-zsh-config (which however also contains some grml specific code which is just "cruft" in the context of archlinux)

Offline

#6 2017-09-15 14:19:10

Mjafko
Member
From: Slovenia
Registered: 2017-07-07
Posts: 4

Re: [SOLVED] Terminal errors on opening or creating new tab

Trilby wrote:

So let's recap: 1) you are using a ridiculously convoluted shell configuration that you don't understand, 2) you have an unofficial repo enabled in your pacman conf multiple times which I suspect you would not do so you are likely using some other tool that is appending things to your pacman conf, and 3) you have some automatic upgrade (my money is on partial upgrade) stashed away in your shell start up files*.

Any one of these would be a problem.  All three together is a recipe for disaster.  I may not be spot on with all three, if any of those are correct it seems you are trying to take shortcuts to avoid learning how to properly use your system.  There are no short cuts, stop, think, remove the shortcuts, and learn.


*edit: I suppose if #2 is correct, #3 could actually be due to a perfectly reasonable use of `checkupdates` in the shell startup files.  But given the other apparent problems, I still suspect there is some problematic `pacman -Sy` or similar in there.

edit2: let me guess, you followed this and just copied and pasted without even thinking about what those commands do (and without realizing even the authors of those commands meant two of them as an either-or).

Dear sir.

Thank you for your answer. As you point out I am completly newb at all this. Somehow University and Microsoft with msdnaa make sure I stay and learn on Windows machine. Recently I start with a job, where I use Linux. Somehow I start liking it. So I've been testing around. Started with elementary OS ( don't ask me why ). Then I quickly moved to Antergos. Which I really love it. But somehow I want to go "hard", so I decided I gonna install Arch Linux. Followed Arch wiki and manage to successfully do it after a few tries (dual boot with windows). Find it really interesting a way how installation works. Learned alot in the process of it. However as you point out I have lack of knowledge. Trying to learn while doing tasks on the machine. I admit there are some shortcuts I used to get things done on my system because I needed functionaly machine pretty quick.

Mostly I take the time read through guide check some tutorials and so on. Well, I installed oh-my-zsh because I didn't know really how to change theme. So you suggest to I switch back to bash?
Also, there is Pantheon terminal is there a problem with using it instead of default? Somehow really like this terminal.

Also could you please take a bit of time and explain me a bit more options 3 you write? Don't quite understand what you meant.

Your "edit2" is correct. I quickly needed sublime no idea why didn't check official repo first or AUR.

Thank you for your reviews.

EDIT : Well as you assume it was a problem in my Pacman.conf file. I solved this problem now. However, I would really like if you still could answer my questions. Thank you!

Greetings,
Marko.

Last edited by Mjafko (2017-09-15 14:25:24)

Offline

#7 2017-09-15 14:48:58

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

Re: [SOLVED] Terminal errors on opening or creating new tab

Mjafko wrote:

I installed oh-my-zsh because I didn't know really how to change theme. So you suggest to I switch back to bash?

No, there is no need to use bash - I use bash as it suits me better, but zsh is a wonderful shell.  But zsh and oh-my-zsh are totally different things.  I would definitely recommend you get rid of oh-my-zsh; keep zsh and just learn how to set up a theme properly.

Grml is another tool used to help configure zsh.  Personally I don't encourage using grml either, but it is much safer than oh-my-zsh.  I've said before that grml is fast food, oh-my-zsh is poison.  The best approach is to use zsh and learn to configure it the way you want.  If that is too much to learn all at once, grml could be an acceptable training aid.  But just get rid of oh-my-zsh.

Mjafko wrote:

Also, there is Pantheon terminal is there a problem with using it instead of default? Somehow really like this terminal.

Pantheon terminal is fine, that's not at all the problem here.  There are many good terminal emulators, and we all have our personal preferences, but there are many good choices (just like bash and zsh are both good choices).  This seems to be a theme here: arch gives you a lot of freedom to configure your system: there are many good choices of terminal emulator, shell, editor, etc.  But there are also some problematic things out there that should be avoided like certain shell config tools or certain aur helpers.

I'd say that anything in the main repos can always be considered a good choice.  Note that bash and zsh are both in the repos.  rxvt-unicode, xterm, and pantheon-terminal are all in the repos: all good choices.  Grml is even in the repos.  Oh-my-zsh is not.  There are certainly many good tools that are not in the repos, but if you are just learning to use arch, I'd encourage you to always look for options in the repos first.

Mjafko wrote:

Also could you please take a bit of time and explain me a bit more options 3 you write? Don't quite understand what you meant.

If that message was showing up whenever you opened a terminal, it means that pacman was running whenever you opened a terminal.  This seems like a bad idea to me.  If you don't know why pacman is running every time you open a terminal, then it is definitely a problem.  There is a fair amount of bad advice floating around the internet on "shortcuts" on keeping an arch linux system up-to-date "automatically" - all that advice is dangerous and should be avoided.  I'm worried that you may have found and followed some of that advice and put some pacman commands in your zsh startup file(s).  There is a command `checkupdates` which is perfectly safe to use, and it is possible that one could use this in a shell startup file to give an indicator when updates are available - but in any case, you should know why/how pacman is running when you start your shell.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2017-09-15 17:37:28

Mjafko
Member
From: Slovenia
Registered: 2017-07-07
Posts: 4

Re: [SOLVED] Terminal errors on opening or creating new tab

Trilby wrote:
Mjafko wrote:

I installed oh-my-zsh because I didn't know really how to change theme. So you suggest to I switch back to bash?

No, there is no need to use bash - I use bash as it suits me better, but zsh is a wonderful shell.  But zsh and oh-my-zsh are totally different things.  I would definitely recommend you get rid of oh-my-zsh; keep zsh and just learn how to set up a theme properly.

Grml is another tool used to help configure zsh.  Personally I don't encourage using grml either, but it is much safer than oh-my-zsh.  I've said before that grml is fast food, oh-my-zsh is poison.  The best approach is to use zsh and learn to configure it the way you want.  If that is too much to learn all at once, grml could be an acceptable training aid.  But just get rid of oh-my-zsh.

Mjafko wrote:

Also, there is Pantheon terminal is there a problem with using it instead of default? Somehow really like this terminal.

Pantheon terminal is fine, that's not at all the problem here.  There are many good terminal emulators, and we all have our personal preferences, but there are many good choices (just like bash and zsh are both good choices).  This seems to be a theme here: arch gives you a lot of freedom to configure your system: there are many good choices of terminal emulator, shell, editor, etc.  But there are also some problematic things out there that should be avoided like certain shell config tools or certain aur helpers.

I'd say that anything in the main repos can always be considered a good choice.  Note that bash and zsh are both in the repos.  rxvt-unicode, xterm, and pantheon-terminal are all in the repos: all good choices.  Grml is even in the repos.  Oh-my-zsh is not.  There are certainly many good tools that are not in the repos, but if you are just learning to use arch, I'd encourage you to always look for options in the repos first.

Mjafko wrote:

Also could you please take a bit of time and explain me a bit more options 3 you write? Don't quite understand what you meant.

If that message was showing up whenever you opened a terminal, it means that pacman was running whenever you opened a terminal.  This seems like a bad idea to me.  If you don't know why pacman is running every time you open a terminal, then it is definitely a problem.  There is a fair amount of bad advice floating around the internet on "shortcuts" on keeping an arch linux system up-to-date "automatically" - all that advice is dangerous and should be avoided.  I'm worried that you may have found and followed some of that advice and put some pacman commands in your zsh startup file(s).  There is a command `checkupdates` which is perfectly safe to use, and it is possible that one could use this in a shell startup file to give an indicator when updates are available - but in any case, you should know why/how pacman is running when you start your shell.

Dear sir.

Thank you for a detailed answer. Very helpful. Gonna do as you suggest. Since now, when you cleared things up for me I have an idea why all this is a bad practice. And as you guessed I have no idea why pacman runs every time I open terminal. Haven't install any kind of software for this. But I will look at it and check it out, maybe I find a way to disable/remove it.

Thank you again for your help and time.

Greetings,
Marko.

Offline

#9 2017-09-18 12:29:02

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [SOLVED] Terminal errors on opening or creating new tab

seth wrote:

Nevertheless, the fact that OMZ calls pacman with every new shell....

Seth told you that oh-my-zsh is what is running pacman with every shell launch, Remove OMZ.

Last edited by mrunion (2017-09-18 12:29:16)


Matt

"It is very difficult to educate the educated."

Offline

#10 2017-09-20 07:02:47

Mjafko
Member
From: Slovenia
Registered: 2017-07-07
Posts: 4

Re: [SOLVED] Terminal errors on opening or creating new tab

mrunion wrote:
seth wrote:

Nevertheless, the fact that OMZ calls pacman with every new shell....

Seth told you that oh-my-zsh is what is running pacman with every shell launch, Remove OMZ.

Thank you! I did it already works now perfectly fine smile

Offline

#11 2017-09-20 13:08:54

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] Terminal errors on opening or creating new tab

Please remember to mark your thread [SOLVED] (edit the title of your first post).


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB