linux - Unable to run X11 (graphical) programs from atd -
i trying schedule execution of shell-script linux tool "at". shell script (video.sh) looks this:
#!/bin/sh /usr/bin/vlc /home/x/video.mkv
the "at" command:
at -f /home/x/video.sh -t 201411052225
when time arrives, nil happens.
i can execute shell-script fine via console or rightclicking - execute. vlc starts supposed to. if alter script e.g. simple like
#!/bin/sh touch something.txt
it works fine.
any ideas, why "at" not execute script starts graphical program? how can create work?
you're trying run x command (a graphical program) @ scheduled time. extremely difficult, , quite fragile, because script won't have access x server.
at least, need set display
right value, then, suspect have issues authorisation utilize x screen.
try setting :0.0
, see if works. if you're logged out, or screensaver's on, or number of other things...
(also, redirect vlc's stdout , stderr file can see went wrong.)
your best bet might seek xuserrun.
linux shell
No comments:
Post a Comment