bojo Posted January 19, 2004 Report Share Posted January 19, 2004 Hi Guys, I am trying to configure a personal crontab for using kalarm. Kind of b-day reminders. kalarm "this is my message" from the command prompta works good - it displays the window with the text inside - what I want. however when I put it in a personal crontab and try to run it from webmin - to see if it works it gives me error. Output from command /usr/bin/kalarm "imash rojden den" .. Aborting. $HOME is not set. ERROR: KUniqueApplication: Pipe closed unexpected. any ide how can I fix this? 0 10,14 22 1 * /usr/bin/kalarm "imash rojden den" this is the line from the crontab file (it is not the main one - /etc/crontab but a personal one that executes the command as myself) Thanks bojo Quote Link to comment Share on other sites More sharing options...
Qchem Posted January 19, 2004 Report Share Posted January 19, 2004 Have you tried running it as a script from cron - the #!/bin/bash should set the necessary variables. Quote Link to comment Share on other sites More sharing options...
aru Posted January 20, 2004 Report Share Posted January 20, 2004 Hi Guys,I am trying to configure a personal crontab for using kalarm. Kind of b-day reminders. cron runs in it's own environment, if you want to run a graphical application from cron you'll need to provide that particular environment some variables it doesn't have but it needs to succeed. For example, if you are setting a system crontab for launching kalarm in your particular user's running desktop you'll need to tell cron where to run (the display) and who owns it. For example this might work (since "su - USER" launches a USER's login shell (with all the USER environment), also you'll need to provide the display where X is running): # normal system crontab. # launching kalarm into user Foo's desktop: */5 * * * * su - Foo -c 'DISPLAY=:0.0 kalarm "this is my message"' There are different ways of doing the same, but IMHO this one is the easier to understand. See "man su", "man 5 crontab" and "man X" for details. HTH Quote Link to comment Share on other sites More sharing options...
bojo Posted January 20, 2004 Author Report Share Posted January 20, 2004 Thank you so much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.