![如何](https://linux22.com/image/1106731/%E5%A6%82%E4%BD%95.png)
如何在 Xubuntu 11.10 中替换丑陋的屏幕保护程序解锁屏幕?
标准的 xscreensaver 非常丑陋。
有没有用于解锁屏幕的主题?
答案1
最接近主题的方式是更改颜色/字体和日期时间格式。其他操作可能需要重新编译 xscreensaver 并更改源代码。
例如 -
可以改为 -
如何
使用 leafpad ( ) 创建/修改位于主文件夹中的leafpad ~/.Xresources
文件。.Xresources
复制并粘贴以下内容至上面第一张图片:
xscreensaver.splash: false
!font settings
xscreensaver.Dialog.headingFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.bodyFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.labelFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.unameFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.buttonFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.passwd.passwdFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
!general dialog box (affects main hostname, username, password text)
xscreensaver.Dialog.foreground: #ffffff
xscreensaver.Dialog.background: #111111
xscreensaver.Dialog.topShadowColor: #111111
xscreensaver.Dialog.bottomShadowColor: #111111
xscreensaver.Dialog.Button.foreground: #666666
xscreensaver.Dialog.Button.background: #ffffff
!username/password input box and date text colour
xscreensaver.Dialog.text.foreground: #666666
xscreensaver.Dialog.text.background: #ffffff
xscreensaver.Dialog.internalBorderWidth:24
xscreensaver.Dialog.borderWidth: 20
xscreensaver.Dialog.shadowThickness: 2
!timeout bar (background is actually determined by Dialog.text.background)
xscreensaver.passwd.thermometer.foreground: #ff0000
xscreensaver.passwd.thermometer.background: #000000
xscreensaver.passwd.thermometer.width: 8
!datestamp format--see the strftime(3) manual page for details
xscreensaver.dateFormat: %I:%M%P %a %b %d, %Y
复制并粘贴以下内容至第二张图片:
xscreensaver.splash: false
!font settings
xscreensaver.Dialog.headingFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.bodyFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.labelFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.unameFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.buttonFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-dina-medium-r-*-*-12-*-*-*-*-*-*-*
xscreensaver.passwd.passwdFont: -*-dina-bold-r-*-*-12-*-*-*-*-*-*-*
!general dialog box (affects main hostname, username, password text)
xscreensaver.Dialog.foreground: #111111
xscreensaver.Dialog.background: #ffffff
xscreensaver.Dialog.topShadowColor: #111111
xscreensaver.Dialog.bottomShadowColor: #111111
xscreensaver.Dialog.Button.foreground: #ffffff
xscreensaver.Dialog.Button.background: #666666
!username/password input box and date text colour
xscreensaver.Dialog.text.foreground: #ffffff
xscreensaver.Dialog.text.background: #666666
xscreensaver.Dialog.internalBorderWidth:24
xscreensaver.Dialog.borderWidth: 20
xscreensaver.Dialog.shadowThickness: 2
!timeout bar (background is actually determined by Dialog.text.background)
xscreensaver.passwd.thermometer.foreground: #ff0000
xscreensaver.passwd.thermometer.background: #000000
xscreensaver.passwd.thermometer.width: 8
!datestamp format--see the strftime(3) manual page for details
xscreensaver.dateFormat: %I:%M%P %b %d
执行以下步骤来启用您的更改:
xrdb -merge ~/.Xresources
killall xscreensaver
xscreensaver -no-splash &
答案2
如果您熟悉 svg 图像程序(如 Inkscape),您也可以根据自己的意愿修改徽标。徽标位于 usr/share/pixmaps 中,名为 xscreensaver.svg 和 xscreensaver.xpm。
不过,有一条关于更改徽标的注释。请参阅此主题获取更多信息
还,关于 xpm 文件有各种重要的限制。我忽略了这些,导致我的系统彻底崩溃。我以后会尝试一下,但到目前为止,我会坚持使用燃烧的计算机徽标。请参阅此处了解限制,这是我后来才发现的:http://www.improbability.net/xss/
以下是正确对图像进行硬编码必须遵循的过程:http://www.inductiveload.com/posts/change-the-xscreensaver-icon/或者http://web.archive.org/web/20130309211615/http://www.inductiveload.com/posts/change-the-xscreensaver-icon
顺便说一句,我建议将字体更改为其他字体,因为不是每个人都有“dina”字体。然后它将恢复为原始的故障安全字体。例如,将“dina”替换为“arial”有效,但 Ubuntu 字体似乎不起作用。
答案3
按照 fossfreedom 的示例,我在新创建的 ~/.Xresources 文件中选择了以下设置,我发现结果非常吸引人(带有柔和蓝色的深色背景主题):
xscreensaver.splash: false
!font settings
xscreensaver.Dialog.headingFont: -*-georgia-bold-r-*-*-18-*-*-*-*-*-*-*
xscreensaver.Dialog.bodyFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
xscreensaver.Dialog.labelFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
xscreensaver.Dialog.unameFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
xscreensaver.Dialog.buttonFont: -*-georgia-bold-r-*-*-18-*-*-*-*-*-*-*
xscreensaver.Dialog.dateFont: -*-georgia-medium-r-*-*-18-*-*-*-*-*-*-*
xscreensaver.passwd.passwdFont: -*-georgia-bold-r-*-*-18-*-*-*-*-*-*-*
!general dialog box (affects main hostname, username, password text)
xscreensaver.Dialog.foreground: #00efef
xscreensaver.Dialog.background: #111111
xscreensaver.Dialog.topShadowColor: #111111
xscreensaver.Dialog.bottomShadowColor: #111111
xscreensaver.Dialog.Button.foreground: #111111
xscreensaver.Dialog.Button.background: #2040e0
!username/password input box and date text colour
xscreensaver.Dialog.text.foreground: #2040e0
xscreensaver.Dialog.text.background: #efefef
xscreensaver.Dialog.internalBorderWidth:36
xscreensaver.Dialog.borderWidth: 0
xscreensaver.Dialog.shadowThickness: 2
!timeout bar (background is actually determined by Dialog.text.background)
xscreensaver.passwd.thermometer.foreground: #2040e0
xscreensaver.passwd.thermometer.background: #2040e0
xscreensaver.passwd.thermometer.width: 0
!datestamp format--see the strftime(3) manual page for details
xscreensaver.dateFormat: %I:%M%p - %a %b %d, %Y
还加载了以下更改:
xrdb -merge ~/.Xresources; killall xscreensaver; xscreensaver -no-splash &
答案4
看来他们出于安全原因使用原始 Xlib。