LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-02-2010, 11:34 PM   #1
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Rep: Reputation: 50
Terminal Shutdown -h -P with a beep?


I have a habit of watching videos when I go to sleep. So I decided to start using, for example, the following when I laid down:

sudo shutdown -h -P 60

Of course this shuts down the computer in an hour. I was wondering if there was a way I could get the computer to beep a few times for the last 10 Minutes and then a few more times for the last 5 minutes?

Last edited by Amdx2_x64; 11-02-2010 at 11:56 PM.
 
Old 11-03-2010, 01:21 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
You could use a script (run in the background):
Code:
#!/bin/sh
sleep 50m
printf '\a'; sleep 1; printf '\a'; sleep 1; printf '\a'
sleep 5m
printf '\a'; sleep 1; printf '\a'; sleep 1; printf '\a'
sleep 5m
sudo shutdown -h -P now

Last edited by neonsignal; 11-03-2010 at 01:27 AM.
 
Old 11-03-2010, 01:42 AM   #3
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Great. Thanks. I will give that a try tonight and let you know how it goes.
 
Old 11-03-2010, 12:59 PM   #4
Amdx2_x64
Member
 
Registered: Jun 2008
Distribution: Left LQ. Mods are too Rude!
Posts: 598

Original Poster
Rep: Reputation: 50
Well I forgot to do this last night. However I did install the program beep. I forgot this and started falling asleep watching a movie and I did the sudo shutdown -h -P 120 Well the movie ended and the speakers where loud and it BEEPED. Good that it does it now, bad that I think they heard it several blocks away.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Where's my beep? (GNOME Terminal) jsteel Linux - General 5 01-17-2010 04:04 PM
[SOLVED] How to Disable the Terminal Beep when running the Shutdown command? Zoot Linux - General 6 09-03-2009 02:06 PM
shutdown goes back to GDM and makes PC speaker beep powerpleb Linux - Newbie 3 04-20-2008 12:39 AM
hard drive making emerg. parking beep at shutdown Geocritter Linux - Laptop and Netbook 4 01-20-2007 02:11 PM
disable reboot/shutdown beep yiang Linux - Newbie 13 04-26-2006 11:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:38 AM.

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