Log in

View Full Version : .net 2.0 in Linux?


Adub
20th October 2007, 20:29
Hey guys,
I just decided to get a little cozy with penguins using Ubuntu before I take the next step to Sabayon.

so my question is, how do I get .net 2.0 programs running in linux? I suppose Wine is involved, and something called mono, but I can't find a decent how-to anywhere on the internet.

Any help would be appreciated.

Ex. program: FLV Extract.

Sharktooth
21st October 2007, 03:58
Install the very latest mono with the related libs (expecially the windows forms...) and the latest wine.
Do the usual wine setup and run your proggy using wine and voila'...

Adub
21st October 2007, 21:43
I am not quite sure what the usual wine setup is, but I installed the latest version of Windows Mono using wine, and when I type the parameter:
Edit: I read most of the wiki on configuring wine, but I am still not sure how to fix this.

I even tried loading gdiplus.dll in the libraries override section but it didn't do anything.
wine FLVextract.exe

I get this:

ALSA lib conf.c:3949:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL default:0
wine: Call from 0x7b843f50 to unimplemented function gdiplus.dll.GdipCreateFontFamilyFromName, aborting
err:seh:setup_exception stack overflow 112 bytes in thread 000b eip 68f236e4 esp 00410f90 stack 0x411000-0x620000

Moitah
21st October 2007, 23:28
I don't think you need Wine for FLV Extract. Try Mono, but use the Linux version instead of the Windows version. I'm not sure that it will work though, sometimes I've had to work around bugs or things that aren't implemented in Mono to get my programs running. If it doesn't work let me know and I'll see if I can do something about it.

mc2man
22nd October 2007, 00:42
drop your .exe somewhere (desktop) then right click and select open with other app. in custom command paste
'/usr/bin/mono'
after that "open with mono" is added to right click options

Adub
22nd October 2007, 01:34
Okay, I tried using the linux version of mono using the command:

mono FLVextract.exe

and I got this:
** (FLVExtract.exe:14996): WARNING **: The following assembly referenced from /home/merlin/Desktop/FLV_Extract/FLVExtract.exe could not be loaded:
Assembly: System.Windows.Forms (assemblyref_index=2)
Version: 2.0.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/merlin/Desktop/FLV_Extract/).


** (FLVExtract.exe:14996): WARNING **: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.

** (FLVExtract.exe:14996): WARNING **: Missing method EnableVisualStyles in assembly /home/merlin/Desktop/FLV_Extract/FLVExtract.exe, type System.Windows.Forms.Application
Stacktrace:


Native stacktrace:

mono [0x8194ca6]
mono [0x81770ed]
[0xffffe440]
mono(mono_object_new+0x18) [0x80b596a]
mono(mono_exception_from_name_two_strings+0x44) [0x80f0a45]
mono(mono_get_exception_file_not_found2+0x4f) [0x80f0b9c]
mono [0x810f9a7]
mono [0x811a390]
mono(mono_class_vtable+0x181) [0x80b29b3]
mono(mono_object_new+0x18) [0x80b596a]
mono(mono_exception_from_name_two_strings+0x44) [0x80f0a45]
mono(mono_get_exception_file_not_found2+0x4f) [0x80f0b9c]
mono [0x810f9a7]
mono [0x8176370]
mono [0x817699e]
mono [0x8176a98]
mono [0x8176f2d]
mono(mono_runtime_invoke+0x27) [0x80b0b2f]
mono(mono_runtime_exec_main+0x142) [0x80b5383]
mono(mono_runtime_run_main+0x27e) [0x80b5631]
mono(mono_jit_exec+0xbd) [0x805a4cb]
mono [0x805a5a8]
mono(mono_main+0x1683) [0x805bdc9]
mono [0x8059636]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7c9a050]
mono [0x80595b1]

