Repository navigation
Making the Firefox / Chromium choice in sdm? #337
Replies: 22 comments 10 replies
|
How is this different than using the That said, I agree that there might be a use for a plugin to manage the Thoughts? |
|
Just thinking about those customizations I still do myself, post sdm. |
|
I was thinking that the plugin would do 2 functions:
Primitive, but elegant 😉 Thoughts? |
|
FYI: The only operations I ever do with the alternatives system are install, remove, and config: add a new program as an alternative: remove a program as an alternative: interactively choose an alternative (only when needing to pick one with a lower priority, otherwise the highest priority one is used) ( I haven't gone to the man pages to see if there's a non-interactive way to do the last operation. ) |
|
I wonder how raspi-config sets it? |
|
@tinker2much |
|
If you also had an option to ADD a new executable, that would cover my real needs. |
|
Separately, just to note that plugin |
|
I think a specific feature is simpler. Also, design wise, I think there's a lot of value in sdm being able to set many/most of the things that a standard rpi wizard or rasp-config can do. That's what I thought when I saw them starting to ask the Firefox/Chromium questions. |
|
I think this fits the bill? Comments appreciated! update-alternativesUse the Arguments
Examples
Example series of alternatives for
|
|
Those options take care of several use cases:
But what about where you want to add a new alternative and therefore also have to specify a priority? Like these commands - remember "install" means you're installing the alternative,, not the program. The program is assumed to already exist on the system. What does the word "manual" do in your implementation? |
|
Great questions! Indeed, hadn't gotten to The word "manual" is what YOU would add to your "set-many" file. sdm just passes the file to update-alternatives. My reco to use "manual" was based on experimentation with the |
|
Updated doc for feedback. Thx! update-alternatives
Examples
|
|
It all looks fine to me. |
|
I’ll test as soon as this is in git. |
|
I tried the following, and they all worked great! I was surprised to see get-selections return the CURRENTLY selected choice for ALL alternatives, because I had it in my head that it would be returning ALL the possibilities for some PARTICULAR alternative. But that's just my brain thinking what it wants to. Perhaps this could be an optional parameter to get-selections which would specify the particular alternatives to go deeper on - like someoption="editor|x-www-browser" would give add a more detailed report on just those two alternatives, actually showing ALL the choices, with the data (through not the format) being like this: That would be useful in a case like mine, where I both added the chromium-flatpack alternative and set it, but would like to see the whole picture of how my choice fits among the other possibilities. FYI: my script to produce the report above is the following, falling back on awk because I'm not the bash guy you are: |
|
This should do it? A would run And could also do Output: If I ignore the possibility of translated update-alternatives output, can also filter out the "Presss " line. Seems to me that query-short would be generally more useful and easier to digest...thoughts? |
|
the proposed straight query syntax would be fine for the data-hungry. I agree that the query-short option would be most generally useful - that's what I would use. can you just redirect a newline into the config call? |
|
I've updated plugins/update-alternatives and sdm-cparse. Copy them from github to your system in the appropriate places. Also Docs/Plugins.md is updated for argument ps Guess I'm going to have to learn more about github branches 😲 |
|
query-alternative sounds better |
|
Agree and updated. |
Uh oh!
There was an error while loading. Please reload this page.
What about adding into sdm the equivalent of the choice in the stock wizard that asks which of the two browsers you want as the default or whether you want either of them deleted?
This may currently be (partly) implemented using the standard Debian alternatives system.
All reactions