maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   Automatic Muting via cron (https://talk.maemo.org/showthread.php?t=20966)

grog 2008-07-04 17:47

Re: Automatic Muting via cron
 
Under diablo I've just installed the cron.tar.gz package which works great! I then installed aumix-gtk from the elkins repo, which doesn't work so well. While 'aumix -w 0' run as root doesn't give any errors it also doesn't mute the IT's output. Can anyone confirm that this does work in diablo? TX

alephito 2008-07-04 18:29

Re: Automatic Muting via cron
 
Aumix does work, grog.

grog 2008-07-04 20:14

Re: Automatic Muting via cron
 
Quote:

Originally Posted by alephito (Post 199387)
Aumix does work, grog.

Of course it does, and of course it's only after I post here about it do I find out what I did wrong :o. I was playing with the system volume control, thinking that just because I could hear the chimes as I changed the volume that it wasn't working. But what I didn't realize is that just by accessing that control it was restoring the volume automatically. So every time I shut it off using aumix, I was turning it back on with the volume control :rolleyes:.

Thanks for the quick response.

allnameswereout 2008-07-05 23:05

Re: Automatic Muting via cron
 
Nice concept, but if you are bothered by the light and don't want to hear sounds why not simply hang the device on the power, and put it off? Then put it on when you wake up. Booting the device has very much improved with Diablo.

Also, what if the device went off while inbetween those 2 cron scripts? The scripts will have to be executed on boot as well.

Then there are weekend days with perhaps different preferences but thats easily fixed in cron.

Perhaps a cron frontend a-la Windows Scheduler would be nice for the NIT.

Have an alarm in the form of an MP3 being your alarm clock.

Nice concept tho but IMO these scripts should also save the current setting IOW save the setting before it goes into 'night' mode, and then in morning return to this original setting before it went into 'night' mode. Currently. reminds me of ALSA in its early days, hehe.

Laughing Man 2008-09-02 20:06

Re: Automatic Muting via cron
 
Quote:

Originally Posted by cybergypsy (Post 191971)
Thanks maillaxa, thats great!

For anyone else who would like to get this working , here is what I have done.
I set all this up via SSH on my desktop rather than the built-in terminal, this allows easy copy & paste as well as file transfers via secure copy (scp)
  1. Installed the aumix-gtk applcation from the repositories.
  2. Installed the cron package from this thread.
  3. As root created a crontab containing :-
    Code:

    30 23 * * * aumix -w 0
    00 7 * * * aumix -w 90

    This mutes the tablet at 11:30pm and un-mutes it at 07:00am
  4. Either reboot or run cron from the command line.

Good Luck
cybergypsy

Can you setup several scripts? For example, I have classes on different days that I'd like it to auto mute on.

TrueJournals 2008-09-05 02:55

Re: Automatic Muting via cron
 
Try using http://www.webmaster-toolkit.com/cron-generator.shtml to generate your crontab lines. You can have as many lines in the crontab file as you want. Just remember that aumix -w 0 will mute, and aumix -w 90 will unmute.

alephito 2008-09-05 11:05

Re: Automatic Muting via cron
 
I unmute with 'aumix -w 93', since 93 is the default volume in a brand new NIT.

Laughing Man 2008-09-05 20:07

Re: Automatic Muting via cron
 
Thanks! Though I have a question.. say..

0 10 * * * aumix -w 0

That would mean 10 AM on a Sunday it would mute my n800 using aumix.

Now I can set one up for each day.. but is it possible to say.. create a crontab that does Monday, Wed, and Friday? Or would I need three different crontabs? For example, could I do something like this?

0 10 * * 1,3,5 aumix -w 0

Or would I need

0 10 * * 1 aumix -w 0
0 10 * * 3 aumix -w 0
0 10 * * 5 aumix -w 0

And if so, could I put them all in one textfile instead of having an individual text file for each one?

Benson 2008-09-05 20:17

Re: Automatic Muting via cron
 
http://linux.die.net/man/5/crontab

Laughing Man 2008-09-05 21:06

Re: Automatic Muting via cron
 
Ok, thanks for the help everyone. I've written the file and loaded it with crontab.. so I guess I'll find out Monday *crosses fingers*.


All times are GMT. The time now is 19:31.

vBulletin® Version 3.8.8