You could. But just because you could doesn’t mean you should.
Pamac isn’t intended to be used in this way. If you want to use the terminal (as I do) and want the password to be requested in the terminal, prepend the command with PAMAC_CLI_AUTH=1, so like this:
PAMAC_CLI_AUTH=1 pamac upgrade
This will cause it to ask for the password in the CLI, not as a popup anymore. I find this better and less intrusive.
Hope this helps!
Shameless plug:
I made a script that uses pamac to do the updates with Timeshift backups. It also has the option to skip backup creation:
However, if any action requires elevated privileges, you will always need to enter a password, no matter which package manager you use.
So, if you’re screaming “I didn’t sign up for this”, I’m afraid you did, simply by choosing Linux.
That said, there may be a way to keep your password available longer, before having to type it again (in terminal only), but I don’t know how to configure it.
If you find any relevant information about that, it might help to some extent.
They [OpenSuse] seem to have re-interpreted the ..._keep actions to mean “remember authentication while the asking process is running”, and added ..._keep_session and ..._keep_always actions to mean “remember for the entirety of this specific login session” and “remember forever”, respectively.
— Added this as separator to better… separate … two different topics, or thought processes —
There are certainly times when a longer timeout would be desirable, and this guide suggests a procedure to achieve just that, using /etc/sudoers to change the timestamp_timeout value.
Though, I’d probably prefer a switch, something like:
That’s true. I gave up on your polkit link and found this instead, which achieves the outcome; something I’d long forgotten about. Plus it might be the closest the OP can get to minimizing the frequency of password use.
It might be possible. However, it seems it won’t be easy, as it’ll require OP to override an existing rule to add it. And that’s all I know and where I bow out.
Extending the sudo password timeout looks as it might suffice, especially as it also extends to sudo use in pamac; that is, unless someone gives a specific reason that it won’t. I’ll likely do this myself too, now I’ve rediscovered it. As the only user, there are no obvious security implications.
AFAIK it doesn’t have an effect on pamac. On pacman yes, but pacman != pamac. Because pamac shouldn’t be used with sudo, polkit takes care of authentication when necessary, but pacman uses sudo.
The assumption is that pamac employs the same sudo as pacman, with the same inherited configuration. I’ll look at it again when I’m back on Linux tomorrow.
I resently had a VERY strange bug where the directory where my NFS were supposed to mount was suddenly gone. I used “open as root” in dolphin (to recreate it) and suddenly the dir appeared, but nfs still refused to mount.
A reboot fixed it.