Results 1 to 6 of 6

Thread: Prevent sleeping

  1. #1
    Join Date
    Feb 2008
    Location
    Lincolnshire
    Beans
    231
    Distro
    Ubuntu 11.04 Natty Narwhal

    Prevent sleeping

    I have an Xubuntu desktop acting as my media machine. It drives a TV through a Bose media centre, so I do not need the screen to shut down ever; I turn off the TV independently. In fact it's a pain having it sleep, because then the bose can't find it and sometimes waking it up is very difficult.

    I now have a further problem, because I'm about to have it playing music for a party, and I need it to go on independantly for several hours.

    I have tried the Power Manager, but the most I can make it stay on for is 60 mins. Even while it's playing music, if I don't touch the keyboard or mouse for an hour the sound and picture go off, even though VLC keeps on going.

    I also did some research and found reference to an app called "inhibit", which sits in the tray. Unfortunately when I try to add it to the tray it's not available, and I don't know how to get it.

    Can anybody help please.

  2. #2
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Prevent sleeping

    Just as a problem solving exercise could you write a cron job to nudge the mouse every 15 minutes or so to keep sound and picture alive? You might use xdotool for this nudging.

  3. #3
    Join Date
    Jan 2013
    Location
    East Yorkshire
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Prevent sleeping

    Doesn't the program caffeine stop the screen from going to sleep?

  4. #4
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,791

    Re: Prevent sleeping


  5. #5
    Join Date
    Mar 2017
    Beans
    1,018

    Re: Prevent sleeping

    Check your power manager setting.
    When enabled uses dpms.
    Attachment 284004

    Can also check if dpms is enabled with...
    Code:
    xset -q
    Try a startup script....
    Code:
    #!/bin/bash
    sleep 10
    xset -dpms
    xset s off
    Failing that, a simple loop script...
    Code:
    #!/bin/bash
    
    while [ 1 ]; do
    	sleep 60
    	xdotool key shift	
    done
    exit 0
    Last edited by again?; September 12th, 2019 at 11:37 AM.

  6. #6
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: Prevent sleeping

    My Xubuntu 18.04 on a desktop machine has an icon for an applet on the panel for the power-manager, part of Notification Area, which when right clicked shows a tick box for "Presentation Mode".

    A tick in that keeps the machine running indefinitely.
    Last edited by ajgreeny; September 12th, 2019 at 09:01 PM. Reason: Wrong version of Xubuntu; I use 18.04 not 19.04.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •