Skip to content

Commit

Permalink
Update commands.json
Browse files Browse the repository at this point in the history
  • Loading branch information
gweinjc committed Jan 29, 2024
1 parent b5f9e87 commit aa74ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PowerShell/JumpCloud Commands Gallery/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
"type": "mac",
"command": "## *** Customize ***\n # 1. Update the 'backgroundURL' to the URL of your desired desktop image. A JumpCloud image is used by default.\n backgroundURL=\"https://raw.githubusercontent.com/TheJumpCloud/support/master/PowerShell/JumpCloud%20Commands%20Gallery/Files/JumpCloud_Background.png\"\n # 2. Ensure the 'fileType' matches the file type of the desktop image (change to jpg if using a jpg). 'png' is set by default.\n fileType=\"png\"\n # ------------Do not modify below this line-------------\n date_val=$(date \"+%Y-%m-%d-%H%M\")\n backgroundFile=/Users/Shared/desktopimage_$date_val.$fileType\n curl -s -o \"$backgroundFile\" \"$backgroundURL\"\nread -r -d '' PSCRIPT<<EOF\nfrom AppKit import NSWorkspace, NSScreen\nfrom Foundation import NSURL\n# generate a fileURL for the desktop picture\nfile_url = NSURL.fileURLWithPath_('$backgroundFile')\n# make image options dictionary\n# we just make an empty one because the defaults are fine\noptions = {}\n# get shared workspace\nws = NSWorkspace.sharedWorkspace()\n# iterate over all screens\nfor screen in NSScreen.screens():\n # tell the workspace to set the desktop picture\n (result, error) = ws.setDesktopImageURL_forScreen_options_error_(\n file_url, screen, options, None)\nEOF\n env python -c \"$PSCRIPT\"",
"link": "https://github.com/TheJumpCloud/support/blob/master/PowerShell/JumpCloud%20Commands%20Gallery/Mac%20Commands/Mac%20-%20Set%20Desktop%20Background.md",
"description": "The \"JumpCloud_Background.png\" file is downloaded to the local machine and saved in the folder \"/Users/Shared\"/\n\nTo modify this command to download and set a background image of your choice follow the steps under '*** Customize ***' by updating the backgroundURL and corresponding fileType variables.\n\nThis command used in tandem with the wallpaper modification Mac policy can be used to set and then prevent end users from updating their background.\n\nThis command can be built manually as a Mac command where the 'run-as' user is set to the JC managed user on that machine and can not be executed as the root user."
"description": "NOTE: As of MacOS 12.3 or higher, this command does not work. Please use an MDM configuration profile to deploy wallpapers as a workaround.\n\nThe \"JumpCloud_Background.png\" file is downloaded to the local machine and saved in the folder \"/Users/Shared\"/\n\nTo modify this command to download and set a background image of your choice follow the steps under '*** Customize ***' by updating the backgroundURL and corresponding fileType variables.\n\nThis command used in tandem with the wallpaper modification Mac policy can be used to set and then prevent end users from updating their background.\n\nThis command can be built manually as a Mac command where the 'run-as' user is set to the JC managed user on that machine and can not be executed as the root user."
},
{
"name": "Windows - 64-Bit Command | v1.0 JCCG",
Expand Down

0 comments on commit aa74ff6

Please sign in to comment.