General :: Writing A Script For An Alarm Clock?
Nov 27, 2010
I left the linux world for a few years and now i am trying to re-learn my shell scripting basics. I am writing a script for an alarm clock, but i seem to be running into a few issues.
declare -i H
declare -i M
declare -i currentH
declare -i currentM
declare -i minutesLeft
[code]....
My script, instead of doing what it should, produces the following errors:
./alarm: line 19: echo 11: No such file or directory
./alarm: line 26: 6: command not found
[code]....
and if i choose the time 11:06, files called 11 and 6 are creating in the working directory. I am sure it is something really simple, but i haven't used linux or scripting on my computers in around 6 years.
View 11 Replies
ADVERTISEMENT
Sep 24, 2010
I'm looking for an easy to use alarm clock program that I can suggest to new users. The two I have tried so far have fallen short of my expectations. "Alarm Clock" from the Ubuntu software repository starts out okay, but when the alarm actually goes off, getting it to stop seems pretty unintuitive. Click on the Alarm Clock icon, then click a Stop button in the new window that pops up. Sounds easy enough except that the icon used for "Stop" is just this grey square, so for users who are not familiar with linux or this program, it isn't even obvious that it is a button. I had one user actually uninstall the thing in order to get it to shut up. Preferably one should be able to silence the alarm by click on the alarm icon (or right clicking, if a 'doze' behavior is preferred) The other one I tried was alarm-clock-applet, which wants me to locate an alarm sound on my filesystem. Uh, no.
Does anyone know of a simple, basic alarm clock system that anyone can just sit down and immediately use without having to 'get in to the head' of the developer? Are the KDE alarms better? Am I missing something about either of these programs which would make them easier to use?
View 4 Replies
View Related
Nov 19, 2010
I installed 'Alarm Clock' from the Software Center and would like to have said app autostarts. There is an option in Alarm Clock to autostart with Gnome but that doesn't work so I assume the reason being I'm not root.
How to autostart Alarm Clock?
Also, in System > Preferences > Startup Applications, the 'Add' asks for a command. Is this like Windows whereas I simply point it to the app I want started? I don't even know where apps are installed. Who said ignorance is bliss?
View 3 Replies
View Related
Mar 2, 2011
Any alarm clock program I can run on xubuntu.
View 1 Replies
View Related
Jun 13, 2011
So, I'm attempting to write an alarm clock from scratch without a GUI, doing this through a bash script. So far I wrote the file that actually initiates the song, and I was trying to set up a crontab so I could do it at a certain time, making it function like an alarm clock, but it isn't seeming to work, any input on why
Code:
SHELL=/bin/bash
12 5 * * * /home/angelo/music.sh
That is my crontab
View 9 Replies
View Related
Aug 15, 2010
I'm trying to set up the Alarm Clock app to automatically launch Rhythm Box and begin playing a specific internet play lists I have there. I have one template set up to launch Pandora and I could probably get it to launch Rhythm Box but, how do I get it to launch Rhythm Box and begin playing a certain radio station playlist?
View 6 Replies
View Related
Jan 13, 2011
I must be overlooking something here, but I can't find out how to add "Alarm Clock Applet" to my panel. In Ubuntu Software Center, there's a picture of the program right in the panel and feature to add to panel, but there's no option for me to do this. "Add to Panel" doesn't have the application either.
View 9 Replies
View Related
Feb 2, 2011
I've installed Alarm Clock and was planning to use it to shut down my PC at a certain time every day. What command would I use to execute the shutdown, "sudo shutdown -P" ?
View 5 Replies
View Related
Mar 2, 2011
I have just installed alarm clock, I cannot find an icon anywhere after the install. How can I start this program.
View 7 Replies
View Related
Jul 6, 2010
I have a feature that keeps me going back to Mac every night, and I was wondering if there was an equivalent. I have a nice app called alarm clock on Mac that plays music from my library on specified days of the week and times AND can wake the computer from sleep to do so. I was wondering if there was a Linux equivalent, such as crontab, that could do all those things. It's the last barrier to almost full time Linux use.
View 4 Replies
View Related
Feb 4, 2011
I need to set up an alarm to start at 7:30am and run every 5 seconds until I stop it. How would I acheive this in cron tab?
View 2 Replies
View Related
Feb 21, 2010
I'm trying to make an "alarm clock" with mpd and gxmessage. Gxmessage allows you to assign unique exit codes for its buttons to use in your script. This is what I have so far:
Code:
#!/bin/bash
vol=$1
mpc clear
mpc load alarm
[Code].....
Now I know I'm way off with the case statement, because when the alarm_message function is called within the case, both of the exit codes I assigned to the buttons (-buttons "Stop":1,"Sleep":2 ) return to their default value.
What I would like is for every time the "Sleep" button is pressed, it would pause mpc, sleep for an amount of time, play, then open gxmessage again to restart the case statement (retaining the exit codes I assigned to the buttons). Am I on the right track?
View 2 Replies
View Related
May 27, 2011
I'm using a very simple conky script to diplay the date and time on my desktop. I've noticed that he conky clock is a few seconds early compared to the time displayed in the right hand side of the top panel (Natty). I guess both displays are based on the same "internal" time, so I'm left wondering how this could happen, and how to sync back the clocks.
It seems that Conky is in sync with the system date, while the panel clock is 2 seconds late (on my system). Checked with while true; do date; sleep 0.1; done
View 2 Replies
View Related
Aug 2, 2011
Just curious as to if it is possible to have the clock in the center of the task bar centered clock in Ubuntu 11.04?
View 1 Replies
View Related
May 2, 2011
Does anyone know of an interface to a quartz clock that can be used for a TOD clock?? I want to interface it to an Arduino board. Can be GPIO or USB.
View 1 Replies
View Related
Sep 2, 2011
I had cloned a centos 5.6 installation from virtualbox virtual machine to physical box. Everything work fine. However, the time showing in os using date command differs from bios time by roughly 4 hours. I am running ntp services which sync the time with another centos server on the network. It appears that some services are using virtual clock and some use physical clock. How do I get rid of virtual clock and only use physical clock?
View 1 Replies
View Related
Sep 18, 2010
I'm using Alarm-clock, not the alarm-clock-applet, and when i set Schedulle > AllWekdays an AllMonths the alarm gives me two pop-ups
View 1 Replies
View Related
Mar 25, 2010
My VPN is behaving funny sometimes, and I have to restart it often.I wanted to write a script which does that for me.It doesn't have to be anything fancy, just a shortcut for the commands I have to type into the terminal. More specifically: it will look at the running processes.If it finds a running vpnc process, it will kill it. Then it will start vpnc.I've written bash scripts of similar complexity,but now I don't have a bash,only an ash. Until now, the only difference I noticed is that there are much less commands available, but then, I don't use it very often.So I have some questions.
Is writing ash scripts different than writing bash scripts?
Is there something specific to consider when doing it?
When the script is ready, how can I deploy it? For bash, I just put the executable file under /usr/lib and run it by typing the file name into the command line, will this work with ash?
Are there any special pitfalls to watch out for in the script I want to write? I think that the killing process part may get hairy, if I write something that kills the wrong process, but even then running the script shouldn't break anything permanently, right?
View 2 Replies
View Related
Mar 3, 2011
i am having a the following line in a file
<property name="connection.password"></property>
i have to give password in this line, like this
<property name="connection.password">XXXXXX</property>
Is this possible to acheive this using sed command
Beause i have to do this for n number files. so if i have option in sed for this the i will be doing this using script.
View 7 Replies
View Related
Jun 30, 2011
Today I missed class because my clock was an hour slow. The cause of this seems to be because the windows time service wasn't switched on. Seems to work fine now. Why does windows not use the hardware clock on the motherboard? What does Linux do?
View 1 Replies
View Related
Jan 25, 2011
user@user-laptop:~$ sudo dd if=sd_backup of=/dev/sdd bs=4M conv=noerror,sync
205520896 bytes (206 MB) copied, 28.564 s, 7.2 MB/s
247463936 bytes (247 MB) copied, 57.1285 s, 4.3 MB/s
260046848 bytes (260 MB) copied, 73.2388 s, 3.6 MB/s
289406976 bytes (289 MB) copied, 104.121 s, 2.8 MB/s
[Code]....
How come dd gets slower after copying this 8GB file? What can I do about it?
View 1 Replies
View Related
May 6, 2011
When you are performing time consuming operations in bash like installing new software, is it possible to write text that will appear at the prompt when the operation has finished.
E.g
Imagine running:
apt-get install eclipse-platform
Then it will use quite a while to finish while you see the installation log, meanwhile I want to create new folders (workspaces) which Eclipse later will use.
Is this possible without opening a new terminal (or tab)?
View 5 Replies
View Related
Sep 17, 2011
When I login I always do:
ssh myuser@111.111.111.111
Is it possible to do something like:
ssh myuser@server1
I would like to use a name, not an IP address, is it possible?
View 2 Replies
View Related
Sep 7, 2010
Basically I have a USB flash drive currently formatted under vfat. I can log in as root and the system automatically picks it up and automounts the drive successfully. What needs to happen is that a non-root user needs to be able write to this device while root has mounted this device. Due to other program constraints, I can not mount the device using another user so I have to do it with root.
View 9 Replies
View Related
Nov 10, 2010
My video card writes the CRT in one of two "modes". High intensity ("bright chars") and low intensity ("dim chars"). How do I set vim in order for him to use only low intensity?
View 2 Replies
View Related
Sep 29, 2010
When i Write commands in terminal it does nothing
View 1 Replies
View Related
May 3, 2010
How can we write arrayValues in file? Lets say arrayName=(1 2 3 4 5) Now if i want to write these arrayValues into file
In first line in file :1
In second line in file :2
In third line in file :3
In fourth line in file :4
In fifth line in file :5
View 3 Replies
View Related
Mar 18, 2010
I need to write an else-if condition in a makefile, and though the format is posted on several websites, nothing seem to be working, andI get an error everytime. Could anybody please write a small example with an else-if conditional in a maekefile?
View 1 Replies
View Related
Mar 18, 2010
I am using Grass GIS
I have written a script which outputs a list of numbers to a file
code snippet:
r.stats -1 fs=, input=Bones_AVE > /home/gary/AVE_monte_carlo/rstats_AVE$i.csv
so this makes acsv file with one column. I want to run it again but rather than outputing to a new csv i want to add it to this one as the next column. For this example there will be 100 rows per column.
the 1st one will make the file
[grassGIS code]> /home/gary/AVE_monte_carlo/rstats_AVE.csv
add ',' after each value
the next one
[grassGIS code] open file /home/gary/AVE_monte_carlo/rstats_AVE.csv
[Code]....
View 1 Replies
View Related
Jul 28, 2010
I am trying to write input to a shell and get the shell to parse the input that I am writing to it as if a user was typing in commands.
Thus far I have tried echoing some text into the shell's FD for STDIN in /proc/<pid>/fd Whilst this displays the text that I echo, the shell that I am writing to never tries to execute the command that I pass to STDIN. What is the difference between a shell taking STDIN from the user and data written to STDIN by another process e.g. echo ? It appears I am missing something fundamental.
View 5 Replies
View Related