Registered Member
|
Is it possible to set in Kalarm a command for a count down? Say to count down 1
minute from the time the command is executed. |
KDE Developer
|
Can you explain what you mean by "count down"? Do you mean showing a visual indication of the time left before the command is to be executed?
KAlarm author
|
Registered Member
|
No. I mean a "Time from now" alarm. You set a number of minutes or hours and kalarm counts down this amount of time and then alarms. You can see this option in the middle of this picture: |
Registered Member
|
Hi!
You may use the dbus-variants in /kalarm-Path.
will show you a list of methods you may use. I assume you need one of org.kde.kalarm.kalarm.scheduleCommand-Methods. |
Registered Member
|
Hi! Could you post any example of a working string, please? |
Registered Member
|
would create the file /tmp/touched at 10:15pm without any specials. The dbus-Methods are explained in the manual, if you need the daily, monthly, and…so…on-stuff. |
Registered Member
|
I see, but I need a solution to count down from now . For example: to count down 5 minutes and then alarm. or to count down 30 minutes and then alarm etc. |
Registered Member
|
You can use the date command.
|
Registered Member
|
This command only shows me what time it will be in the specified number of minutes. No alarm happens. |
Registered Member
|
Sure. You have to combine both to a single command, like
(untested). The $() opens a bash subshell returning the result of the command inside the parantheses. But these are questions of scripting or dbus-usage and independent of kalarm More options are described here → https://docs.kde.org/trunk5/en/pim/kalarm/ /edit: forgot following: Even if the command returns true, it may not work if there is no default calendar defined! You should then look at syslog with
|
Registered Member
|
When I run this:
I get this:
And nothing else seem to happen. Then I open the file /var/log/syslog and search the word "kalarm" there. The search returns zero finds. |
Registered Member
|
As you are running debian, there could be an old version of plasma running. Could you show the declarations of schedule-functions?
With plasma 5.18.5 (framework 5.70.1) it matches 3 possibilities:
|
Registered Member
|
Is this the info in question?
|
Registered Member
|
Wow, okay. That is really old software. 4.14.3 is from Nov, 2014 . I do not use Debian, but do they still support KDE4 or is your system unsupported? Besides your problem here, you should think about upgrading to a newer version of KDE if possible.
Back to topic: To get the error message of kalarm, have a look at dmesg command afair pre-systemd-aera Or just use the graphical KSystemLog searching for "kalarm" , which was available for KDE4 too. The line given matches the arguments of the first occurence of "method bool org.kde.kalarm.kalarm.scheduleCommand", so the issue seems to be something else, like setting a default alarm calendar. bool means the function call returns true or false, so it returns true on success and false on error, but appearently without an error message. As an example, the above command returns true on my system, but nothing happens anyway and my systemlog (systemd → journalctl) contains following line: May 19 15:54:03 x220arch kalarm[1951]: org.kde.pim.kalarm: AlarmCalendar::addEvent: Error! Cannot create Active alarm (No default calendar is defined) as I have no configuration set up for kalarm and normally do not use it. Perhaps you'll find an error which points us in the right direction. Is kalarm running in background? If it is NOT running, you may use the default command line arguments to trigger an event, but KAlarm recommends using dbus-methods to control a running instance. Are you fixed on using KAlarm? Or do you just need some simple cronjobs? Whats the main goal behind your question? |
Registered Member
|
My Debian version (Jessie) has extremely rare updates now if any still. Indeed, I've tried updating to newer version a long time ago but my system got screwed somehow so I rolled it back. Since then I've just had no time for other experiments and since the system runs OK I've let it be.
I'm not fixed on kalarm. Anything that would count down and alarm while being in background would do allright. I'd like it to be a command attached to a keyboard shortcut. I'll try kalarm again and reply to the rest of the message a bit later. |
Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]