you were right about the type command, I'm going to rework my wrapper script a bit.
anyway, yes, for prime all you have to do is set those variables, which is what my wrapper does.
for optimus, it attempts to figure out which wrapper script to use, and then uses it.
For any system with more than two graphics cards: ... well... normally that would be a system with an onboard intel GPU and either dual NVIDIA or dual AMD cards in SLI or whatever AMD calls it.
In such a setup the onboard card should be disabled in your BIOS, and the crossfire / sli setup should report as only one card, if i'm not mistaken...
and as far as laptops go, I don't really think there will be a laptop with more than two GPUs anyway.
Still, I'm going to change my wrapper to the extent that the user can override everything I'm trying to do just by setting the right variables.
For example, is you have your own wrapper for optimus, you can already run the viewer like this:
So all I need is to set the prime vars only IF there's a prime setup, and only IF they are empty. Should be simple enough.
In any case, my additions to the wrapper script already work without issues on regular desktop PCs.
Cheers
LC