Sample Header Ad - 728x90

Why do Mono applications only start from their own directory?

3 votes
1 answer
2153 views
If I want to run the application monodevelop, I need to chdir to /usr/lib/monodevelop/Bin and then execute ./MonoDevelop.exe. This is the same for all other Mono applications such as banshee, tomboy, etc. If I attempt to run the Mono applications from another location by simply running monodevelop, or even from their own directory, I get _TypeInitializationExceptions_ like this: > behrooz@behrooz:/usr/lib/monodevelop/bin$ monodevelop > FATAL ERROR [2012-05-04 11:24:39Z]: MonoDevelop failed to start. Some > of the assemblies required to run MonoDevelop (for example gtk-sharp, > gnome-sharp or gtkhtml-sharp) may not be properly installed in the > GAC. System.TypeInitializationException: An exception was thrown by > the type initializer for Gtk.Application ---> > System.EntryPointNotFoundException: glibsharp_g_thread_supported at > (wrapper managed-to-native) GLib.Thread:glibsharp_g_thread_supported > () at GLib.Thread.get_Supported () [0x00000] in :0 > at Gtk.Application..cctor () [0x00000] in :0 --- > End of inner exception stack trace --- at > MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions > options) [0x0007e] in > /home/behrooz/Desktop/Monodevelop/monodevelop-2.8.6.5/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:95 > at MonoDevelop.Ide.IdeStartup.Main (System.String[] args) [0x0004f] in > /home/behrooz/Desktop/Monodevelop/monodevelop-2.8.6.5/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:503 Why is that? I have tried reinstalling all Mono, Wine, GTK, Glib, X, Gnome packages.
apt-get --purge --reinstall install $(dpkg --get-selections | grep mono | grep install | grep  -v deinstall | awk'{print $1}')
I also tried strace on "open" and got nothing by myself. System Configuration: - Debian 6.0-updates 64 bit - Kernel 3.2.0-2, 3.2.0-1, 3.1 and 3 EDIT: not a kernel thing - Gnome 3.4 EDIT:but a gnome thing - Mono 2.10.5
TLS:           __thread  
	SIGSEGV:       altstack  
	Notifications: epoll  
	Architecture:  amd64  
    	Disabled:      none  
    	Misc:          softdebug   
    	LLVM:          supported, not enabled.  
    	GC:            Included Boehm (with typed GC and Parallel Mark)
update: with upgrading to the new MonoDevelop 3.0.2 and latest Mono, I can run MonoDevelop with command monodevelop in terminal, no chdir. but gnome-shell cannot run it. Finally found it: as root: cd /usr/local/ find | grep mono|xargs rm -rf # Use with caution/some applications may get messed up (stellarium has MONOchrome images...)
Asked by Behrooz (2498 rep)
May 4, 2012, 07:13 AM
Last activity: Aug 24, 2020, 07:29 PM