You are not logged in.
Pages: 1
I have a program on my desktop that I can use as an alarm clock and until recently, all went well. Alas, there's some sort of hardware issue, and my computer spontaneously reboots at random times. (I think it's the power supply, but until my hardware geek comes out, I just have to live with it.) The program is only active when I'm logged in, so if there's a reboot while I'm asleep, it doesn't work.
I've been thinking about creating a launcher on my panel that would use the command at to set up such an alarm, as I don't need to be logged in for it to work; the computer just has to be on. However, it would be nice if I could tell the command what time to wake me without having to edit the launcher every time. (The launcher is the generic one from Add Items to Panel.) If nothing else, I can create a simple shell script that takes the time as an argument and passes it to at and call that from the launcher, but unless I know how to make the launcher ask for an argument, there's no point. I know that there's an option to run the command in a terminal, but I don't think it allows input before running the command. Suggestions?
Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.
Offline
First, the application in question is the alarm-applet. Second, I've found a way to do this that works even better than the applet. (The applet is really a countdown timer. It gets confused when you go onto or off of DST, and you can't set up an alarm that doesn't go off for several days.)
What I have is two shell scripts. The first one uses read to put the alarm time into a variable, then runs at to set up running the second script at the date and time specified. (This means that your input must be in the format required by at, but there's a reminder at the beginning of the script.) One of the nice things about doing it this way is that you can set an alarm up to go off days, months or even years later, if that's what you need. The other script simply runs ffmpeg with the right .mp3 file and the proper switches to make it run right and hide all text output. This will work even if I'm logged out, or the box has rebooted and I haven't logged in since then. If anybody's interested, I'll be glad to post both scripts, with appropriate comments.
**************************************
I tried setting up an alarm, then made sure that I wasn't logged in when the time came. The job vanished from my queue, but there was no output. Until that's fixed, this isn't ready for prime time. However, I did learn some things about using a launcher for programs that run in terminals and will be happy to pass my experience on if anybody needs it.
Last edited by Sideburns (2015-04-01 06:35:29)
Registered Linux user #470359
Permanently recovered BOFH
Any advice in this post is worth exactly what you paid for it.
Offline
Pages: 1
[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 523.06 KiB (Peak: 530.85 KiB) ]