Monday, February 4, 2013

How to Change XScreensaver Lock Screen Appearance

Recently, I wrote a post on how to enable lock screen on Xubuntu by using XScreensaver functionality. As you can feel, the default XScreensaver appearance is so ugly and not very impressive. Although that's not a big deal for performance and functionality, changing the appearance of your daily tool for work (computer) might can charge your spirit. So, today I'd like to write a simple post on how to change the appearance of XScreensaver lock screen from something like this:


Into this:


The result of modification is not very impressive, but at least you can have a different lock screen theme than the others.

OK, all you need to is to ".Xresources" file which is located in your home directory or create one if you don't have it in your home folder. Open the file and add the following code:
  • 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

If you have any difficulties reading the code above, please click here to see it on pastebin. Save the changes and the content of ".Xresources" file should look like this:


Well, simply restart the computer and lock the screen after restarting to see the changes. Otherwise, you can run the following command instead of restarting the computer:
  • xrdb -merge ~/.Xresources; killall xscreensaver; xscreensaver -no-splash &

Now, lock the screen and you should have a new look of lock screen theme. Enjoy :)

0 comments:

Post a Comment