ubuntu更改桌面背景_如何防止Windows用户更改桌面背景

ubuntu更改桌面背景

ubuntu更改桌面背景

pwc_top

If you want to prevent users of a PC from changing the desktop wallpaper, it’s not too hard to do. Here’s how to make it happen.

如果要防止PC用户更改桌面墙纸,这并不是很难。 这是实现它的方法。

Whether you have PCs in a home or small business setting, there are times you might not want users of the PC to change the desktop background. Maybe you want a specific background in place, or maybe you just want to make sure nothing inappropriate gets added. Whatever your reason, Windows does provide ways of preventing changes to the desktop background. If you have a Home edition of Windows, you’ll need to make some edits to the Registry. If you have a Pro or Enterprise edition, you can make edits in the Registry or use the Local Group Policy Editor. By the way, if you’re interested, you might also want to prevent users from changing the screen saver for the same reasons.

无论您是在家中还是在小型企业中使用PC,有时您可能都不希望PC用户更改桌面背景。 也许您想要一个特定的背景,或者只是想确保没有添加任何不适当的内容。 无论出于何种原因,Windows确实提供了防止更改桌面背景的方法。 如果您拥有Windows的家庭版,则需要对注册表进行一些编辑。 如果您具有Pro或Enterprise版本,则可以在注册表中进行编辑或使用“本地组策略编辑器”。 顺便说一句,如果您有兴趣,出于相同的原因,您可能还希望阻止用户更改屏幕保护程序

The process for preventing changes to the desktop background requires two steps. First, you’ll disable the main Settings interface for changing the desktop background. This prevents users from using that interface to make the change. Then, you’ll also have to prevent them from changing the background by right-clicking an image and using the “Set as desktop background” command by forcing Windows to use a particular image as the background. We’ll show you how to take both these steps in the Registry and in Local Group Policy Editor.

防止更改桌面背景的过程需要两个步骤。 首先,您将禁用用于更改桌面背景的主“设置”界面。 这样可以防止用户使用该界面进行更改。 然后,还必须通过右键单击图像并通过强制Windows将特定图像用作背景来使用“设置为桌面背景”命令来防止它们更改背景。 我们将向您展示如何在注册表和本地组策略编辑器中执行这两个步骤。

Microsoft帐户用户:禁用主题设置同步 (Microsoft Account Users: Disable Syncing of Theme Settings)

If you’re using Windows 8 or 10 and the user in question is tied to a Microsoft Account, you’ll need to take the additional step of disabling the syncing of theme settings before going on with the rest of this process. If you’re using local user accounts instead on your PC, you don’t have to worry about this step.

如果您使用的是Windows 8或10,并且相关用户已绑定到Microsoft帐户,则您需要采取其他步骤来禁用主题设置同步,然后再继续该过程的其余部分。 如果您在PC上使用本地用户帐户,则不必担心此步骤。

Sign in as the user for whom you plan to make the changes. Press Windows+I to open the Settings window and click “Accounts.”

以您计划对其进行更改的用户身份登录。 按Windows + I打开“设置”窗口,然后单击“帐户”。

pwc_20

In the Accounts window, on the left-hand side, click the “Sync your settings” tab and, on the right hand-side, turn off the “Theme” option.

在“帐户”窗口的左侧,单击“同步您的设置”选项卡,然后在右侧关闭“主题”选项。

pwc_21

You’ll need to do this for each user account you plan to disable desktop background changes for—as long as that user account is tied to a Microsoft account—no matter whether you use the Registry, one-click hack, or Local Group Policy methods we cover in this article.

只要您打算禁用桌面背景更改,就需要为每个用户帐户执行此操作(只要该用户帐户与Microsoft帐户相关联),无论您使用注册表,一键破解还是本地组策略本文中介绍的方法。

家庭用户:通过手动编辑注册表来防止更改桌面背景 (Home Users: Prevent Changes to the Desktop Background by Editing the Registry Manually)

If you have the Windows 7, 8, or 10 Home edition, you will have to edit the Windows Registry to make these changes. You can also do it this way if you have Windows Pro or Enterprise, but just feel more comfortable working in the Registry. (If you have Pro or Enterprise, though, we recommend using the easier Local Group Policy Editor, as described in the next section.)

如果您具有Windows 7、8或10家庭版,则必须编辑Windows注册表才能进行这些更改。 如果您拥有Windows Pro或Enterprise,也可以通过这种方式进行操作,但是在注册表中工作会更自在。 (但是,如果您具有Pro或Enterprise,我们建议使用更简单的“本地组策略编辑器”,如下一节所述。)

