LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-30-2024, 01:32 AM   #1
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 638

Rep: Reputation: 155Reputation: 155
KTimer does not run the scheduled program.


Question: has anyone actually gotten KTimer to start a program ?
And if so, How, what did you have to do ??

I tried to use KTimer to signal me at a certain time.
KTimer cannot do anything else but start a program, so it is pretty useless without this working.

I have not been able to make KTimer start any program.
I have watched that timer count down to 0 repeatedly, and it does not start the program.
I have tried several programs for it to start.
I made a script that would just play a chime sound 20 times.
The script works by itself.
I have tried using absolute path names, copying a file, tried starting a program on the desktop, and trying playing sounds using several programs.

None of these have worked when given to KTimer.
I have the "once" choice selected.

Note: the sound works fine when I run these programs directly.

Question: has anyone actually gotten KTimer to start a program ?
And if so, How, what did you have to do ??

I also tried to use any of the other timers. None of them could be configured to make a sound at the programmed time.

The tea timer actually worked, but was useless as I was not at the computer at that exact moment, and it did not make any sound. I found a pop-up window later.
 
Old 01-30-2024, 02:52 AM   #2
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,986

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
I just tried it with slackware64-current and slackware64-15.0, works in both instances. The first I use my email client, used full path and added a switch to receive emails, set for 30 seconds. Started the timer 30 seconds later, the email program started and check mail. In the second, used kcalc, set to 15 seconds, stared the timer, 15 seconds later kcalc started.

I also tried and .mp3 file using play filename.mp3 and tested with some sounds in /usr/share/sounds/ using play, tried a few *.wav files too. All worked.
 
Old 01-30-2024, 06:56 AM   #3
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
KTimer works here (Slackware64 15.0), too (I used "play" to play a .wav file).

Quote:
Originally Posted by selfprogrammed View Post
I also tried to use any of the other timers. None of them could be configured to make a sound at the programmed time.
You are probably using KDE, but in case you are actually using XFCE, did you try the xfce4-timer-plugin (available at slackbuilds.org)?
 
Old 01-31-2024, 04:48 PM   #4
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 638

Original Poster
Rep: Reputation: 155Reputation: 155
Of course, I run XFCE4. Any KDE support is a whatever.

Thank you for that information. It must be an KDE support problem.
Does not seem to be that kind of issue that needed much KDE support.
I spent a while last night trying to configure KAlarm, as it was unhappy about not having an email specified. I would prefer it not to have an email, as I do not let my email disturb my work.
I do not know if KAlarm and KTimer have common support needs or not.

Will definitely look into that XFCE4 plugin.
I would like to have at least one timer that worked.
 
Old 01-31-2024, 05:08 PM   #5
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 638

Original Poster
Rep: Reputation: 155Reputation: 155
I just tried it with kcalc, and it worked (the kcalc window popped open).

I tried it again with my chime alarm, and got silence again. It will not run my alarm bash script.

Tried it with "play /home/myuser/datadir/sound/chime.wav", and that worked.
Tried it with "aplay /home/myuser/datadir/sound/chime.wav", and that worked this time (yesterday it did not work).
Tried it with "play ~/datadir/sound/chime.wav", and that worked.

Note: if I get anything at all wrong in that file spec, it will fail silently, no error messages nor any error indication.
This is a problem with what files that KTimer will run, and that it fails silently for some.
I must suspect that messing with the KAlarm setup had something to do with it too.

Last edited by selfprogrammed; 01-31-2024 at 05:09 PM.
 
Old 02-01-2024, 10:29 PM   #6
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 638

Original Poster
Rep: Reputation: 155Reputation: 155
Tried KTimer with "bash /home/myuser/alarm20", and silence, it would not play it.
-- this exact line plays the alarm when started from Konsole.
-- this is more than just not handling bash scripts.

Tried with "play Music/arsonist*", and it worked, playing the mp3.
-- this shows that KTimer started programs can play sounds, on my system.

Tried with "play /home/myuser/sound/chime.wav", and again got silence.
Have not figured out what it is rejecting.
 
1 members found this post helpful.
Old 02-05-2024, 01:10 PM   #7
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
I don't know what is happening but my guess is that software from the KDE world use KDE's libraries to handle sound events. Maybe some KDE sound configuration prevents things from working correctly. Can you check KDE's sound server settings?

Still, the command "play" working on mp3 but failing on wav input is strange. The are no permission issues on these files, are there?
 
Old 02-07-2024, 08:05 PM   #8
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 638

