> Linux教程 > Linux学习 >

Linux命令行下设置/取消屏保

查看当前屏保的设置情况:#xset q
xset的s参数后面可接两个数字参数,前一个即是进入屏保的秒数:
10秒后进入屏保:#xset s 10 600
如果想恢复默认值:
#xset s 0 600
取消:
#xset s off

dpms显示器休眠状态(与关机后的显示器同样的效果):
开启:
#xset dpms 1 1 2
取消:
#xset -dpms

[root@proxy ~]# xset --h
usage:  xset [-display host:dpy] option ...
    To turn bell off:
        -b                b off               b 0
    To set bell volume, pitch and duration:
         b [vol [pitch [dur]]]          b on
    To disable bug compatibility mode:
        -bc
    To enable bug compatibility mode:
        bc
    To turn keyclick off:
        -c                c off               c 0
    To set keyclick volume:
         c [0-100]        c on
    To control Energy Star (DPMS) features:
        -dpms      Energy Star features off
        +dpms      Energy Star features on
         dpms [standby [suspend [off]]]
              force standby
              force suspend
              force off
              force on
              (also implicitly enables DPMS features)
              a timeout value of zero disables the mode
    To control font cache:
         fc [hi-mark [low-mark [balance]]]
            both mark values spcecified in KB
            balance value spcecified in percent (10 - 90)
    Show font cache statistics:
         fc s
    To set the font path:
         fp= path[,path...]
    To restore the default font path:
         fp default
    To have the server reread font databases:
         fp rehash
    To remove elements from font path:
        -fp path[,path...]  fp- path[,path...]
    To prepend or append elements to font path:
        +fp path[,path...]  fp+ path[,path...]
    To set LED states off or on:
        -led [1-32]         led off
         led [1-32]         led on
    To set mouse acceleration and threshold:
         m [acc_mult[/acc_div] [thr]]    m default
    To set pixel colors:
         p pixel_value color_name
    To turn auto-repeat off or on:
        -r [keycode]        r off
         r [keycode]        r on
         r rate [delay [rate]]
    For screen-saver control:
         s [timeout [cycle]]  s default    s on
         s blank              s noblank    s off
         s expose             s noexpose
         s activate           s reset
    For status information:  q

 

(责任编辑:IT)