cookbook 'windows_screenresolution', '~> 3.0.0'
The windows_screenresolution cookbook has been deprecated
Author provided reason for deprecation:
The windows_screenresolution cookbook has been deprecated and is no longer being maintained by its authors. Use of the windows_screenresolution cookbook is no longer recommended.
You may find that the chocolatey cookbook is a suitable alternative.
windows_screenresolution (10) Versions 3.0.0 Follow1
Sets headless screen resolution on Windows
cookbook 'windows_screenresolution', '~> 3.0.0', :supermarket
knife supermarket install windows_screenresolution
knife supermarket download windows_screenresolution
Windows Screen Resolution Cookbook
Sets headless screen resolution on Windows.
It does this by:
- creating a new user called
rdp_local
- creating a startup script to RDP into the specified user account at specified resolution (default is 1920x1080)
- adding a firewall rule to open RDP port 3389
- configuring auto-logon to login as
rdp_local
on reboot
Note that auto-logon requires a username and password and that the password is stored unencrypted under
windows registry HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
.
Tested on Amazon Windows Server 2012 R2 AMI.
Requirements
- Chef 11.6+ (registry_key resource)
- Windows Server 2008 R2+ (due to usage of window_home)
Platforms
- Windows
Dependencies
- windows_autologin
- windows_home
Usage
Include default recipe in run list or in another cookbook to set the screen resolution.
The username
and password
must be set in order to user this cookbook.
Set newuser's screen resolution to 1920x1080
(default)
windows_screenresolution 'newuser do
password my_secret
action :run
end
Set newuser's screen resolution to 1366x768
windows_screenresolution 'newuser do
password my_secret
width 1366
height 768
action :run
end
Attributes
-
username
- Username of account to remote login as (required). -
password
- Password of account to remote login as (required). -
width
- Display width in pixels. Default:1920
. -
height
- Display height in pixels. Default:1080
. -
target
- Identifies the computer or domain name that username and password account will be associated with for remote login. Default:localhost
. -
rdp_autologin
- Logon as RDP user automatically on reboot. Default:true
. Note that the password is stored unencrypted under windows registryHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
. -
rdp_username
- RDP username. Default:rdp_local
. -
rdp_password
- RDP password. Defaults to password of account to remote login as, ifnil
. -
confidential
- Ensure that sensitive resource data is not logged by the chef-client. Default:true
.
ChefSpec Matchers
This cookbook includes custom ChefSpec matchers you can use to test
your own cookbooks.
Example Matcher Usage
expect(chef_run).to run_windows_screenresolution('username').with( password: 'password' )
Cookbook Matchers
- run_windows_screenresolution(resource_name)
Getting Help
- Ask specific questions on Stack Overflow.
- Report bugs and discuss potential features in Github issues.
Contributing
Please refer to CONTRIBUTING.
License
MIT - see the accompanying LICENSE
file for details.
Changelog
3.0.0 2017-03-17
- Rename sensitive attribute to confidential to be Chef 13 compatible
2.0.0 2017-02-03
- Remove default recipe
1.1.0 2017-01-02
- Add run resource
1.0.4 2016-12-21
- Fix #6 WARN: node.set is deprecated and will be removed in Chef 14
- Fix #5 NoMethodError when password is nil on non-windows platform
1.0.3 2015-11-10
- Fix #3 Cannot handle percent character in password
1.0.2 2015-07-28
- Fix #2 Multiple rdp_local directories are created under C:\Users
1.0.1 2015-07-27
- Fix #1 Cannot create directory due to insufficient permissions
1.0.0 2015-07-28
- Initial release
Collaborator Number Metric
3.0.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
3.0.0 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
3.0.0 failed this metric
FC066: Ensure chef_version is set in metadata: windows_screenresolution/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
3.0.0 passed this metric
Testing File Metric
3.0.0 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
3.0.0 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
3.0.0 failed this metric
3.0.0 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
3.0.0 failed this metric
FC066: Ensure chef_version is set in metadata: windows_screenresolution/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
3.0.0 passed this metric
Testing File Metric
3.0.0 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
3.0.0 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
3.0.0 failed this metric
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
3.0.0 passed this metric
Testing File Metric
3.0.0 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
3.0.0 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
3.0.0 failed this metric
3.0.0 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