How do I get GUI Apps to run from crontab under XFce 4.4.2?

Brian J. Tarricone bjt23 at cornell.edu
Mon Oct 27 06:15:08 CET 2008



On Sun, 26 Oct 2008 23:55:03 -0400 Erik Harrison wrote:

> On Sun, Oct 26, 2008 at 10:10 PM, Todd and Margo Chester
> <ToddAndMargo at verizon.net> wrote:
> > Todd and Margo Chester wrote:
> >> Erik Harrison wrote:
> >>
> >>>> It looks like it is trying to start, but doesn't finish. I think
> >>>> it is not finding Todd's XFce 4.4.2?
> >>> I dunno anything about Virtual Box, but I would guess it can't
> >>> connect to X because it doesn't know the display. If Virtual Box
> >>> supports something like --display you could use that, or just
> >>> manually set $DISPLAY in your shell script.
> >>>
> >>
> >> Thank you for the help!
> >>
> >> I go to the customer's site next Wednesday or Thursday.
> >> I will try something like this:
> >>
> >>       DISPLAY=:0.0
> >>       export DISPLAY
> >>       EchoAll "Restarting VirtualXP"
> >>       EchoAll "su todd  -c /usr/bin/VBoxManage startvm VirtualXP"
> >>       EchoAll "`su todd  -c "/usr/bin/VBoxManage startvm
> >> VirtualXP"`" EchoAll " "
> >
> > Hi All,
> >
> > Got this back from the Virtual Box group:
> >
> >     http://forums.virtualbox.org/viewtopic.php?p=43159#43159
> >     Todd, whilst I think on you will need to read on how X
> >     authorization works with cookies and XAUTHORITY etc.
> >     Basically the display uses a security model to prevent
> >     rogue processes hijacking the display. There are ways
> >     to get around this, but you need to read up on it.
> >
> > I have not a clue where to start.  Anyone know where to
> > point me?  Any good references?
> 
> Most definitely not Xfce related at this point,

Hell, this entire thread isn't ^_~.

> but I'm willing to guess that man xhost will get you started.

Actually, that would be the somewhat complicated way.  If you only care
that this can run while you're logged into your X session, simply
setting XAUTHORITY=$HOME/.Xauthority should work fine.  As long as this
script runs as the same user that's logged into X, that'll work.  If
it's a different user, then it can be a problem (unless it's running as
root, which of course will be able to see the files in your homedir).

	-brian



More information about the Xfce mailing list