Standard warning: Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.

标准警告 :注册表编辑器是一个功能强大的工具,滥用它会使您的系统不稳定甚至无法运行。 这是一个非常简单的技巧,只要您按照说明进行操作,就不会有任何问题。 也就是说,如果您以前从未使用过它,请在开始之前考虑阅读有关如何使用注册表编辑器的信息 。 并在进行更改之前一定要备份注册表 (和您的计算机 !)。

We’ve got instructions here for preventing screen saver changes by individual users on a PC or for all users of the PC. If you want to disable screen saver changes for an individual user, you’ll need to log on as the user you want to make changes for, and then edit the Registry while logged in to their account. If you have multiple individual users for whom you want to changes for, you’ll have to repeat the process for each user. If you want to make the changes for all user of the PC at once, including your own account, you can just stay signed on with your account.

我们在此处提供了说明,以防止PC上的单个用户或PC上的所有用户更改屏幕保护程序。 如果要禁用单个用户的屏幕保护程序的变化,你需要登录为你想更改的用户,然后修改注册表,同时在自己的帐户登录。 如果您有多个要更改的用户,则必须为每个用户重复该过程。 如果要一次为PC的所有用户(包括您自己的帐户)进行更改,则只需保持登录状态即可。

After logging on with the appropriate account, open the Registry Editor by hitting Start and typing “regedit.” Press Enter to open Registry Editor and give it permission to make changes to your PC.

使用适当的帐户登录后,通过单击开始并键入“ regedit”来打开注册表编辑器。 按Enter键打开注册表编辑器,并授予其对PC进行更改的权限。

own_1

First, you’ll disable the desktop background settings in the Setting interface. In the Registry Editor, use the left sidebar to navigate to the following key if you want to disable screen saver settings for the currently logged in user:

首先,您将在“设置”界面中禁用桌面背景设置。 如果要禁用当前登录用户的屏幕保护程序设置,请在注册表编辑器中使用左侧边栏导航至以下键:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies
pwc_2

If you’d like to disable screen saver settings for all users of the PC at once, navigate to this key instead:

如果您想一次为PC的所有用户禁用屏幕保护程序设置,请导航至该键:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies

Note that everything about those two locations is the same, except for the hive. Items in HKEY_CURRENT_USER apply only to the currently logged in user, while items in HKEY_LOCAL_MACHINE apply to all users. No matter which you choose, the rest of the steps are the same.

请注意,除了配置单元之外,这两个位置的所有内容都相同。 HKEY_CURRENT_USER项目仅适用于当前登录的用户,而HKEY_LOCAL_MACHINE项目适用于所有用户。 无论您选择哪个,其余步骤都是相同的。

If you don’t see a key named “ActiveDesktop” under the Policies key, you’ll need to create one. Right-click the Policies key and choose New > Key. Name the new key “ActiveDesktop.” If an ActiveDesktop key is already present, skip this step.

如果在“ Policies键下没有看到名为“ ActiveDesktop”的键,则需要创建一个。 右键单击“ Policies密钥,然后选择“新建”>“密钥”。 将新密钥命名为“ ActiveDesktop”。 如果已经有ActiveDesktop密钥,请跳过此步骤。

pwc_3

Next, you’ll create a new value inside the ActiveDesktop key. Right-click the ActiveDesktop key and choose New > DWORD (32-bit) Value. Name the new value “NoChangingWallPaper” and then double-click the new value to open its properties window.

接下来,您将在ActiveDesktop键中创建一个新值。 右键单击ActiveDesktop项,然后选择“新建”>“ DWORD(32位)值”。 将新值命名为“ NoChangingWallPaper”,然后双击新值以打开其属性窗口。

pwc_4

In the properties window for the NoChangingWallPaper value, change the value from 0 to 1 in the “Value data” box and then click “OK.”

NoChangingWallPaper值的属性窗口中,在“数值数据”框中将值从0更改为1,然后单击“确定”。

pwc_5

This particular change will take place immediately, so if you try open up Settings > Personalization > Background, you’ll see that the whole page is grayed out and that the text “Some settings are managed by your organization” have been added to the top.

此特定更改将立即进行,因此,如果您尝试打开“设置”>“个性化”>“背景”,则会看到整个页面显示为灰色,并且在顶部添加了“某些设置由您的组织管理”文本。

pwc_6

