Bug 204

Summary: RFE: nvidia-settings needs to start as root or ask for root to save the config
Product: Fedora Reporter: Me <linuxguy123>
Component: nvidia-settingsAssignee: Nicolas Chauvet <kwizart>
Status: RESOLVED WONTFIX    
Severity: minor CC: adamw, kwizart, leigh123linux
Priority: P5    
Version: unspecified   
Hardware: All   
OS: GNU/Linux   
namespace:

Description Me 2008-11-29 19:10:29 CET
nvidia-settings fails to save the resulting configuration file unless the user is root.

Unless you are logged in as root or you run nvidia-settings from the command line as root, nvidia-settings starts with normal user privileges.   Nothing wrong with that.

However, if you make some display changes and then select "Save to X Configuration File", the save will fail because /ect/X11/xorg.conf is owned by root.

I think nvidia-settings should be changed by one of the following ways:

a) it should start as root as other apps do, ie system-config-network and similar

b) If one presses "Save to X Configuration File", it should check if the user is root and if not, it should request the root password in order to save the file. 

There is a work around in F10 KDE if nvidia doesn't want to change its application.

Go to the Kickoff Menu icon in the panel.  Right click "Menu Editor".  The KDE Menu Editor should appear.  Browse to nVidia Display Settings.  Click Advanced.  Select Run as different user and put root in the Username field. 

Thanks for listening.
Comment 1 Stewart Adam 2008-11-29 22:52:58 CET
The upstream nVidia packages overwrites a few files that belong to Xorg, so to work around this we've moved those files to a separate Xorg extension directory and use livna-config-display automatically configure your xorg.conf accordingly. Using nvidia-settings breaks this, so I won't make these changes.
Comment 2 Thorsten Leemhuis 2008-11-30 12:05:59 CET
(In reply to comment #1)
> The upstream nVidia packages overwrites a few files that belong to Xorg, so to
> work around this we've moved those files to a separate Xorg extension directory
> and use livna-config-display automatically configure your xorg.conf
> accordingly. Using nvidia-settings breaks this, so I won't make these changes.

Then it should not be shipped at all. 

But seems you for some reason chose to ship it. I suppose to give users a way to make modifications with a nice GUI. If that's the case then we should make it work -- wrap it maybe, and add the extensions path to xorg.conf again when it's ending.

Even better: run a small script that adds the extensions dirs if they are missing before the X server is started. A profile.d script could do the trick if there isn't something better.

Reopeing, as the current state is unacceptable. This should "just work", and that's not the case
Comment 3 Stewart Adam 2008-11-30 17:01:22 CET
I don't like not shipping it since the utilities allow users to configure some things that don't require a xorg.conf rewrite (like dual-head display) but I could add a --modulepaths switch to rpm rpmfusion-config-display and then wrap nvidia-xconfig and nvidia-settings in it (as well as adding the PAM stuff so that the wrapper and therefore rpmfusion-config-display gets called as root).
Comment 4 Stewart Adam 2009-01-24 18:15:28 CET
*** Bug 339 has been marked as a duplicate of this bug. ***
Comment 5 Adam Williamson 2009-01-24 19:28:33 CET
204 is not a dupe. I should have been clearer - I'd seen this bug too. 204 was written with the assumption that nvidia-settings is running as root. *even when* run as root, it cannot save its changes to the existing xorg.conf , because it does not consider livna-config-display generated xorg.conf files to be valid as they contain no Screen section.
Comment 6 Nicolas Chauvet 2009-11-25 22:03:32 CET
Re-assigned to nvidia-settings.

This can be implemented from the opensource version eventually.
(who cares ?)
Comment 7 Nicolas Chauvet 2011-01-25 22:57:29 CET
I might not take this into account anytime soon, but who knowns...
Comment 8 leigh scott 2015-09-18 15:38:23 CEST
We don't want nvidia-settings to be able to write some rubbish to xorg.conf as it breaks the module paths.