[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-xnee] can't get cnee to work into a cron
From: |
Henrik Sandklef |
Subject: |
Re: [Bug-xnee] can't get cnee to work into a cron |
Date: |
Tue, 4 Jun 2013 10:29:58 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Cron runs with no X. YOu need to start an X session first.
Have you tried Xfvb?
/h
Do something like:
----------------------------------------------------
#!/bin/sh
# Start virtual frame buffer server
Xvfb :20 &
# wait for it to start - not a scientific method ;)
sleep 3
# connect to the Xvfb display
export DISPLAY=:20
# launch the program to test
/opt/bin/program2test &
# launch Xnee
/usr/local/bin/cnee --replay --file /home/tester/program2test.xns
On Mon, May 20, 2013 at 12:29:49PM +0200, Bzzz wrote:
> On Mon, 20 May 2013 11:35:05 +0200
> Casper <address@hidden> wrote:
>
> > Maybe there are some missing environment variables... I think you'd
> > better to put this cnee command in your user crontab :)
>
> That I did, the cron is now run under my user's name instead of root.
>
> There was a segfault but it was because I logged to /dev/stderr.
>
> The /tmp/xnee.log and the e-mail shows everything's alright, but it
> doesn't work. I see my root terminal flipping to the next panel
> (because I did that at the end of the recording), but when I
> check my test site it shows the last login time was a manual one,
> not the cnee one.
>
> This is my mod'op:
>
> * I made a cron (into /etc/cron.d/) which is launched under my user's
> identity. It check if the executable is there and if so execute it.
>
> * The executable is a bash script that compute a delay before
> execution & a replay speed (75~100%), then it launches cnee
> as follow:
>
> RES=`DISPLAY=:0.0 /usr/bin/cnee --speed-percent $RND_REPLAY --replay --file
> /usr/local/NOIP-COM_KEEP_MY_ACCOUNT_AUTO/horde.defcon1.xns --err-file
> /tmp/xnee.log`
> # Set an output to show if the command has succeeded
> if [ "$RES" > 0 ]; then
> echo "AUTOMATIC CONNECTION TO NOIP-COM WITH LOGIN SUCCESS :) / RES=$RES"
> else
> echo "AUTOMATIC CONNECTION TO NOIP-COM WITH LOGIN FAILURE :(((((((( /
> RES=$RES"
> fi
> # Exit normally
> exit 1
>
>
> $RES has no printable value and if I strip "--verbose" from the command
> string, it echoes a failure, otherwise a success?!
>
> JY
> --
> Lao Tseu say: Man that scratch his butt at night
> awakes with stinking fingers.
>
> _______________________________________________
> Bug-xnee mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-xnee
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Bug-xnee] can't get cnee to work into a cron,
Henrik Sandklef <=