Next, you’ll need to force a particular wallpaper image so that other methods of changing the background—like right-clicking an image file—also don’t work. Back in the Registry editor, return to the same key you were working in before. As a reminder, for making changes for just the current users, that’s:

接下来,您将需要强制使用特定的墙纸图像,以便其他更改背景的方法(例如,右键单击图像文件)也将不起作用。 返回注册表编辑器,返回到之前使用的相同键。 提醒一下,仅针对当前用户进行更改,即:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\

To force the change for all users of the PC at once, that’s this key:

要一次对所有PC用户强制进行更改,这是关键:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\

If you don’t see a key named “System” under the Policies key, you’ll need to create one. Right-click the Policies key and choose New > Key. Name the new key “System.” If a System key is already present, skip this step.

如果在“ Policies键下没有看到名为“系统”的键,则需要创建一个。 右键单击“ Policies密钥,然后选择“新建”>“密钥”。 将新密钥命名为“ System”。 如果System密钥已经存在,请跳过此步骤。

pwc_7

Next, you’ll create a new value inside the System key. Right-click the System key and choose New > String Value. Name the new value “Wallpaper.”

接下来,您将在System键中创建一个新值。 右键单击“系统”键,然后选择“新建”>“字符串值”。 将新值命名为“墙纸”。

pwc_8

Double-click the new Wallpaper value to open its properties window.

双击新的Wallpaper值以打开其属性窗口。

pwc_9

In the properties window for the Wallpaper value, change the value to the location of the image file you want to use as the desktop background and then click “OK.” Note that you can only use JPG or BMP images. You can’t use any other image formats and you can’t choose a solid color background. As a workaround, you could create your own JPG or BMP image that is a solid color and use that.

在“ Wallpaper值的属性窗口中,将该值更改为要用作桌面背景的图像文件的位置,然后单击“确定”。 请注意,您只能使用JPG或BMP图像。 您不能使用任何其他图像格式,也不能选择纯色背景。 解决方法是,您可以创建自己的纯色JPG或BMP图像并使用它。

pwc_10

Next, you’ll set the the wallpaper style by creating another value. Wallpaper style dictates whether the wallpaper is centered, tiled, and so on. To do this, right-click the System key and choose New > String Value. Name the new value “WallpaperStyle.”

接下来,您将通过创建另一个值来设置墙纸样式。 墙纸样式指示墙纸是否居中,平铺等。 为此,请右键单击“系统”键,然后选择“新建”>“字符串值”。 将新值命名为“ WallpaperStyle”。

pwc_11

Double-click the WallpaperStyle value to open it’s properties window. In the “Value data” box, type any of the following numbers to indicate how you want the image handled and then click “OK.” Just type the actual number, not the description in parentheses:

双击WallpaperStyle值以打开其属性窗口。 在“数值数据”框中,键入以下任何数字以指示您要如何处理图像,然后单击“确定”。 只需键入实际数字,而不是括号中的描述:

  • 0 (Centered)

    0 (居中)

  • 1 (Tiled)

    1 (平铺)

  • 2 (Stretched)

    2 (拉伸)

  • 3 (Fit)

    3 (合身)

  • 4 (Fill)

    4 (补)

  • 5 (Span)

    5 (跨度)

pwc_12

At this point, the desktop background should be fully protected from changes, so you can close Registry Editor. You’ll need to restart your PC (or sign out and back in) to have the changes take place. After that, if you were to try right-clicking a different image file and choosing “Set as desktop background” the desktop background should not change. You won’t get an error message. Instead, nothing at all should happen.

此时,应该完全保护桌面背景不受更改,因此您可以关闭注册表编辑器。 您需要重新启动PC(或注销并重新登录)以进行更改。 之后,如果要尝试右键单击其他图像文件并选择“设置为桌面背景”,则桌面背景应保持不变。 您不会收到错误消息。 相反,什么也不会发生。

If you’re disabling background changes for multiple users, you can now sign in as the next user and repeat the process. If you ever want to reverse the changes, just sign back in as the user for whom you want to make changes, go back to the appropriate System key in Registry Editor, and delete both the values you created: NoDispBackgroundPage and Wallpaper .

如果您要为多个用户禁用后台更改,则现在可以以下一个用户身份登录并重复该过程。 如果您要撤消更改,只需以要更改的用户身份登录,返回注册表编辑器中的相应System键,然后删除创建的两个值: NoDispBackgroundPageWallpaper

下载我们的一键式注册表黑客 (Download Our One-Click Registry Hacks)

pwc_13

