Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
March 29, 2008 Re: Linux(kubuntu) Problem | ||||
---|---|---|---|---|
| ||||
gide@_nospam_btinernet.com Wrote:
> 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 puzzled
>
>
> It 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
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?
|
March 30, 2008 Re: Linux(kubuntu) Problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Wolftousen Frozenwind | > 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;} } |
March 30, 2008 Re: Linux(kubuntu) Problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tower Ty | Mine are in Tango by the way |
March 30, 2008 Re: Linux(kubuntu) Problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tower Ty | 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...
|
March 30, 2008 Re: Linux(kubuntu) Problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Wolftousen Frozenwind | "Wolftousen Frozenwind" <eliot.darkwolf@gmail.com> wrote in message news:fsn85h$2812$1@digitalmars.com... > 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... It sounds like that may just be a "feature" of Dolphin perhaps? |
Copyright © 1999-2021 by the D Language Foundation