Bug 332490 - command line not working, but works in terminal
Summary: command line not working, but works in terminal
Status: RESOLVED FIXED
Alias: None
Product: ktimer
Classification: Applications
Component: general (show other bugs)
Version: 20.04
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: A. Spehr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-24 04:07 UTC by Rodrigo
Modified: 2020-07-21 09:23 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 20.04.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo 2014-03-24 04:07:25 UTC
I put as command line:

rhythmbox /home/path/to/file/some_music.mp3

but it didn't play the music. There are no space in the path/filename,
and I have tried using "double quotes" around the filename and around
rhythmbox too. The command works in terminal.

Reproducible: Always



Expected Results:  
play the music, just like when the command is issued in terminal.
Comment 1 Boris Egorov 2014-11-25 16:25:18 UTC
(In reply to Rodrigo from comment #0)
> I put as command line:
> 
> rhythmbox /home/path/to/file/some_music.mp3
Are you sure you use absolute path? I can't reproduce it with absolute path, but with tilde it really don't work. There is a problem with tilde expansion, looks like it is expanded to ktimer binary directory instead of user home.
Comment 2 Daniel 2019-07-13 13:36:52 UTC
There is still a bug with the usage of QProcess in KTimer. As an example, I'm trying to start "/usr/bin/kate" with the KTimer which doesn't work.

Played around with the code in void KTimerJob::fire(), startDetached(d->command) did it's work as proc->setProgram(d->command); and proc->start(); does.

I am not that familiar with QProcess to get the issues on changing method, so perhaps anyone will do :)
Comment 3 Barafu Albino Cheetah 2020-05-03 18:45:28 UTC
Same problem here. Manjaro, kde frameworks 5.69.0. Command line "kdialog --msgbox Timeout!" does not show a message.
Comment 4 cat.alucardo 2020-05-30 01:56:34 UTC
[2020-04-26T13:25:02-0500] [ALPM] upgraded ktimer (19.12.3-1 -> 20.04.0-1)
mpv --volume=45 --length=5 --no-video music.mp3  ~fails
terminal-of-choice -e "command"  ~fails

terminal-of-choice  ~works
kcalc  ~works
vlc  ~works

vlc music.mp3  ~fails

echo "#!/bin/bash
mpv --volume=45 --length=5 --no-video music.mp3" > ktimer-executable-script
chmod 744 ktimer-executable-script
./ktimer-executable-script  ~works!

I have 2 versions of 19.x working and 2 of 20.x failing.
It seems any space causes it to fail.

Curiously, calibre crashed a few days earlier and I left the terminal open it appears to have caught some stuff from ktimer. Ktimer was not happy with "#!/bin/bash; mpv --volume=45 --length=5 --no-video music.mp3"

kdeinit5: Got EXEC_NEW '/usr/lib/qt/plugins/kf5/kio/man.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/qt/plugins/kf5/kio/man.so'
log_kio_man: STARTING
log_kio_man: QUrl("man:mpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!mpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/mpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bmpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bimpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/binmpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/mpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/bmpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/bampv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/basmpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/bashmpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/bash;mpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/bash; mpv --volume=45 --length=45 --no-video /home/#/music/1st")
log_kio_man: QUrl("man:!/bin/bash; mpv --volume=45 --length=5 --no-video /home/#/music/1st")
log_kio_man: Done
kdeinit5: PID 1507273 terminated.
^C

Im just using 19.x
Comment 5 Bug Janitor Service 2020-06-17 14:02:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/ktimer/-/merge_requests/1
Comment 7 Laurent Montel 2020-06-17 20:38:28 UTC
Git commit 0be87585e6f9584a904d9a60bd3d03f9a8375c21 by Laurent Montel, on behalf of Alexander Lohnau.
Committed on 17/06/2020 at 20:38.
Pushed by mlaurent into branch 'release/20.04'.

Fix command lines with arguments

M  +1    -1    ktimer.cpp

https://invent.kde.org/utilities/ktimer/commit/0be87585e6f9584a904d9a60bd3d03f9a8375c21
Comment 8 Alexander Lohnau 2020-07-21 09:23:30 UTC
*** Bug 424349 has been marked as a duplicate of this bug. ***