source install:  https://www.jwz.org/xscreensaver/

XScreenSaver

 
 

XScreenSaver is a screen saver and locker for the X Window System.

Installation

Install the xscreensaver package.

For an Arch Linux branded experience, install the xscreensaver-arch-logoAUR package.

Configuration

Most options are configured on a user-by-user basis by running xscreensaver-demoxscreensaver-demo writes the chosen configuration to ~/.xscreensaver, discarding any manual modifications to the file. Global options are defined in /usr/share/X11/app-defaults/XScreenSaver.

Since at least XScreenSaver 5.22, there is another way to edit XScreenSaver's user configuration, using Xresources. This includes theming support. See [1] for the version 5.22 defaults.

DPMS and blanking settings

This article or section needs language, wiki syntax or style improvements.

Reason: "overrides DPMS" is vague - xscreensaver does the equivalent of xset s 0 0, uses its own timer for the various animations, but sets the DPMS timeout to the values in Display Power Management (Discuss in Talk:XScreenSaver#)

XScreenSaver manages screen blanking and display energy saving (DPMS) independently of X itself and overrides it. To configure the timings for blanking, standby, display poweroff and such, use xscreensaver-demo or edit the configuration file manually, e.g. ~/.xscreensaver:

  1. timeout: 1:00:00
  2. cycle: 0:05:00
  3. lock: False
  4. lockTimeout: 0:00:00
  5. passwdTimeout: 0:00:30
  6. fade: True
  7. unfade: False
  8. fadeSeconds: 0:00:03
  9. fadeTicks: 20
  10. dpmsEnabled: True
  11. dpmsStandby: 2:00:00
  12. dpmsSuspend: 2:00:00
  13. dpmsOff: 4:00:00

DPMS and screen blanking can be disabled by starting xscreensaver-demo and, for the Mode setting, choosing Disable Screen Saver.

Note: If Lock Screen After in xscreensaver-demo is ticked and set to 0 minutes, the screen will be locked immediately upon blanking. If Power Manager Enabled is unticked, DPMS is disabled; it does not mean that XScreenSaver will relinquish control of DPMS settings.

Usage

Tip: To start XScreenSaver without the splash screen, use the -no-splash switch. See man xscreensaver for a full list of options.

In the XfceLXDE and LXQt environments, XScreenSaver is autostarted automatically if it is available - no further action is required. For other environments, see Autostarting.

To immediately trigger xscreensaver, if it is running, and lock the screen, execute the following command:

  1. $ xscreensaver-command --lock

Lock on suspend

See Power management#xss-lock. You may want to set XScreenSaver's fade out time to 0.

User switching from the lock screen

Warning: When switching users using a display manager such as GDM or LightDM, XScreenSaver will not lock the original session - it can be accessed without a password simply by switching TTY's to the session in question. If you are using LightDM, as a workaround, install light-locker and run it alongside XscreenSaver. Alternatively, use a different screen locking program altogether - see List of applications/Security#Screen lockers.

By default, XScreenSaver's New Login button in the lock screen will call /usr/bin/gdmflexiserver to switch users. Other display managers than GDM or KDM that support user switching (such as LightDM) require a different command.

Tip: Adding xscreensaver.newLoginCommand: to ~/.Xresources whilst leaving the argument blank will make the New Login button disappear.

As modifications in ~/.xscreensaver are discarded by xscreensaver-demo~/.Xresources is used in this section.

LXDM

To use LXDM's switching mode:

  1. xscreensaver.newLoginCommand: lxdm -c USER_SWITCH

LightDM

To use LightDM's switching mode:

  1. xscreensaver.newLoginCommand: dm-tool switch-to-greeter
Note: If you use this to switch to an already-logged-in user, you might have to enter the password twice (once for LightDM, and once for the XScreenSaver dialog of the user you logged in to).

Tips and tricks

Disable during media playback

mplayer/mpv

Add the following to ~/.mplayer/config or ~/.mpv/config:

  1. heartbeat-cmd="xscreensaver-command -deactivate >&- 2>&- &"

Kodi

Kodi has no native support to disable XScreenSaver (it uses its own screensaver). Install the kodi-prevent-xscreensaverAUR package as a workaround.

Flash

There is no native way to disable XScreenSaver for Flash, but there is script named lightsOn with support for Firefox's Flash plugin, Chromium's Flash plugin, MPlayer, and VLC.

Animated wallpaper

One can run xscreensaver in the background, just like a wallpaper. First, kill any process that is controlling the background (the root window).

Then, locate the desired XScreenSaver executable (typically in /usr/lib/xscreensaver/) and run it with the -root flag, for example:

  1. $ /usr/lib/xscreensaver/glslideshow -root &
Note: If xcompmgr causes problems, install the shantz-xwinwrap-bzrAUR package, and run:

  1. $ xwinwrap -b -fs -sp -fs -nf -ov -- /usr/lib/xscreensaver/glslideshow -root -window-id WID &

Troubleshooting

You can configure xscreensaver to write to a log file by creating the logfile # touch /var/log/xscreensaver.log and then specifying its X resource logFile.

  1. ~/.Xresources
  1. xscreensaver.logFile:/var/log/xscreensaver.log

To log verbose debugging information to the logFile as well start xscreensaver with the -verbose command line option, or add this to ~/.Xresources

  1. ~/.Xresources
  1. xscreensaver.logFile:/var/log/xscreensaver.log
  2. xscreensaver.verbose:true

See also

XScreenSaver强大的锁屏工具的更多相关文章

  1. 自制Linux 终端 锁屏防窃助手

    很多时候我们不能一直守护在自己的电脑旁边,而且有些文件并不想让别人知道.那么这时候来个锁屏,是再合适不过的了.今天分享一个自制的锁屏工具,如下. 准备 操作系统 : 我这里是ElementaryOS虚 ...

  2. PoisonTap - 在锁屏电脑上窃取cookies,获得电脑路由,安装网络后门的工具

    工具地址:https://samy.pl/poisontap/ 当PoisonTap(由Raspberry Pi Zero & Node.js开发)接入到一个锁屏或者用密码保护的电脑上时,它可 ...

  3. Android 监听手机锁屏的工具类

    自定义 ScreenListener package com.example.teagardenhd.Listener; import android.content.BroadcastReceive ...

  4. 【创客+】偷心锁屏创始人Jerry创业心得分享

    偷心锁屏创始人Jerry创业心得分享 作者:Jerry权泉,偷心锁屏创始人 我创业的起因非常偶然.08年在东京早稻田大学读博士期间,每周六都去社区活动中心跟日本人志愿者日语对话练习日语.有一次练习结束 ...

  5. WP 手机Lumia 820 锁屏密码的破解研究

    Windows Phone lumia 手机锁屏密码的破解研究     大家好今天给大家分享一个最新研究案例, 近日笔者接Nokia Lumia 820, 由于客户密码失误太多,导致锁屏23000余分 ...

  6. 使用恶意USB设备解锁 Windows & Mac 锁屏状态

    NSA专业物理入侵设备——USB Armory,可解锁任意锁屏状态的下的Windows和Mac操作系统,含最新发布的Windows10.及较早的Mac OSX El Capitan / Maveric ...

  7. web桌面程序之锁屏功能分析

    这是一个在操作系统里比较常见的功能,但在web里实现,有哪些需要注意的呢? 1.如何真正的实现锁屏? 2.如何避免通过技术手段绕过锁屏? 我个人总结出2点需要特别注意的地方,下面就分别进行分析. 第一 ...

  8. 如何为自己的windows 8系统的电脑更换锁屏壁纸

    现在的人都喜欢个性,今天教大家如何设置自己想要的锁屏壁纸 工具/原料 Windows 8系统的笔记本电脑 方法/步骤   将鼠标移到电脑的右下方,点击设置按钮进入设置页面   找到更改电脑设置并点击进 ...

  9. iOS - Mac 锁屏快捷键设置

    Mac 锁屏快捷键设置 control + shift + Eject 锁屏快捷键 如果用户要离开电脑一段时间,可以选择直接把笔记本直接合上.但是这样原先在跑的进程就会挂起或者结束,如果正在下载,那么 ...

随机推荐

  1. Bootstrap 学习笔记8 下拉菜单滚动监听

    代码部分: <nav class="navbar navbar-default"> <a href="#" class="navba ...

  2. netcore之mysql中文乱码问题解决记录

    尝试了netcore代码里面设置基本无效了 https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core- ...

  3. [Linux] 023 RPM 包校验与文件提取

    1. RPM 包校验 $ rpm -V 已安装的包名 选项 释义 -V (verify) 校验指定 RPM 包中的文件 (1) 验证内容中的 8 个信息的具体内容如下 信息名称 释义 S 文件大小是否 ...

  4. mybatis开发注意事项:字段名称以及表名

    在使用mybatis开发中,数据库设计的时候字段名称最好不要带下划线,推荐使用驼峰命名法 数据表的名称第一个字母大写

  5. Codeforces 1093D(染色+组合数学)

    题面 传送门 题目大意:给出一个无向图,每个节点可以填1,2,3三个数中的一个 问有多少种填数方案,使两个相邻节点的数之和为奇数 分析 如果图中有奇环,一定无解 我们对图黑白染色,由于图可能不联通,记 ...

  6. P5445 [APIO2019]路灯(树套树)

    P5445 [APIO2019]路灯 转化为平面上的坐标(x,y),set维护连续区间. 用树套树维护矩阵加法,单点查询. 注意维护矩阵差分的时候, $(x,y,v)$是对$(x,y)(n+1,n+1 ...

  7. ModbusTcp踩得坑

    单元标识符在MODBUS或MODBUS+串行链路子网中对设备进行寻址时,这个域是用于路由的目的.在这种情况下,“Unit Identifier”携带一个远端设备的MODBUS从站地址:- 如果MODB ...

  8. parse_str()和http_build_query()的使用

    <?php $_html = array(); $_html['action1'] = 'action1'; $_html['action2'] = 'action2'; echo http_b ...

  9. golang指针函数

    func main() { a := models.SmsVerify{} a.Id = 100 fmt.Println(a.Id) // 100 test111(a) fmt.Println(a.I ...

  10. java super与this关键字图解、java继承的三个特点