Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 02-11-2016, 10:11 PM   #1
Registered: Nov 2005
Location: Colorado
Posts: 127

Rep: Reputation: 15
Trying to get Motion daemon to beep.

I have motion up and running on an old headless Pentium III-500 Mhz with Debian 8.3.

I am using the on_movie_start option which runs a script that simply tries to play a bel sound when motion is detected. This works while running as root but fails as a daemon.
Here is the simple script:
# 2016-01-28


Output=$(date '+%b %e %_R:%S ') 
Output+=" "
echo "$Output" >> /var/log/motion.log

# on_movie_start then beep.
/bin/echo -ne "\007"
/usr/bin/tput bel > /dev/console
How do I fix this so I get the beep when motion is run as a daemon?

Last edited by sr_25; 02-11-2016 at 10:16 PM. Reason: more info: I should note that the script does execute and the $Output variable is written to the log, but no 'bel'!
Old 02-11-2016, 10:23 PM   #2
Registered: Nov 2005
Location: Colorado
Posts: 127

Original Poster
Rep: Reputation: 15
I tried adding motion to the audio group, but still no audible 'bel' is played when motion is run as a deamon.
groups motion
motion : motion audio www-data video
Old 02-12-2016, 06:00 AM   #3
Registered: Nov 2012
Posts: 204

Rep: Reputation: 67
The audio group isn't really anything to do with the terminal beep. Motion would probably need write access to /dev/console for that tput line to work. I don't know how you could do that without changing the permissions on /dev/console to allow write access from the motion group.

Does the PC have a soundcard with an internal speaker maybe? You could then use the aplay command to play and audio file instead of sending stuff to the console.
Old 02-12-2016, 09:14 PM   #4
Registered: Nov 2005
Location: Colorado
Posts: 127

Original Poster
Rep: Reputation: 15
Yes it has a sound card. I was just trying to do it without installing anything else, but I guess I'll just go that route.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Cities In Motion & Cities In Motion 2 Released For Linux On Steam LXer Syndicated Linux News 0 01-09-2014 08:32 PM
motion daemon not able to send email (debian) NozeDive Linux - Software 3 04-12-2013 12:18 AM
Motion help please (Motion only supports mmap) ?? RaeMarvin Linux - Software 4 09-06-2012 12:25 PM
Flash Videos beep-beep-beep Audio Quantumstate Linux - Desktop 1 07-24-2011 08:57 AM
beep, beep ... waring on java code thuan1975 Linux - Software 0 01-24-2011 01:27 AM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration