Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 33

Thread: crontab: How to run GUI programs with cron

  1. #11
    Join Date
    Dec 2007
    Beans
    11

    Re: crontab: How to run GUI programs with cron

    I've been going crazy trying to figure out why I can't get deluge working...

    I'm trying to schedule my torrents to automatically turn on at night after I sleep, so I have this in my crontab:

    41 11 * * * DISPLAY=:0 && /usr/bin/deluge

    (The time there is just for testing purposes) basically it seems to execute this command but nothing runs. Anyone have any idea would I could be doing wrong?

  2. #12
    Join Date
    Jan 2007
    Beans
    36

    Re: crontab: How to run GUI programs with cron

    Quote Originally Posted by sidefx2 View Post
    I've been going crazy trying to figure out why I can't get deluge working...

    I'm trying to schedule my torrents to automatically turn on at night after I sleep, so I have this in my crontab:

    41 11 * * * DISPLAY=:0 && /usr/bin/deluge

    (The time there is just for testing purposes) basically it seems to execute this command but nothing runs. Anyone have any idea would I could be doing wrong?
    here's my working one:
    0 0 * * * export DISPLAY=:0 && deluge #start torrents
    0 6 * * * killall -9 deluge #stop torrents
    you're just missing "export" in your line, it seems

  3. #13
    Join Date
    Dec 2007
    Beans
    11

    Re: crontab: How to run GUI programs with cron

    That was the problem, thanks a lot!

  4. #14
    Join Date
    Jul 2006
    Beans
    170

    Re: crontab: How to run GUI programs with cron

    Is there a way to select which Desktop the application opens on?

    I'm using crontab to stop and start klibido and it works great. However I would like to open on Desktop 2 if possible?

    Thanks

  5. #15
    Join Date
    Apr 2005
    Location
    Sintra, Portugal
    Beans
    835

    Re: crontab: How to run GUI programs with cron

    Quote Originally Posted by FooAtari View Post
    Is there a way to select which Desktop the application opens on?

    I'm using crontab to stop and start klibido and it works great. However I would like to open on Desktop 2 if possible?

    Thanks
    Just change the

    DISPLAY=:0

    to the number of the display where you want to run the application.

    ex:

    DISPLAY=:1

    or

    DISPLAY=:2

  6. #16
    Join Date
    Jul 2006
    Beans
    170

    Re: crontab: How to run GUI programs with cron

    Hmmm, Ok, ill try that. When I tried it before Klibido didn't load at all. Maybe I made a mistake though I'll try it again

    Ta

  7. #17
    Join Date
    Apr 2005
    Location
    Sintra, Portugal
    Beans
    835

    Re: crontab: How to run GUI programs with cron

    Quote Originally Posted by FooAtari View Post
    Hmmm, Ok, ill try that. When I tried it before Klibido didn't load at all. Maybe I made a mistake though I'll try it again

    Ta
    On the display you want to run the application, run the following command (from a terminal emulator):

    Code:
    echo $DISPLAY
    It will give you something like this, (according to the display you’re running):

    :0.0

    For instance, I opened another display through issuing a

    Code:
    xinit -- :2
    and when I ran

    Code:
    echo $DISPLAY
    I got:

    :2.0

  8. #18
    Join Date
    Jul 2006
    Beans
    170

    Re: crontab: How to run GUI programs with cron

    Ok I get 0.0 on both desktops

    Maybe I wasn't clear. I only have one display, maybe workspace is a better word. I want to open Klibido on workspace 2.

  9. #19
    Join Date
    Apr 2005
    Location
    Sintra, Portugal
    Beans
    835

    Re: crontab: How to run GUI programs with cron

    Quote Originally Posted by FooAtari View Post
    Ok I get 0.0 on both desktops

    Maybe I wasn't clear. I only have one display, maybe workspace is a better word. I want to open Klibido on workspace 2.
    For that you will have to mess with your window manager options or use some software like Devil’s Pie. I’m not sure if this helps.

  10. #20
    Join Date
    Jul 2006
    Beans
    170

    Re: crontab: How to run GUI programs with cron

    I'll figure something out. Thanks for trying

Page 2 of 4 FirstFirst 1234 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •