User forums > General (but related to Code::Blocks)
CodeBlocks being called from hudson (on linux)
Jenna:
You can try to export your display before running C::B.
It's most likely :0.0, export DISPLAY=:0.0 should work, if it is done immediately befor running C::B (and if it' the correct display of course).
Jenna:
Or make hudson start a new X on a specified display, set the DISPLAY variable and start C::B.
killerbot:
oh boy, I am staring to feel a real linux newbie ;-)
Followed your suggestion, no luck (yet) :
--- Code: ---+ export DISPLAY=:0.0
+ DISPLAY=:0.0
+ /usr/local/bin/codeblocks --no-check-associations --no-dde --no-splash-screen --rebuild --target=Debug Arrays/Arrays.cbp
No protocol specified
Error: Unable to initialize gtk, is DISPLAY set properly?
--- End code ---
When I do in a shell (during my regular login ) :
--- Code: ---killerbot@thorgal:~/CodeBlocks/trunk> echo $DISPLAY
:0
--- End code ---
so I also tried "export DISPLAY=:0", same result, no luck.
--- Quote ---Or make hudson start a new X on a specified display, set the DISPLAY variable and start C::B.
--- End quote ---
No clue on how to do that (I know something like startx exists, but ...)
Jenna:
So, now I'm back home:
the following script works for me from a real console:
--- Code: ---#!/bin/sh
cd /home/jens/codeblocks-build/codeblocks.trunk/src
xinit -e "export LC_ALL=en_US.UTF-8; codeblocks --build CodeBlocks-unix.cbp; codeblocks --build ContribPlugins-unix.workspace ;./update" -- :101
--- End code ---
it changes in my C::B test directory and starts an xserver via xinit.
xinit calls xterm with the arguments before "--" and start an xserver on display 101 (should not be used normaly).
I build the whole C::B in an english environment and run the update-script.
xinit might behave different on other distros, if it does not work you should read the man-page.
killerbot:
that did start a CB, but strange stuff, both my monitors turned black, in the upper left corner you could see the CB starting and the plugins loading (as you would get when starting CB in shell), then again in the upper left part CB became visible (like a very first start if CB) and saying it detected the compiler. But no project was building ...
Tried it a second time, same thing. Seems this is not yet the solution.
EDIT : I called the same thing in a regular shell, just for testing purposes :
--- Code: ---xinit -e '/usr/local/bin/codeblocks --no-check-associations --no-dde --no-splash-screen --rebuild --target=Debug Arrays/Arrays.cbp' -- :101
--- End code ---
The screens turning black, and then CB visible (no compiler detected window here).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version