netflow linux xhost problem

netflow linux xhost problem

I have installed netflow analyzer 4010 in redhat linux and write a script in /etc/init.d and want to start the product automatically. But I found that I can display and show DISPLAY error. and I also add the two line in my script:
export DISPLAY=localhost:0.0
xhost +

But it has any result.I can only start the software in my linux console. Please tell me how to solve it and start the software include xhost enable.

Frank