Scary, maybe. But well tested by many nvidia users already who use ppa:vanvugt/unity if you read the bug.
Also, calling nvidia-settings would be MUCH slower than this quick file scan.
I personally vote for my previous suggestion: Remove step 5 and then all the ugly changes can be deleted and replaced by:
primary_ = gdk_screen_get_primary_monitor(screen).
Scary, maybe. But well tested by many nvidia users already who use ppa:vanvugt/unity if you read the bug.
Also, calling nvidia-settings would be MUCH slower than this quick file scan.
I personally vote for my previous suggestion: Remove step 5 and then all the ugly changes can be deleted and replaced by: get_primary_ monitor( screen) .
primary_ = gdk_screen_