Use Google Chrome as a Screensaver

You can use Google Chrome‘s --kiosk mode to create a full-screen screensaver of sorts. This might be good if you have a webpage or intranet page you’d like to display. Here’s how I did it for a windows computer:

Create a file such as c:\screensaver.bat and add the following code. Replace with your location of chrome.exe

@echo off
taskkill /im chrome.exe
start /wait "" "C:\Documents and Settings\Google\Chrome\Application\chrome.exe" --kiosk
rem ## run any command here you'd like after the "screensaver" finishes ##

Next, set that to run as a scheduled task after the computer has been idle for 5 minutes (or however long you choose).

You can then listen with jQuery / javascript to close the page when the mouse moves. Here is code that closes the page when the mouse moves more than 20 pixels. You could also bind it to a keyboard event.

<script type="text/javascript"


<div id="log"></div>

    <script type="text/javascript">

    var startx = '';
    var starty = '';


    if(startx == ''){
        startx = event.pageX;
        starty = event.pageY;

        deltax = Math.abs(event.pageX - startx);
        deltay = Math.abs(event.pageY - starty);

        var msg = '';
        msg += "distance x ";
        msg += deltax;

        msg += "distance y ";
        msg += deltay;

        $("#log").html("<div>" + msg + "</div>");

        if(deltax > 20 || deltay > 20){



function closeWindow(){
    setTimeout(function(){'', '_self', '');




Related Posts:

This entry was posted in Software, Tech Tips, Web Development and tagged , , , , , , , , . Bookmark the permalink.

4 Responses to Use Google Chrome as a Screensaver

Leave a Reply

Your email address will not be published. Required fields are marked *