Xwindow's program will not run when executed on boot or when executed remotely
I have written and tested an SDL graphics program. It is a very basic program that just displays a bitmap over the whole screen (not in a window). It works very well on my FC12 machine when I type ./screen_test in the shell. It also works well on my embedded computer (with it's own monitor) when I type ./screen_test in its shell.
Here is the problem: When I ssh into the embedded computer and type ./screen_test I get an error when executing the part of the code that draws to the screen. (This confusions some so let me explain. I want the program to run on and display on the embedded computer, I am just launching it from my laptop by sshing into it.) I have the same problem when I set up a shell script to run the program automatically on boot. After X11 is launched on my embedded computer, "screen_test" is run automatically by a shell script, but I get the same error. Cause: I believe the cause is that the <user???> running the program doesn't have the ability to control the frame buffer. Can some one help shed some light on this problem? Being verbose on my comments would be helpful, I am kinda new to linux. thanks, Rich |
When running from a boot script, does setting the display help?
eg Code:
DISPLAY=:0.0 ./screen_test |
Holy stink'n cow! THAT'S IT! I have looked all week for a fix to this problem. I have even tried:
# DISPLAY=:0.0 #./test_prog but it didn't work. However, trying your sugestion: $ DISPLAY=:0.0 ./test_prog IT WORKS! Thank you for your help. |
All times are GMT -5. The time now is 07:14 PM. |