X, cron & access control - Xwindows

This is a discussion on X, cron & access control - Xwindows ; I have a machine that does very little other than act as a cvs-server. Since it sits idle for most of its life, I was hoping to take advantage of the time by running some simulations during the night. The ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: X, cron & access control

  1. X, cron & access control

    I have a machine that does very little other than act as a cvs-server.
    Since it sits idle for most of its life, I was hoping to take
    advantage of the time by running some simulations during the night.

    The problem is this: the simulation is written in Tcl/Tk, and
    unfortunately requires creating/manipulating windows, even though no
    actual interaction is necessary. I've had trouble scheduling this
    process as a cron job, because the display is unavailable. I assume
    this is because cron is running as root, and since root isn't logged
    in, it doesn't have access to the display. (i.e. I've tried setting
    DISPLAY=:0 to no avail).

    I assume that its possible to disable access control completely using
    'xhost -', but what I'd really like to do is just allow processes
    running locally access to the display. Is this possible? If so, how
    do what config files should I modify in order to ensure that this
    behavior is maintained after a reboot?

    Thanks,

    -S

  2. Re: X, cron & access control

    >>>>> "S" == S Wallace writes:

    S> I have a machine that does very little other than act as a cvs-server.
    S> Since it sits idle for most of its life, I was hoping to take advantage
    S> of the time by running some simulations during the night.

    S> The problem is this: the simulation is written in Tcl/Tk, and
    S> unfortunately requires creating/manipulating windows, even though no
    S> actual interaction is necessary.

    You might like to check some dummy X servers. They are for programs you just
    described, i.e. programs that draw to the X display even if nothing is
    needed. Check for example http://www.itworld.com/AppDev/1461/UIR000330xvfb/
    on the xvfb, it seems to me they describe your problem:

    "I've got this cool image converter/graph generator/network
    monitor/whatever that I want to use to generate daily reports for my
    boss. I've got it all figured out, and it runs automatically, but when I
    put it in crontab it doesn't work. Now what?" That person probably needs
    Xvfb. There are a lot of situations like that: an application insists on
    a DISPLAY, but doesn't really require anyone to see what's there. Xvfb is
    great for such jobs.




    --
    Arto V. Viitanen av@cs.uta.fi
    University of Tampere, Department of Computer and Information Sciences
    Tampere, Finland http://www.cs.uta.fi/~av/

+ Reply to Thread