They offer different flash templates with latest features.
Login

Forgot password
Register
Back
Written by:
misko_2083
Score: 0
votes: 5
Format: Article

 Custom alarm alerts - autostart media files, voice alerts and YouTube videos


This can be very usefull if you want to start your music, videos, images, or even Youtube video automatically. The possibilities are endless you can set it to open any web page, read e-mail...

Install alarm-clock GUI:

$ sudo apt-get install alarm-clock

 

Open alarm-clock and create new alarm. Set time and/or date. When you create a new alarm choose Notification and unmark all other options and select "Execute command or shell scrip". Choose Preferences and set your custom command.

 

1. Text2Speech

To set text to speech alarm first install espeak

$ sudo apt-get install espeak

 

Enter this command to set simple reminder.

$ espeak “Some text or sentence. For example, wake up, or anything you want.”

 

If you want to use file input for espeak enter this:

$ espeak -f /path/to/text

 

If you want to loop message indefinitely, use this:

$ yes some text | espeak

Keep in mind to check in Run inside GNOME terminal. This way you can just stop it by closing terminal window. Otherwise you'll have to use

$ killall espeak

 

 

2. Audio & Video

You can use vlc to start Youtube video as alarm:

$ vlc https://www.youtube.com/watch?v=Vpg9yizPP_g

To play youtube lists just use '  '

$ vlc 'https://www.youtube.com/......'

Without GUI:

$ cvlc https://www.youtube.com/watch?v=Vpg9yizPP_g

 

or just a local mp3, ogg, avi, or whatever sound or video file on your hard drive

$ vlc ~/Music/”michael jackson.mp3”

$ cvlc ~/Music/”michael jackson.mp3”

 

You can play folder with:
$ find /my/music/directory/ -type f -exec vlc -LZ '{}' +

 

 

Instead of vlc you can use mpv

Install it:
$ sudo apt-get install mpv

 

$ mpv https://www.youtube.com/watch?v=Vpg9yizPP_g

 

To start in fullscreen:

$ mpv https://www.youtube.com/watch?v=Vpg9yizPP_g --fs

 

 

To play mp3 files you can also use mpg321

 

$ sudo apt-get install mpg321

 

In order to play use this command, just change the path and filename:

$ mpg123 -K ~/Music/”michael jackson.mp3”

 

play all music in a directory

$ mpg123 -K -B ~/Music/somefolder

 

to shuffle just add -z or –shuffle option
to play random -Z or --random

to force stereo output when you play files with only one chanel --stereo

 

You can make a playlist and then play it

$ locate *.mp3 ~/Music/rock > ~/Music/rocklist

 

$ mpg123 -K ~/Music/rock/rocklist

 

For wav file format you can use aplay:

$ aplay ~/Music/”michael jackson.wav”

 

3. Image

You can start image viewer for example gnome image viewer

$ eog ~/Pictures/picture.jpeg

This will automatically open picture.jpeg

 

4. Srceensaver

To start screensaver and lock screen at predefined time enter this:

$ gnome-screensaver-command --lock


5. Web browser

You can start any web page, just change url.

$ firefox http://community.linuxmint.com

$ google-chrome-stable http://community.linuxmint.com

$ midori http://community.linuxmint.com

To open YouTube lists:
$ firehox 'https://www.youtube.com/watch...'

6. E-mail

Let's say you want check your unread gmail every day at 6pm
set the alarm to activate every day at 6pm and to triger this command:

$ curl -u username:password --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/


Tags: Alarm, youtube, autostart, autorun, vlc
Created: 4 years ago.
Last edited: 4 years ago.
Reviewed: 4 years ago.


Comments
4 years ago

MagicMint
The dollar sign is unnecessary in all command lines except the first one for the installation.  

Other tutorials from misko_2083