If you don’t feel like diving into the Registry yourself, we’ve created some registry hacks you can use. All the hacks are included in the following ZIP file.

如果您不想自己进入注册表,我们已经创建了一些可以使用的注册表黑客。 以下所有ZIP文件均包含所有hack。

Desktop Background Hacks

桌面背景黑客

After extracting the ZIP file, you’ll see two folders inside:

解压缩ZIP文件后,您将在其中看到两个文件夹:

  • The “Desktop Background Hacks for All Users” folder contains hacks that you would use to make these changes for all users on the PC.

    “面向所有用户的桌面背景黑客”文件夹包含用于对PC上所有用户进行这些更改的黑客。
  • The “Desktop Background Hacks for Current User” folder contains hacks that you would use to make these changes for only the user that is currently signed in.

    “当前用户的桌面背景黑客”文件夹包含一些黑客,您可以使用它们仅对当前登录的用户进行这些更改。

Inside each of these folders, you’ll find three hacks: one for disabling desktop background settings, one for forcing the wallpaper to a specific JPG or BMP image file, and one for reversing all changes and allowing changes to the desktop background again.

在每个文件夹中,您会发现三种黑客:一种用于禁用桌面背景设置,一种用于将墙纸强制为特定的JPG或BMP图像文件,另一种用于撤消所有更改并允许再次更改桌面背景。

Before you can run the hacks, you will need to edit the hack for forcing the wallpaper to a specific image. Find either the “Force Wallpaper Image for All Users” or “Force Wallpaper Image for Current User” hack, depending on which way you’re doing things. Right-click the hack and choose “Edit” from the context menu to open the hack in Notepad.

在运行黑客程序之前,您将需要编辑黑客程序以将墙纸强制为特定图像。 根据您执行操作的方式,找到“为所有用户提供强制墙纸图像”或“为当前用户提供强制墙纸图像”黑客。 右键单击hack,然后从上下文菜单中选择“编辑”以在记事本中打开hack。

pwc_14

In the Notepad window, find the text that reads “PATH_TO_JPG_OR_BMP_FILE” and replace it with the full path to the JPG or BMP file you want to use for your desktop background, making sure the quotes stay in place. Change the value of WallpaperStyle to one of the numbers listed at the bottom of the text file, again leaving the quotes in place. You can then save the changes and exit Notepad.

在“记事本”窗口中,找到显示为“ PATH_TO_JPG_OR_BMP_FILE”的文本,并将其替换为您要用于桌面背景的JPG或BMP文件的完整路径,确保引号保持不变。 将WallpaperStyle的值更改为文本文件底部列出的数字之一,再次保留引号。 然后,您可以保存更改并退出记事本。

pwc_15

Now, you can run the hacks by double-clicking the one you want to use and clicking through the prompts. Just remember that if you’re using the hacks for the current user only, you’ll need to sign in with the user account you want to make the changes for first.

现在,您可以通过双击要使用的hack并单击提示来运行这些hack。 只要记住,如果你只使用了破解当前用户,你需要与你想第一个更改的用户帐户登录。

These hacks are really just the System and ActiveDesktop keys, stripped down to the NoChangingWallPaper and Wallpaper values we talked about in the previous section and then exported to a .REG file. The hacks for the current user only affect the System key found in the HKEY_CURRENT_USER hive, while the hacks that affect all users make changes to the System key in the HKEY_LOCAL_MACHINE hive. Running the hacks just modifies the value. And if you enjoy fiddling with the Registry, it’s worth taking the time to learn how to make your own Registry hacks.

这些黑客实际上只是SystemActiveDesktop密钥,它们被NoChangingWallPaper为上一节中讨论的NoChangingWallPaperWallpaper值,然后导出到.REG文件。 当前用户的hack仅影响在HKEY_CURRENT_USER配置单元中找到的System密钥,而影响所有用户的hack会更改HKEY_LOCAL_MACHINE配置单元中的System密钥。 运行hack只是修改了价值。 而且,如果您喜欢使用注册表,则值得花时间学习如何制作自己的注册表黑客

专业版和企业版用户:使用本地组策略编辑器防止更改桌面背景 (Pro and Enterprise Users: Prevent Changes to the Desktop Background with Local Group Policy Editor)

If you’re using Windows Pro or Enterprise, the easiest way to lock out this change is by using the Local Group Policy Editor. It also gives you a bit more power over which users have this restriction. If you’re turning off the shortcuts for only some user accounts on a PC, you’ll need to do a little extra setup by first creating a policy object for those users. You can read all about that in our guide to applying local Group Policy tweaks to specific users.

