Yay: compressing; beep; password. That's all

Is there a way of configuring yay so that if, after it has downloaded something big from aur and is through with compressing, it emitted a series of beeps to alert you to the fact that it’s waiting for a password, just in case you didn’t have your eyes glued to it and were doing something else? It would then give you time to enter the password before it timed out. (I guess I could change the timeout duration.)

I don’t know a way to do that specifically but adding --sudoloop to your yay command line will stop it from timing out until yay has finished.

2 Likes

You can also save sudoloop as a permanent setting:

yay --sudoloop --save

so you won’t have to retype it every time. It should have been in the default settings, imo…

1 Like

It probably shouldn’t be default as it does represent a security compromise. The risk is pretty low for most people but probably still shouldn’t be the default.

I can imagine that. Still I have too little knowledge of how it works internally to really judge.

You can try this.

It didn’t work for me though for some reason. Neither with ‘^G’, nor with “\0007”… Depends on the terminal/shell configuration most likely. I hate bells normally, probably turned it off somewhere in my configs.

edit: yep, switched all the beeps off in my .zshrc. Now it works.

  • Edit your /etc/sudoers with visudo:
    sudo EDITOR=vim visudo

  • Add this line to it:
    Defaults passprompt="^G[sudo] password for %p: "

You shouldn’t type ^G in though. In vim hold Ctrl key down and press V and then G. If it appears in different color - then it must be it. I don’t know how to do that in other editors.

1 Like

Here is a discussion and some configuration options: https://github.com/Jguer/yay/issues/147

But be careful, whatever you choose.

1 Like

Brilliant! Many thanks! I will have a careful play and see what happens.

2 Likes