0

With recent versions of Ubuntu, there's no /etc/X11/xorg.conf file being shipped anymore. That's good as long as you don't have a Nvidia graphics cards and you want to use multiple screens, in which case you have to allow normal users to write to /etc/X11/xorg.conf.

Now, given that Ubuntu doesn't ship a default /etc/X11/xorg.conf file, I can't chmod 666 it (no file to change permissions on).

If I try to ship a default xorg.conf file with puppet (and set the permissions accordingly so that normal user can overwrite that file), puppet will keep overwriting this file in case it changes from the shipped default.

So what are my options here?

  1. Is there a way to ship a default file with puppet but tell puppet to not overwrite customized versions of that file?
  2. Is there a way to tell the xorg-x11 package to create a default xorg.conf file?
  3. Polkit?

any other options that I'm not aware of?

memyself
  • 335
  • 6
  • 13
  • Why are you trying to overwrite this file _at all_? – Michael Hampton Feb 26 '13 at 08:10
  • @MichaelHampton by default there's no file, which works fine with one monitor setups. But once you have multiple monitors, you need to write the config into the `xorg.conf` file. Users can't write into that file if it doesn't exist. – memyself Feb 26 '13 at 12:20

2 Answers2

2

I found a solution that works with puppet: in the file section, you need to include replace => "no". By default puppet will ship the right xorg.conf file, but once a user modifies it, the modification won't be overwritten.

    file { "$name":
            replace => "no",
            mode => 666,
            owner => root,
            group => root,
            ensure => present,
    }
memyself
  • 335
  • 6
  • 13
0

NVidia provide a tool for users to configure their screen (resolution, dual-screen, etc.). You just need to deploy this application and give the user proper rights to execute it.

So you should configure /etc/sudoers so that your users can do:

sudo nvidia-xconfig
Huygens
  • 1,708
  • 3
  • 20
  • 36
  • I'm aware of that option, but the average users configures the computer with the `nvidia-settings` program. The `nvidia-xconfig` program just provides a skeleton, but once the user wants to configure multiple screens, you use `nvidia-settings`. – memyself Feb 26 '13 at 12:18
  • Would not that be sufficient for option? – Huygens Feb 26 '13 at 14:11