如果您使用的是Windows Pro或Enterprise,则锁定此更改的最简单方法是使用“本地组策略编辑器”。 它还使您可以更灵活地控制哪些用户具有此限制。 如果仅关闭PC上某些用户帐户的快捷方式,则需要先为这些用户创建策略对象,以进行一些额外的设置。 您可以在将本地组策略调整应用于特定用户的指南中阅读所有相关内容。

You should also be aware that group policy is a pretty powerful tool, so it’s worth taking some time to learn what it can do. And if you’re on a company network, do everyone a favor and check with your admin first. If your work computer is part of a domain, it’s also likely that it’s part of a domain group policy that will supersede the local group policy, anyway.

您还应该意识到,组策略是一个非常强大的工具,因此值得花一些时间来学习它可以做什么 。 而且,如果您在公司网络中,请给所有人一个帮助,并首先与您的管理员联系。 如果您的工作计算机是域的一部分,则它也很可能是域组策略的一部分,无论如何,该组策略将取代本地组策略。

Start by finding the MSC file you created for controlling policies for those particular users. Double-click to open it and allow it to make changes to your PC. If you just have one user account on your PC, you can open the regular Local Group Policy Editor instead by clicking Start, typing “gpedit.msc,” and then hitting Enter. That’s what we’re going to do in this example, but if you use an MSC file to apply the changes to certain users, the steps are the same.

首先找到您创建的用于控制那些特定用户的策略的MSC文件。 双击打开它,并允许它对您的PC进行更改。 如果您的PC上只有一个用户帐户,则可以通过单击“开始”,键入“ gpedit.msc”,然后按Enter来打开常规的本地组策略编辑器。 这就是我们在此示例中要执行的操作,但是如果您使用MSC文件将更改应用于某些用户,则步骤是相同的​​。

wks_6

First, you’ll disable the desktop background settings in the Setting interface. In the Group Policy window for those users, on the left-hand side, drill down to User Configuration > Administrative Templates > Control Panel > Personalization. On the right, double-click the “Prevent changing desktop background” setting to open its properties window.

首先,您将在“设置”界面中禁用桌面背景设置。 在这些用户的“组策略”窗口的左侧,深入到“用户配置”>“管理模板”>“控制面板”>“个性化”。 在右侧,双击“防止更改桌面背景”设置以打开其属性窗口。

pwc_16

In the setting’s properties window, click the “Enabled” option and then click “OK.”

在设置的属性窗口中,单击“启用”选项,然后单击“确定”。

pwc_17

Next, you’ll need to force a particular wallpaper image so that other methods of changing the background—like right-clicking an image file—also don’t work. Back in the main Group Policy window, on the left-hand side, navigate to User Configuration > Administrative Templates > Desktop > Desktop. On the right, double-click the “Desktop Wallpaper” setting to open its properties window.

接下来,您将需要强制使用特定的墙纸图像,以便其他更改背景的方法(例如,右键单击图像文件)也将不起作用。 返回组策略主窗口的左侧,导航至“用户配置”>“管理模板”>“桌面”>“桌面”。 在右侧,双击“桌面墙纸”设置以打开其属性窗口。

pwc_18

In the setting’s properties window, click the “Enabled” option. In the “Wallpaper Name” box, enter the full path to the JPG or BMP image you want to use as the desktop background. Set the “Wallpaper style” drop-down menu to how you want the image handled—centered, stretched, tiled, and so on. When you’re done, click “OK.”

在设置的属性窗口中,单击“启用”选项。 在“墙纸名称”框中,输入要用作桌面背景的JPG或BMP图像的完整路径。 将“墙纸样式”下拉菜单设置为所需的图像处理方式(居中,拉伸,平铺等)。 完成后,单击“确定”。

pwc_19

When you’re done changing both settings, you can exit the Local Group Policy Editor. Changes take effect immediately, so no need to restart the PC or anything. To reverse the change later, just go back to the same “Prevent changing desktop background” and “Desktop Wallpaper” settings and change them back to “Not Configured.”

完成两个设置的更改后,您可以退出本地组策略编辑器。 更改将立即生效,因此无需重新启动PC或任何其他操作。 要稍后撤消更改,只需返回相同的“防止更改桌面背景”和“桌面墙纸”设置,然后将它们更改回“未配置”。

翻译自: https://www.howtogeek.com/290830/how-to-prevent-windows-users-from-changing-the-desktop-background/

ubuntu更改桌面背景

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值