Debug info from gdb:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1211619632 (LWP 14996)]
[New Thread -1221256304 (LWP 14998)]
[New Thread -1215497328 (LWP 14997)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xffffe410 in __kernel_vsyscall ()
3 Thread -1215497328 (LWP 14997) 0xffffe410 in __kernel_vsyscall ()
2 Thread -1221256304 (LWP 14998) 0xffffe410 in __kernel_vsyscall ()
1 Thread -1211619632 (LWP 14996) 0xffffe410 in __kernel_vsyscall ()

Thread 3 (Thread -1215497328 (LWP 14997)):
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7dff9f6 in ?? () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x0811bc9f in ?? ()
#3 0xb78cf3ac in ?? ()
#4 0x00000000 in ?? ()

Thread 2 (Thread -1221256304 (LWP 14998)):
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7dfc676 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/tls/i686/cmov/libpthread.so.0
#2 0x08120dde in ?? ()
#3 0xb783b1dc in ?? ()
#4 0xb783b1c4 in ?? ()
#5 0xb7dfa541 in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
#6 0x081210eb in ?? ()
#7 0xb783b1dc in ?? ()
#8 0xb783b1c4 in ?? ()
#9 0x00000000 in ?? ()

Thread 1 (Thread -1211619632 (LWP 14996)):
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d50301 in select () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7e6f780 in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
#3 0xb7e6fb4c in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
#4 0x08194d84 in ?? ()
#5 0xb7b3e844 in ?? ()
#6 0xb7b3e82c in ?? ()
#7 0xb7b3e828 in ?? ()
#8 0xb7b3e824 in ?? ()
#9 0x00000000 in ?? ()
#0 0xffffe410 in __kernel_vsyscall ()


=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Aborted (core dumped)


When I try running mono with this command:

mono program FLVextract.exe

I get "cannot open assembly program".

I tried adding the "/usr/bin/mono" line to the "Open with Application" command, but when I select to open with mono, nothing happens.

mc2man
22nd October 2007, 01:38
with the .exe on desktop try in terminal
mono /home/doug/Desktop/FLVExtract.exe
change the name

sorry didn't see you tried that - I think
what ver. of ubuntu

edit
go back to right click, open with other and browse to mono - usr/bin/mono. select and then open
don't know why pasting it in doesn't work

Adub
22nd October 2007, 02:56
Hey it worked!!

Weird. I tried typing it in the "Open with Application" commandline before, with the exact same path, and it didn't work. But if I browsed to it with the browse button and clicked the executable then it workes flawlessly.

Why wasn't I able to run it from the commandline? It was just be kind of nice to now for future use.

I am using Ubuntu 7.10 Gutsy Gibon.

mc2man
22nd October 2007, 03:59
From the terminal prompt you need mono<space></path to/file
doug@doug-laptop:~$ mono /home/doug/Desktop/FLVExtract.exe
if you stuck a setup.exe in drive_c, then for example
doug@doug-laptop:~$ wine /home/doug/.wine/drive_c/SetupImgBurn_2.3.0.0.exe


as far as the custom command box I never could figure that out
for example if I copy and paste this
'usr/bin/mono' #typed
it won't work(cannot find) and if I copy and paste this (from this thread)
'/usr/bin/mono' #c&p from browsed
it works (obviously just the command)

Adub
22nd October 2007, 05:27
Interesting. when i use the mono command now, everything works. As you can see from my last posts, it wasn't working. I don't know what changed, but I am glad it's working now.

Thanks alot for your help mc2man. Being a linux noob sucks. And shit starts working as soon as I post here for some odd reason.

Sharktooth
22nd October 2007, 12:36
@mc2man: usr/bin/mono obviously wont work unless you're on / ...
however, for newbies, dont forget to use the autocomplete (TAB key) in the terminal... it saves you a lot of time and will prevent typos...

shevegen
25th October 2007, 21:11
"Being a linux noob sucks."

Hah dont worry... that kind of thing you will learn quickly.