Run script after inactivity in Ubuntu

Posted on 2012-09-18
Last Modified: 2012-09-18
I would like to run a bash script in Ubuntu 12.04 after X amount of time of inactivity, essentially the same way a screen saver works except that a script is ran instead of a screensaver. Is this possible to do?
Question by:bhilgenkamp
    1 Comment

    Accepted Solution

    After an hour of searching I find something within 2 minutes of posting this...
    The command xprintidle seems to be able to get me going. It just reports the idle time of keyboard or mouse.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
    I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now