Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

desktop (2) Versions 0.1.0

LWRP to manage the user's desktop settings

Berkshelf/Librarian
Policyfile
Knife
cookbook 'desktop', '= 0.1.0'
cookbook 'desktop', '= 0.1.0', :supermarket
knife cookbook site install desktop
knife cookbook site download desktop
README
Dependencies
Quality

Description

LWRP to manage desktop's settings for an user.

There are a lot of user's settings that are managed by a desktop setting system as gconf, gsetting and so. This LWRP let you manage the keys and values for those settings.

Right now it's just supported gconf and gsettings, but I hope that more desktop settings systems be supported in the future. For example, the one used by KDE.

This LWRP born as a need for a project called GECOS which is being developed by the Junta de AndalucĂ­a, a local government from the lovely region of Spain: Andalusia.

Requirements

In order to use this LWRP from your cookbook or recipe you need to add this cookbook as a dependency at the metadata.rb file.

After doing that you can do things like:

node['my_cookbook']['users'].each do |username|
  desktop_settings "picture-uri" do
    schema   "org.gnome.desktop.background"
    type     "string"
    value    "/usr/share/background/supecoolbackgroung.jpg"
    user     username
  end
end

Usage

To see how this works and how could be used from another cookbook, let's see some examples.

The LWRP provider by default is gsettings as this is the new kid on the block and the current default system for GNOME and GNOME apps. If you like to set a specific background to an user you could do something like:

Let's say we have a recipe named background with this at the attributes.rb: ruby defaults['background']['image'] = '/usr/share/background/supecoolbackgroung.jpg' defaults['background']['user'] = 'joe'

And this inside the recipe: ruby desktop_settings "picture-uri" do schema "org.gnome.desktop.background" type "string" value node['background']['image'] user node['background']['user'] end

But we can use also the gconf provider to set the background is this is the setting system that use our desktop:

desktop_settings '/desktop/gnome/background/picture_filename' do
  type     'string'
  value    node['background']['image']
  user     node['background']['user']
  provider 'desktop_gconf'
end

License and Author

Authors:

Copyright 2011-2012 Junta de AndalucĂ­a
Copyright 2012 Juanje Ojeda juanje.ojeda@gmail.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found