Original Poster
Rep: Reputation: 155Reputation: 155
The KDE sound server is as installed by Slackware. I would not know where to look for KDE sound settings or if I had actually found the right ones, or if they were even active. I have been through those settings before and I consider the KDE stuff to be half broken.
The KTimer does play some music, as said above.

There are some files it will not execute, and that is not likely due to sound settings.
KTimer given play and aplay commands will play sounds, ... but not if they are in a bash script.

Have a new problem, too.
I use system console for much of my work, because my editor works there, and many keypress commands do not respond when it is run from a kconsole. It was not this way in Linux 4.

Whenever I change to a system console, the KTimer STOPS TIMING.
I found this out when it had gone past the set time by 10 minutes without activating.

This is the same problem I had with one of the music players. It stops whenever the desktop is not running.

I have still not gotten it to play an alarm at any set time successfully.

As this KTimer will fail for SO MANY REASONS, it cannot be trusted as a timer, and I will abandon any hope of using it. Better to go buy some kitchen timer, something that I can trust.
 
Old 02-07-2024, 11:23 PM   #9
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,927

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
Quote:
Originally Posted by selfprogrammed View Post
I use system console for much of my work, because my editor works there, and many keypress commands do not respond when it is run from a kconsole.
Try xterm.
 
Old 02-08-2024, 04:28 AM   #10
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
There must be a simple reason behind all these but I am also confused as to what it is.

Quote:
Originally Posted by selfprogrammed View Post
As this KTimer will fail for SO MANY REASONS, it cannot be trusted as a timer, and I will abandon any hope of using it. Better to go buy some kitchen timer, something that I can trust.
Since you're running XFCE4, did you try the xfce4-timer-plugin (you can easily install it with sbopkg)?
 
Old 02-08-2024, 04:47 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
I think (probably) you want to use this timer in a strange environment, for example with different user or without DISPLAY or something similar. So it has no access right to read some files or play a sound or display something. But it is just a wild guess.
 
Old 02-08-2024, 07:35 AM   #12
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 907

Rep: Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697Reputation: 697
Quote:
Originally Posted by selfprogrammed View Post
Whenever I change to a system console, the KTimer STOPS TIMING.
I found this out when it had gone past the set time by 10 minutes without activating.
... and this surprised you? KTimer is a KDE desktop application. That's like asking for Firefox to display a desktop notification when you switch to console. I wouldn't be surprised if KTimer did actually fire, but the effects weren't seen because you were logged into a different session.

Use the right tool for the job. I'm guessing "at" will do what you want, but I'm not sure. I don't use it personally (nor KTimer).
 
2 members found this post helpful.
Old 02-08-2024, 05:04 PM   #13
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Kalarm is the same. I try to get it to play a/an mp3 or flac file and nothing happens, no popup letting me know something worked or didn't, nothing. All it's good for is popup messages, which is good enough, but I sure would like to have it play music files too, since it's *supposed* to when I want it to.
 
Old 02-08-2024, 08:58 PM   #14
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,986

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
Funny how both KAlarm and KTimer all work fine without issues. Slackware64-current, with KDE Plasma.
 
2 members found this post helpful.
Old 02-09-2024, 08:03 AM   #15
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 638

Original Poster
Rep: Reputation: 155Reputation: 155
I have many applications that run fine when I switch to a system console. I play music that way. There was one music player that was doing the same thing. It would not advance to the next song if the desktop was not current display. It is actually stranger that it should behave that way, than if it had just kept working. That behavior means that it is using KDE display ticks for something.

Flat out, something like KTimer should not be using KDE display ticks for a timer source. That makes it fragile and unreliable. It could have been implemented several ways that would be more reliable.
It is not that difficult.
There are several music players that can keep running. I use one almost every day that plays mp3 files, and they still manage to have desktop and accompanying graphics.

It is not without DISPLAY. The DISPLAY is there and working. It is just not the current display window, and is not being updated. Having multiple workspaces requires this ability.

It may be that the xfce4 timer will behave better. I am losing confidence, and would not rely upon that though, as too many of these apps are so fragile. I am spending way too much time diagnosing problems that should not have arisen in the first place.

Last edited by selfprogrammed; 02-09-2024 at 08:13 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] regression on -current with ktimer nobodino Slackware 2 04-23-2022 02:12 AM
Deja-Dup doesn't run as scheduled, trying to run duplicity manually dcroxton Linux - Software 1 08-07-2017 09:11 PM
Cron job scheduled to the server after logging in via ssh login doest not run surekag Linux - Newbie 4 02-12-2014 08:15 AM
Poweroff scheduled using atd: System does not power off. Borax_Man Linux - General 13 04-04-2009 02:14 AM
Ktimer Command Line? pacey2g Linux - Software 1 06-17-2006 06:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration