Registered Member
|
I originally posted this in the KDE section of the Linux Mint Forums on January 17, 2014 and have so far gotten no response. I thought I would post it here
in hopes of getting some help: My cron environment has changed in Linux Mint 16 KDE (Petra 64 bit) from prior releases of Linux Mint (11-15). I need help restoring it to pre-Petra release environment. In earlier releases of Linux Mint KDE (11-15) my cron job worked. Now in 16 (Petra) it no longer works because kmix service is not available. Here is the command in my /etc/crontab:
The purpose of the routine is to use qdbus to mute or unmute sound volume at different times of day when executed from cron. My routine works from Konsole and at but not in cron. Can someone tell me how to get the kmix service available in cron again? Here's the output from cron in Linux Mint 16 KDE where I issue 3 separate commands (failed routine): (1) qdbus
(2) qdbus org.kde.kmix
(3) qdbus org.kde.kmix /kmix/KMixWindow/actions/mute org.qtproject.Qt.QAction.trigger
Here's the output from cron in Linux Mint 14 KDE where I issue the same 3 separate commands (routine works): (1) qdbus
(2) qdbus org.kde.kmix
(3) qdbus org.kde.kmix /kmix/KMixWindow/actions/mute org.qtproject.Qt.QAction.trigger
I do not see where the services are initialized in the crond script. I have posted the same request for help on the kde forum as well since I do not know if this is a KDE, Linux Mint KDE, or a QT issue. I have had to change a number of things to get cron and IPCs to work on this version of LM.
Migrated from Linux Mint 17.3/18.3 KDE to KDE neon User Edition.
|
Manager
|
first I am clueless about any of this but that won't stop me from making a suggestion - try using kalarm instead of cron
|
Registered Member
|
Thank you for the suggestion. Kalarm does work. I had to start akonadi before kalarm would work. I get no mail output like I do with cron, and I had to invoke the rexx routine with a script (toggle_mute.sh) in kalarm. I will experiment more with kalarm and mark your suggestion as the solution once I get it sorted out. My guess is that kalarm is working in an environment similar to at rather than the cron environment. Thanks again for the suggestion. I will follow up.
Migrated from Linux Mint 17.3/18.3 KDE to KDE neon User Edition.
|
KDE Developer
|
did you set up your mail client in the settings?
I'm not familiar with rexx, but doesn't it have a hashbang-compatible interpreter? if so, you should be able to just mark it as executable. and as for the reason it broke, I guess the Linux Mint people have changed something related to which dbus session the cron daemon is able to connect to. |
Registered Member
|
I think you are correct there. I had to make changes to qt4 and qt5 to get cron to see dbus. Something was dropped on the move from LM 15 to LM16. Google01103 suggested using Kalarm. It is a workaround but a nice way to deal with muting/unmuting volumes. The problem remains with cron and its environment. I will try to get the problem communicated to the Linux Mint people. Thank you both for your help and suggestions.
Migrated from Linux Mint 17.3/18.3 KDE to KDE neon User Edition.
|
Registered Member
|
While I have no direct solution here, I think that there should be some output somewhere. Either a mail (look in ALL mailboxes, also from root, specific "cron" users and so on) or in a logfile. There are various possible issue I can think of:
- Permission problem, like not allowed to connect to the desktop session. But often it is enough to set DISPLAY like you do, or described in my Blog: http://kmix5.wordpress.com/2013/12/28/k ... e-control/ - KMix not (yet) running. But this will only be a problem when logging in, not when you let your PC running. - Wrong desktop session selected From your post it is obvious that a dbus session is there, but no "real" apps, not even KWin or Plasma is there. Could it be that Mint 16 has a secondary X11 session running somewhere? IS DISPLAY really correctly set, or are you suddenly on DISPLAY=:1 or DISPLAY=:47. Would you check that? |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]