digitalmars.D.learn - Linux(kubuntu) Problem
- Wolftousen Frozenwind (12/12) Mar 27 2008 A bit of information before i get to the meat of the issue.
- Wolftousen Frozenwind (20/20) Mar 27 2008 Moved files to the home folder to attempt to run and got this error when...
- Wolftousen Frozenwind (1/1) Mar 27 2008 Forgot, those errors occured while in command line as root and not my ac...
- gide _nospam_btinernet.com (9/29) Mar 28 2008 It is possible that display has not been set or your local machine is
- Wolftousen Frozenwind (4/45) Mar 28 2008 Not super worried about the x server not wanting to create my window whe...
- Tower Ty (22/25) Mar 29 2008 with Linux when an executeable does not do anything it may not have the ...
- Tower Ty (1/1) Mar 29 2008 Mine are in Tango by the way
- Wolftousen Frozenwind (4/5) Mar 29 2008 When i'm in the folder with the executable inside the kconsole, and type...
- Neil Vice (3/21) Mar 30 2008 It sounds like that may just be a "feature" of Dolphin perhaps?
A bit of information before i get to the meat of the issue. I'm using kubuntu 7.10 OS I'm using Eclipse IDE Program uses SDL for windowing/key/mouse input Program uses OpenGL for graphics Using Phobos Compiling the program presents 0 errors. When i tell eclipse to run it, it runs just fine as it is expected to. When I tell command line to run it, it runs just fine as it is expected to. Problem is, when i click the icon from within the folder, it fails to run b/c it doesn't load the files i need it to that hold textures. It also doesn't write to any files if i tell it to. Tried as root and still wont run properly. I'm using write, append, read from std.file. Are there other read/write functions I should be using?
Mar 27 2008
Moved files to the home folder to attempt to run and got this error when i attempted to run it from command line: Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified ---------------------- DirectFB v0.9.25 --------------------- (c) 2000-2002 convergence integrated media GmbH (c) 2002-2004 convergence GmbH ----------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2007-08-07 19:21) (*) Direct/Memcpy: Using MMX optimized memcpy() (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system' core! --> Initialization error! Segmentation fault (core dumped) No change in being able to run it by clicking the icon though, still very puzzled
Mar 27 2008
Forgot, those errors occured while in command line as root and not my account...
Mar 27 2008
On Thu, 27 Mar 2008 13:37:51 -0400, Wolftousen Frozenwind <eliot.darkwolf gmail.com> wrote:Moved files to the home folder to attempt to run and got this error when i attempted to run it from command line: Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified ---------------------- DirectFB v0.9.25 --------------------- (c) 2000-2002 convergence integrated media GmbH (c) 2002-2004 convergence GmbH ----------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2007-08-07 19:21) (*) Direct/Memcpy: Using MMX optimized memcpy() (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system' core! --> Initialization error! Segmentation fault (core dumped) No change in being able to run it by clicking the icon though, still very puzzledIt is possible that display has not been set or your local machine is not allowed X server connections. Try entering the command 'xhost +' as root or setting the DISPLAY environment variable to your local machine, e.g. export DISPLAY="localhost:0.0" Hope this helps. Gide
Mar 28 2008
gide _nospam_btinernet.com Wrote:On Thu, 27 Mar 2008 13:37:51 -0400, Wolftousen Frozenwind <eliot.darkwolf gmail.com> wrote:Not super worried about the x server not wanting to create my window when i'm running as root, but thanks for the advice and will try it once i get whatever other error is going on fixed. I added in additional error handling code to try and locate what was going on and found for certain that when using the void[] read(char[] filename) and void write(char[] filename, void*) functions that they don't do anything when not running my program from within the console or from within eclipse. has anyone else had an error like this or should i be using different functions for read/write from the std.file module?Moved files to the home folder to attempt to run and got this error when i attempted to run it from command line: Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Xlib: connection to ":0.0" refused by server Xlib: No protocol specified ---------------------- DirectFB v0.9.25 --------------------- (c) 2000-2002 convergence integrated media GmbH (c) 2002-2004 convergence GmbH ----------------------------------------------------------- (*) DirectFB/Core: Single Application Core. (2007-08-07 19:21) (*) Direct/Memcpy: Using MMX optimized memcpy() (!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed --> No such file or directory (!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable. (!) DirectFB/Core: Could not initialize 'system' core! --> Initialization error! Segmentation fault (core dumped) No change in being able to run it by clicking the icon though, still very puzzledIt is possible that display has not been set or your local machine is not allowed X server connections. Try entering the command 'xhost +' as root or setting the DISPLAY environment variable to your local machine, e.g. export DISPLAY="localhost:0.0" Hope this helps. Gide
Mar 28 2008
I added in additional error handling code to try and locate what was going on and found for certain that when using the void[] read(char[] filename) and void write(char[] filename, void*) functions that they don't do anything when not running my program from within the console or from within eclipse. has anyone else had an error like this or should i be using different functions for read/write from the std.file module?with Linux when an executeable does not do anything it may not have the correct permissions set . Could this be your problem here? Check executeable,owner and group are what you want. You must be in the same directory as the executeable or have the $PATH set to where it is or and more . But explain what you mean by run in console and run in eclipse? Here is some of the stuff I use char[] input = cast(char[])File("number.int").read; char[][] readFile() { auto content = cast(char[][]) File("outfile.txt").read; void writeFile(char[][] content) { File output = new File ("outfile.txt"); try{ output.write(content); Stdout("Successfully over-wrote to file 'outfile.txt'").newline;} catch (AddressException xy){ Stdout("A file exception occured: " ~ xy.toString()).newline;} void writeNo(int docno) { File output = new File ("number.int"); try{ void[] y = to!(char[])(docno); output.write(y); Stdout("Successfully over-wrote to file 'number.int'").newline;} catch (AddressException xy){ Stdout("A file exception occured: " ~ xy.toString()).newline;} }
Mar 29 2008
Tower Ty Wrote:You must be in the same directory as the executeable or have the $PATH set to where it is or and more . But explain what you mean by run in console and run in eclipse?When i'm in the folder with the executable inside the kconsole, and type ./program_name, the program runs just fine. Finds all the files and loads the properly. Same with eclipse, right after i compile, i click run as D program and it runs just fine, loading all the files properly. I was running into problems when running it by clicking the program icon inside the Dolphin (folder explorer). I found (should have check this before posting) that when you run in eclipse or console that it uses the directory you are in (knew this, didn't think about it till just now) and that when you click a executable icon, no matter where you click it from, your directory changes to /home/user_name... which was causing my files to not be found and thus not loaded... resolved the error by using getcwd() and changing my directory within the program before loading files... haven't done much file io in linux so this was a good learning experience...
Mar 29 2008
"Wolftousen Frozenwind" <eliot.darkwolf gmail.com> wrote in message news:fsn85h$2812$1 digitalmars.com...Tower Ty Wrote:It sounds like that may just be a "feature" of Dolphin perhaps?You must be in the same directory as the executeable or have the $PATH set to where it is or and more . But explain what you mean by run in console and run in eclipse?When i'm in the folder with the executable inside the kconsole, and type ./program_name, the program runs just fine. Finds all the files and loads the properly. Same with eclipse, right after i compile, i click run as D program and it runs just fine, loading all the files properly. I was running into problems when running it by clicking the program icon inside the Dolphin (folder explorer). I found (should have check this before posting) that when you run in eclipse or console that it uses the directory you are in (knew this, didn't think about it till just now) and that when you click a executable icon, no matter where you click it from, your directory changes to /home/user_name... which was causing my files to not be found and thus not loaded... resolved the error by using getcwd() and changing my directory within the program before loading files... haven't done much file io in linux so this was a good learning experience...
Mar 30 2008