我的屏幕亮度在几秒钟后变暗以保存电池。这是Ubuntu 12.04中的默认设置。但是在观看视频时,它不应该暗淡。
当我使用VLC等本机应用程序观看视频时,此功能正常。但是,使用浏览器内视频时,屏幕不会变暗。
这非常烦人,因为你必须每10秒左右移动一次光标。
我曾经使用Mac OSX,我有相同的调光设置,并正确考虑了Flash视频。
任何人都知道如何让YouTube阻止屏幕变暗?
HOWTO:在Flash运行时禁用屏幕保护程序
在终端中运行以下命令:
mkdir -p ~/bin
打开gedit或您首选的文本编辑器,然后输入:
#!/bin/bash
# Cleanup any bad state we left behind if the user exited while flash was
# running
gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled --type bool true
we_turned_it_off=0
while true; do
sleep 60
flash_on=0
for pid in `pgrep firefox` ; do
if grep libflashplayer /proc/$pid/maps > /dev/null ; then
flash_on=1
fi
ss_on=`gconftool-2 -g /apps/gnome-screensaver/idle_activation_enabled`
if [ "$flash_on" = "1" ] && [ "$ss_on" = "true" ]; then
gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled \
--type bool false
we_turned_it_off=1
elif [ "$flash_on" = "0" ] && [ "$ss_on" = "false" ] \
&& [ "$we_turned_it_off" = "1" ]; then
gconftool-2 -s /apps/gnome-screensaver/idle_activation_enabled \
--type bool true
we_turned_it_off=0
fi
done
done
将此文件另存为~/bin/flash_saver.sh
。
返回终端并运行:
chmod +x ~/bin/flash_saver.sh
要运行此功能,请进入终端并输入:
~/bin/flash_saver.sh
如果您愿意,可以通过执行以下操作将此脚本设置为在登录时运行:
~/bin/flash_saver.sh
来源:HOWTO:在Flash运行时禁用屏幕保护程序 - ubuntuforums < / p>