当前位置: 首页>>技术教程>>正文


如何为xscreensaver解锁屏幕设置主题?

, , , ,

问题描述

如何替换Xubuntu 11.10中的丑陋的屏幕保护程序解锁屏幕?

标准的xscreensaver非常难看。

解锁屏幕有什么主题吗?

最佳解决办法

最接近主题的是更改颜色/字体和字体。 date-time格式。可能还需要重新编译xscreensaver并更改源。

例如 –

11.10,themes,xubuntu,xscreensaver,ubuntu

可以更改为-

11.10,themes,xubuntu,xscreensaver,ubuntu

如何

使用叶子板(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 &

source

次佳解决办法

如果您熟悉svg图像程序(例如Inkscape),也可以修改徽标以适合您自己的愿望。该徽标位于usr /share /pixmaps中,分别称为xscreensaver.svg和xscreensaver.xpm。

但是,有关于更改徽标的说明。参见this thread for more info

此外,关于xpm文件也有各种重要限制。我忽略了这些,导致系统完全崩溃。将来我会尝试,但到目前为止,我将坚持使用燃烧的计算机徽标。请参阅此处以了解限制,后来我才发现它们:http://www.improbability.net/xss/

这是您必须正确遵循hard-code图像的过程:http://www.inductiveload.com/posts/change-the-xscreensaver-icon/

顺便说一句,我建议将字体更改为其他字体,因为不是每个人都具有”dina”字体。然后它将恢复为原始的故障安全字体。例如,用”arial”替换”dina”可以,但是Ubuntu字体似乎不起作用。

第三种解决办法

遵循fossfreedom的示例,我在一个新创建的〜/.Xresources文件中选择了以下设置,并且发现结果非常吸引人(带有浅蓝色的dark-background主题):

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 &

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/7270.html,未经允许,请勿转载。