update-alternatives per user
i know that with update-alternatives
admin can choose the current version of app. but is there something similar for non-root users. so they can switch their current version without affecting other users and without requiring root access?
Solution 1:
I know this is an old question, but I wanted to chime in with a blatant promotion for the tool I just released that helps you configure per-user (or even per-shell !) alternatives:
- https://github.com/TekWizely/my-alternatives
You can initialize a shell-specific setup:
$ eval "$( my-alternatives init)"
Or you can initialize a long-lived user-level setup:
# run this once
$ eval "$( my-alternatives init ~/my-alts )"
# place this in your startup scripts
$ eval "$( my-alternatives shellenv ~/my-alts )"
Once configured, setting up a user-local alternative is as easy as:
# equivalent to 'update-alternatives --config <name>'
$ my-alternatives config <name>
NOTE: At the time of this posting, my-alternatives was just released. As such, only init
and config
logic has been built. Other features will come later.