cookbook 'desktop', '~> 0.1.1'
desktop (2) Versions 0.1.1 Follow1
LWRP to manage the user's desktop settings
cookbook 'desktop', '~> 0.1.1', :supermarket
knife supermarket install desktop
knife supermarket download desktop
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
:
defaults['background']['image'] = '/usr/share/background/supecoolbackgroung.jpg' defaults['background']['user'] = 'joe'
And this inside the recipe:
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:
- Roberto C. Morano rcmorano@emergya.com
- Juanje Ojeda juanje.ojeda@gmail.com
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.
Collaborator Number Metric
0.1.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: desktop/metadata.rb:1
FC065: Ensure source_url is set in metadata: desktop/metadata.rb:1
FC066: Ensure chef_version is set in metadata: desktop/metadata.rb:1
FC069: Ensure standardized license defined in metadata: desktop/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: desktop/resources/settings.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gconf.rb:13
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gconf.rb:21
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gsettings.rb:16
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gsettings.rb:24
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: desktop/metadata.rb:1
FC065: Ensure source_url is set in metadata: desktop/metadata.rb:1
FC066: Ensure chef_version is set in metadata: desktop/metadata.rb:1
FC069: Ensure standardized license defined in metadata: desktop/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: desktop/resources/settings.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gconf.rb:13
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gconf.rb:21
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gsettings.rb:16
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gsettings.rb:24
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
FC065: Ensure source_url is set in metadata: desktop/metadata.rb:1
FC066: Ensure chef_version is set in metadata: desktop/metadata.rb:1
FC069: Ensure standardized license defined in metadata: desktop/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: desktop/resources/settings.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gconf.rb:13
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gconf.rb:21
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gsettings.rb:16
FC085: Resource using new_resource.updated_by_last_action to converge resource: desktop/providers/gsettings.rb:24
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number