[Mono-osx] Still trouble with 1.1.17

Andrew Satori dru at druware.com
Tue Sep 5 09:48:28 EDT 2006


You may have to also do an xhost <youriphere> in X11.  I have seen  
issues where apps launched from Finder or TErminal will connect to X  
using the ip and not localhost and X denies the connection.

In order to ensure that the environment is correct, try running the  
script from an X11 Xterm instead of Terminal.app, That will help you  
isolate the environment issues, to seperate the problems as being  
Mono versus X environment.

Andyu

On Sep 1, 2006, at 7:07 PM, Ken & Deb Allen wrote:

> First, doing a "cd DoubleElimination.app/Contents/Resources" and then
> "mono DoubleElimination.exe" presents the same results as double-
> clicking the application, except all of the output comes to Terminal
> rather than being sent to Console.
>
> The script "DoubleElimination.app/Contents/MacOS/DoubleElimination"
> contained a line that defined X11_MODE as zero (0), so I manually
> changed this to a one (1), at which point the error text ": unknown
> application: DoubleElimination" was sent to the Console when I double-
> clicked the application. I edited the script so that the launch line
> read [open-x11 "$APP_NAME.exe"] and the following text was sent to
> the Console:
>
>> /Users/krallen/Development/Mono/DoubleElimination/
>> DoubleElimination.app/Contents/Resources/DoubleElimination.exe: /
>> Users/krallen/Development/Mono/DoubleElimination/
>> DoubleElimination.app/Contents/Resources/DoubleElimination.exe:
>> cannot execute binary file
>
> I modified my build script to use the "-m:x11" switch and this
> corrected the setting in the script. When I double-click the script
> now, the above error is now being displayed. If X11 is not active
> when the applicationis double-clicked, then it is launched
> automatically.
>
> Inserting a line reading [echo "Display: $DISPLAY"] into the script
> reveals that the variable is not set, but this does not seem to be
> presenting a direct problem. Adding a line reading [DISPLAY=":0.0"]
> to the beginning of the script does not change the behaviour.
>
> -ken
>
> On 1-Sep-06, at 3:38 PM, Aaron Flynt wrote:
>
>> You should also be able to launch apps via the command line now by
>> simply changing into the directory of the .exe and typing mono
>> appname.exe. Kangaroo added this ability some time ago. Perhaps
>> that would help.
>>
>> You can also try editing the script generated by macpack
>> (AppName.app/Contents/MacOS/AppName) to define the DISPLAY variable
>> at run time.
>>
>> -=Aaron=-
>>
>> On Sep 1, 2006, at 3:28 PM, Ken & Deb Allen wrote:
>>
>>> Yes, I did log out and back in, with no change in function.
>>>
>>> As I mentioned, I edited both ~/.tshrc and /etc/bashrc files to
>>> define the DISPLAY variable with the string ":0.0", and this value
>>> is reflected with a "echo $DISPLAY" command from the "Terminal"
>>> application. I am not certain how to ascertain whether this
>>> specific environment variable is available to the launched Mono
>>> application or not.
>>>
>>> -ken
>>>
>>> On 1-Sep-06, at 2:51 PM, Aaron Flynt wrote:
>>>
>>>> Did you log out then back in again? Are you getting the right
>>>> value back from echo $DISPLAY now?
>>>>
>>>> -=Aaron=-
>>>>
>>>> On Sep 1, 2006, at 2:35 PM, Ken & Deb Allen wrote:
>>>>
>>>>> Initially this variable was not set. I added a "setenv" line to
>>>>> my .tschrc file, setting it to the value you indicated, but the
>>>>> results were unchanged, whether X11 was started at the time or
>>>>> not. I added the lines you indicated to the /etc/bashrc file,
>>>>> but this also seemed to make no difference. Is there some other
>>>>> location from which a double-clicked application should pick up
>>>>> this type of environment variable?
>>>>>
>>>>> -ken
>>>>>
>>>>> On 1-Sep-06, at 1:53 PM, Aaron Flynt wrote:
>>>>>
>>>>>> What do you get when you open Terminal.app, and type "echo
>>>>>> $DISPLAY"? I think maybe /etc/bashrc doesn't set the display
>>>>>> environment variable on a default install. I have the following
>>>>>> in mine:
>>>>>>
>>>>>> #Set the 'DISPLAY' environmental variable for running X11 apps
>>>>>> from terminal:
>>>>>> DISPLAY=:0.0
>>>>>> export DISPLAY
>>>>>>
>>>>>> Perhaps the LOADER script in mcs/tools/macpack should be
>>>>>> modified to set the DISPLAY variable if the X11 backend is
>>>>>> being used. Maybe test to see if it's empty and set it to some
>>>>>> reasonable default (like :0.0) if necessary.
>>>>>>
>>>>>> Aaron Flynt
>>>>>>
>>>>>> On Sep 1, 2006, at 12:49 PM, Ken & Deb Allen wrote:
>>>>>>
>>>>>>> Previously with 1.1.16 on MacOS X there were a number of  
>>>>>>> problems
>>>>>>> reported launching Mono applications that used System Windows
>>>>>>> Forms,
>>>>>>> all revolving around the inability to locate specific
>>>>>>> libraries, all
>>>>>>> of which actually appeared to be present.
>>>>>>>
>>>>>>> This seems to be have been resolved with the 1.1.17.1 release,
>>>>>>> but I
>>>>>>> still cannot get the application to execute.
>>>>>>>
>>>>>>> I downloaded and installed the new Mono release, compiled and
>>>>>>> macpacked the application code, and when I double-click on the
>>>>>>> application from the Finder, the program starts to load and then
>>>>>>> crashes. I then explicitly started the X11 program and again
>>>>>>> double-
>>>>>>> clicked my built application, with the same result.
>>>>>>>
>>>>>>> The following is the console output from attempting to execute
>>>>>>> the
>>>>>>> built program. I can provide the simple source files and build
>>>>>>> script
>>>>>>> to any who want to attempt to reproduce this problem. I should
>>>>>>> note
>>>>>>> that this is a 'clean' Mono installation, with no extra
>>>>>>> configuration
>>>>>>> attempts or environment variables manually set. I have simply
>>>>>>> been
>>>>>>> installing each version of Mono as it becomes available and then
>>>>>>> attempting to execute the code. I should also note that this
>>>>>>> exact
>>>>>>> same code loaded and ran under 1.1.13, although the forms
>>>>>>> rendering
>>>>>>> on the screen had a large number of problems.
>>>>>>>
>>>>>>>
>>>>>>> ----> Initial console information from first attempt to
>>>>>>> execute the
>>>>>>> built application.
>>>>>>>> Mono System.Windows.Forms Assembly [$auto_build_revision$]
>>>>>>>>
>>>>>>>> Unhandled Exception: System.TypeInitializationException: An
>>>>>>>> exception was thrown by the type initializer for
>>>>>>>> System.Windows.Forms.XplatUI ---> System.ArgumentNullException:
>>>>>>>> Could not open display (X-Server required. Check you DISPLAY
>>>>>>>> environment variable)
>>>>>>>> Parameter name: Display
>>>>>>>>   at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr
>>>>>>>> display_handle) [0x00000]
>>>>>>>>   at System.Windows.Forms.XplatUIX11..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000]
>>>>>>>>   at System.Windows.Forms.XplatUI..cctor () [0x00000] ---  
>>>>>>>> End of
>>>>>>>> inner exception stack trace ---
>>>>>>>>
>>>>>>>>   at <0x00000> <unknown method>
>>>>>>>>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
>>>>>>>>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
>>>>>>>>   at System.Windows.Forms.Control..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.ScrollableControl..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.ContainerControl..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.Form..ctor () [0x00000]
>>>>>>>>   at EliminationTournament.ControlForm..ctor
>>>>>>>> (System.Drawing.Icon
>>>>>>>> FormIcon) [0x00000]
>>>>>>>>   at (wrapper remoting-invoke-with-check)
>>>>>>>> EliminationTournament.ControlForm:.ctor (System.Drawing.Icon)
>>>>>>>>   at EliminationTournament.ControlForm.Main () [0x00000]
>>>>>>>>
>>>>>>> ----> Console information from launching X11
>>>>>>>> XFree86 Version 4.4.0 / X Window System
>>>>>>>> (protocol Version 11, revision 0, vendor release 6600)
>>>>>>>> _XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
>>>>>>>> [DRI] screen 0 installation complete
>>>>>>>> Screen 0 added: 1440x900 @ (0,0)
>>>>>>>> Could not init font path element /usr/X11R6/lib/X11/fonts/CID/,
>>>>>>>> removing from list!
>>>>>>> ----> Console information from launching the Mono application
>>>>>>> after
>>>>>>> X11 was launched and running.
>>>>>>>> Mono System.Windows.Forms Assembly [$auto_build_revision$]
>>>>>>>>
>>>>>>>> Unhandled Exception: System.TypeInitializationException: An
>>>>>>>> exception was thrown by the type initializer for
>>>>>>>> System.Windows.Forms.XplatUI ---> System.ArgumentNullException:
>>>>>>>> Could not open display (X-Server required. Check you DISPLAY
>>>>>>>> environment variable)
>>>>>>>> Parameter name: Display
>>>>>>>>   at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr
>>>>>>>> display_handle) [0x00000]
>>>>>>>>   at System.Windows.Forms.XplatUIX11..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000]
>>>>>>>>   at System.Windows.Forms.XplatUI..cctor () [0x00000] ---  
>>>>>>>> End of
>>>>>>>> inner exception stack trace ---
>>>>>>>>
>>>>>>>>   at <0x00000> <unknown method>
>>>>>>>>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
>>>>>>>>   at System.Windows.Forms.Form.get_CreateParams () [0x00000]
>>>>>>>>   at System.Windows.Forms.Control..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.ScrollableControl..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.ContainerControl..ctor () [0x00000]
>>>>>>>>   at System.Windows.Forms.Form..ctor () [0x00000]
>>>>>>>>   at EliminationTournament.ControlForm..ctor
>>>>>>>> (System.Drawing.Icon
>>>>>>>> FormIcon) [0x00000]
>>>>>>>>   at (wrapper remoting-invoke-with-check)
>>>>>>>> EliminationTournament.ControlForm:.ctor (System.Drawing.Icon)
>>>>>>>>   at EliminationTournament.ControlForm.Main () [0x00000]
>>>>>>>> 	
>>>>>>> _______________________________________________
>>>>>>> Mono-osx mailing list
>>>>>>> Mono-osx at lists.ximian.com
>>>>>>> http://lists.ximian.com/mailman/listinfo/mono-osx
>>>>>>
>>>>>
>>>>
>>>
>>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx



More information about the Mono-osx mailing list