This is a document about using For The Common Good with Mono, which should allow FTCG to work on Linux and other non-Microsoft operating systems.
Using with Mono
Mono is a non-Microsoft implementation of .NET Framework. Non-Microsoft operating systems, such as Linux and MacOS, should be able to run For The Common Good using Mono.
- Install Mono on your system.
- For Debian and Ubuntu distributions: Install the mono-runtime and mono-devel packages with whatever package manager you wish. (You need mono-devel temporarily only because you need the certmgr program to get Wikimedia's SSL certificates because FTCG uses HTTPS to communicate instead of HTTP.) If you don't have a package manager preference, go to the command line and do this:
sudo aptitude -u
sudo aptitude install mono-runtime mono-devel
- When you are asked if you want to install some large number of packages (probably 190) or so, type y and hit Enter.
- Mono's download page has download information for other platforms.
- For Debian and Ubuntu distributions: Install the mono-runtime and mono-devel packages with whatever package manager you wish. (You need mono-devel temporarily only because you need the certmgr program to get Wikimedia's SSL certificates because FTCG uses HTTPS to communicate instead of HTTP.) If you don't have a package manager preference, go to the command line and do this:
- Run certmgr to get the SSL certificates for Wikipedia:
certmgr -ssl https://en.wikipedia.org/
certmgr -ssl https://commons.wikimedia.org/
- You might be asked Import this certificate into the Trust store ? — type y and press Enter each time you are asked.
- If certmgr dont work you can use mozroots to import certificates.
- Run FTCG. From the command line, it's as easy as running the command "mono" with the location of the FTCG executable file:
mono ForTheCommonGood_1.0.4.exe
Problems
- When I hit Go on a Wikipedia file, I get an error dialog that says "An Internet request failed. Error getting response stream (Write: The authentication or decryption has failed.): SendFailure".
- You didn't import the SSL certificates for Wikimedia sites into Mono yet. See the certmgr part of the instructions above.
- When I hit Go on a Wikipedia file, FTCG crashes and exits. The diagnostic messages in the terminal window begin with Unhandled Exception: System.Net.ProtocolViolationException: The number of bytes to be written is greater than the specified ContentLength. I've already installed the certificiates.
- Here's where we have a problem!
The error
Unhandled Exception: System.Net.ProtocolViolationException: The number of bytes to be written is greater than the specified ContentLength. at System.Net.WebConnectionStream.CheckWriteOverflow (Int64 contentLength, Int64 totalWritten, Int64 size) [0x00000] in <filename unknown>:0 at System.Net.WebConnectionStream.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback cb, System.Object state) [0x00000] in <filename unknown>:0 at System.Net.WebConnectionStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 at ForTheCommonGood.MorebitsDotNet+<>c__DisplayClass9.<PostApi>b__6 (IAsyncResult innerResult) [0x00000] in <filename unknown>:0 at System.Net.WebAsyncResult.CB (System.Object unused) [0x00000] in <filename unknown>:0 Unhandled Exception: System.Net.Sockets.SocketException: The descriptor is not a socket at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue, Boolean allowIdle) [0x00000] in <filename unknown>:0 at System.Windows.Forms.XplatUIX11.UpdateMessageQueue (System.Windows.Forms.XEventQueue queue) [0x00000] in <filename unknown>:0 at System.Windows.Forms.XplatUIX11.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr handle, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0 at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax) [0x00000] in <filename unknown>:0 at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000] in <filename unknown>:0 at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000] in <filename unknown>:0 at ForTheCommonGood.Program.Main () [0x00000] in <filename unknown>:0