See my article on Mono in the BSD Magazine May issue
The BSD Magazine has released and there is an article in it by yours truly.
Check it out.
Archive for the ‘FreeBSD’ Category.
The BSD Magazine has released and there is an article in it by yours truly.
Check it out.
It makes a difference if you do something the right way from the beginning. Everything seems to work out so much better and takes less time over all.
Here are some basic steps that I have learned will help you do it right the first time. These steps are from my experience, mostly because I did it wrong the first few times. These are not exact steps. They are subject to change and improve. In fact, you might have improvements to suggest immediately when you read this. But if you are new to WPF, then reading these steps before you start and following them, will have you closer it doing it the right way the first time. It is much more pleasant to tweak a pretty good process than it is to go in with no idea for a process and do it wrong.
Macintosh
Macintosh owns a significant market share. Determine if this application needs to run on Macintosh as well. Sure, since we are running C# your options are limited to either rewriting in objective C and Coca, or using Mono with a MonoMac UI. I recommend the latter.
Note: It is critical that the UI and business logic are separated to really make this successful.
BSD/Linux/Unix
BLU (BSD/Linux/Unix) doesn’t exactly own a significant market share. However, it is still important to determine if this application needs to run on on BLU as well. Sure, since we are running C# your options are limited to either rewriting in C++, or using Mono with a GTK# or Forms UI.
Mobile Platforms
Again, you may need to do this way sooner if the application is complex.
I was the 200th person to like the FreeBSD Foundation Facebook page.
The FreeBSD Foundation helps collect donations and fund projects to improve FreeBSD.
If you have the ability to contribute, you should. I realized I hadn’t contributed since last year, so I went ahead and donate a meager sum this year.
http://www.freebsdfoundation.org/donate
The FreeBSD needs a lot more than 200 people liking it and a lot more people donating.
I have been running the PB-BSD 8.2 and switching between work and home networks.
I have figured out that I have to run these commands when I want to switch over to use wireless:
$ $ $ |
sudo wpa_cli reassociate sudo route flush dhclient wlan0 |
When switching back to Ethernet, I have use these two commands:
$ $ |
sudo route flush sudo dhclient em0 |
I thought I was done listing the commands that must be run, until I realized that the above commands didn’t change the /etc/resolv.conf in my Ports Jail.
Question: What network settings need updating in the Ports Jail.
Answer: The Ports Jail uses the systems IP Address and Default Route, so only the /etc/resolv.conf needs updated and it appears to be a copy of the system’s /etc/resolv.conf
So I just have to update /etc/resolv.conf and that is all.
Well, one solution is to run another command that just copies the system’s /etc/resolv.conf to the Port Jail.
But a better solution is to get dhclient to run this command for us. This can be done with the dhclient-exit-hooks.
$ $ |
sudo touch /etc/dhclient-exit-hooks chmod +x /etc/dhclient-exit-hooks |
#!/bin/sh cp /etc/resolv.conf /usr/jails/portjail/etc/resolv.conf
Now when you run dhclient, you will also get a new /etc/resolv.conf in your Ports Jail.
So, when you install using ports, there is a lot of software you may not really want that gets installed. Are you familiar with the term build dependency. This is software, usually a library or scripting language, that is required for a software to compile from source, but is not needed at run time. When you always install from ports, your system will eventually have most or all the common build dependencies installed. Really the only dependencies you need are run-time dependencies. These dependencies make up the software that must be installed for the desired port to actually function.
Here is what I do:
This seems to work, and I don’t get all the build dependencies installed. Plus the rsync command is pretty quick.
I wonder if this is how the PC-BSD team uses it too?
Mono is basically the .NET Framework on FreeBSD or other open source platforms. This allows development in C# on FreeBSD. C# is an extremely popular language that is not slowing down. It’s popularity stems from that fact that this language and its features allows for rapid development that is much faster than many other languages.
The version of Mono available in the ports tree is not the latest version available. Just like FreeBSD has a release version and a development version, Mono has a release version and a development version. The development version is so much newer that it is hard not to recommend it over the release version.
This is already documented here:
How to install ports on FreeBSD?
The team at BSD# have a tool called portshaker
that adds mono ports to the ports tree. Install it as follows.
# # |
cd /usr/ports/ports-mgmt/portshaker-config make BATCH=yes install |
Note: Notice I didn’t just install portshaker, I installed portshaker-config which has portshaker as a dependency, so you get both installed with one command.
The example portshaker.conf.example is configured correctly for default configurations, so all we need to do is copy it.
Yes, it is that easy. Simply run portshaker.
Note: You may be prompted to merge a few files. I diffed and chose either install or continue each time.
Note: Running portshaker uses subversion to download so if you need to use an HTTP proxy, you have to configure subversion to use an HTTP proxy as it doesn’t use the FreeBSD HTTP_PROXY environment variable.
Your ports tree is now updated by portshaker.
The mono port should now be updated to the latest version.
# # |
cd /usr/ports/lang/mono make BATCH=yes install |
Mono is now installed on your system.
There is an example of building a hello world app here:
Firefox 3.6 no longer works with the Java versions in PBIs. Instead the OpenJDK6 must be installed. However, as of writing this document there is not a PBI for OpenJDK6, so we must install it from the ports jail.
# # |
cd /usr/ports/java/openjdk6 make WITH_WEB=yes BATCH=yes install |
# | ln -s /usr/local/openjdk6/jre/lib/IcedTeaPlugin.so ~/.mozilla/plugins/IcedTeaPlugin.so |
You may want to verify that java is working in your Firefox install. You want to know two things:
Here are steps to make those two verifications.
Note; This is pretty much exactly like the handbook states.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/desktop-browsers.html
If I open Ports Jail, then a regular konsole, the regular konsole gets the Ports Jail icon. I can’t really tell the konsole sessions apart.
The same things happens if I do it the other way around. If I open a regular konsole, then Ports Jail, the Ports Jail gets the konsole icon. Again, I can’t really tell the konsole sessions apart.
This causes me some confusion. Which konsole am I running? I have to take a moment to verify or close them both.
One solution is to have the Ports Jail konsole session use its own konsole profile that uses a custom konsole profile.
Here is how I configured that:
[Background] Color=0,0,0 Transparency=false [BackgroundIntense] Color=0,0,0 Transparency=false [Color0] Color=0,0,0 Transparency=false [Color0Intense] Color=104,104,104 Transparency=false [Color1] Color=250,75,75 Transparency=false [Color1Intense] Color=255,84,84 Transparency=false [Color2] Color=24,178,24 Transparency=false [Color2Intense] Color=84,255,84 Transparency=false [Color3] Color=178,104,24 Transparency=false [Color3Intense] Color=255,255,84 Transparency=false [Color4] Color=92,167,251 Transparency=false [Color4Intense] Color=84,84,255 Transparency=false [Color5] Color=225,30,225 Transparency=false [Color5Intense] Color=255,84,255 Transparency=false [Color6] Color=24,178,178 Transparency=false [Color6Intense] Color=84,255,255 Transparency=false [Color7] Color=178,178,178 Transparency=false [Color7Intense] Color=255,255,255 Transparency=false [Foreground] Color=192,0,192 Transparency=false [ForegroundIntense] Bold=true Color=210,0,210 Transparency=false [General] Description=LavenderOnBlack Opacity=0.92
[Appearance] ColorScheme=LavenderOnBlack [Cursor Options] CustomCursorColor=192,0,0 UseCustomCursorColor=true [General] MenuIndex=6 Name=PortsJail Parent=FALLBACK/ RemoteTabTitleFormat=%h : %u TabBarMode=1 TabBarPosition=1 [Scrolling] HistoryMode=2 [Terminal Features] BlinkingCursorEnabled=true
TerminalOptions=--profile /usr/home/jared/.kde4/share/apps/konsole/PortsJail.profile
Now whenever I open the ports Jail, I can easily tell it is the Ports Jail and not the regular konsole because it is using a LavenderOnBlack profile.
I don’t know what the FreeBSD plan is. Unfortunately, I feel that if there is one, it is not a very well-rounded on. Maybe it only focuses on development and might not have a big focus on also important tasks like advertising and marketing, documentation, and acquiring new committers. All of which is important because I am not the only that thinks that FreeBSD needs fresh Blood!
Here is a simple step by step plan to make the FreeBSD community bigger. They aren’t all my ideas, many have been mentioned by other people in the forums or elsewhere.
Well, that is the plan that has formed in the back of my head the past ten years that I have been involved with FreeBSD. Unfortunately, most of the above is not happening. PC-BSD is helping with #1 and #2 of the development plan, which is great!
Click to read more ideas for improving FreeBSD.
Hey all,
I was going to write an article on this, but it was so easy, there is no need for one.
Windows 7 doesn’t know how to deal with PC-BSD, but PC-BSD knows how to deal with Windows 7.
So all I had to do was install Windows 7 first (I chose a 50 GB partition) and then I installed PC-BSD on the remaining space. I did click to install the PC-BSD boot manager as it is not selected by default, and now I can dual boot Windows 7 and PC-BSD. Which is a must for a guy who’s job is writing C# on windows.
There is a lot of work to do in this world, and there are plenty of open source projects. However, there are still plenty of projects that need help. There are still plenty of projects that haven’t even been started yet.
I just read this post and I am quite in agreement with it: FreeBSD needs fresh Blood!
Here are a list of projects ideas or projects that need contributors that could really help FreeBSD go to the next level.
While free contributions from the community is nice, for FreeBSD to really thrive, it needs more full-time developers. There is not substitute for actual paid employees who spend their days working on FreeBSD. The only way get those type of employees is to get some companies out there making money. For this reason, I would recommend that the FreeBSD Foundation looks at helping start new businesses based on FreeBSD.
There are a lot more ideas out there and anybody can be a part of them.
I recently posted about the GhostBSD 2.0 beta.
Review: GhostBSD 2.0 Beta 2 – A FreeBSD LiveCD
Well, the product is no longer beta as they just released GhostBSD 2.0.
If you didn’t take a look when I posted about the beta, take a moment to take a look now!
I just got a new 250 GB 7200 RPM laptop hard drive for $45 bucks from NewEgg.
I plan on installing Windows 7 SP1, FreeBSD 8.2, and PC-BSD 8.2.
You know what would be interesting is to link /usr/home on FreeBSD 8.2 and the PC-BSD 8.2 OSs so that my /usr/home/jared is the same directory on both.
Asp.Net is cross platform using mono. Novell SUSE and Microsoft and others companies are dedicated to making .NET Framework a cross platform solution. Asp.Net web services are limited to running on windows, but can also run on other platforms, such as FreeBSD.
FreeBSD has ports for mono and mod_mono and can easily run web services build with Asp.Net. Here is a tutorial to make this happen.
A good place to start reading is the getting started page on the mono project’s web site.:
http://mono-project.com/Start
This has the resources you need for most things, however, the documentation is designed mostly for SUSE Linux, so be prepared for slight differences on FreeBSD.
Install Apache on FreeBSD as follows.
# # |
cd /usr/ports/www/apache22 make install |
# | echo ‘apache22_enable=”YES”‘ >> /etc/rc.conf |
Installing mod_mono will also install mono and xsp. Install mod_mono as follows.
# # |
cd /usr/ports/mod_mono make install |
# mod_mono.conf # Achtung! This file may be overwritten # Use 'include mod_mono.conf' from other configuration file # to load mod_mono module. <IfModule !mod_mono.c> LoadModule mono_module /usr/local/libexec/apache22/mod_mono.so </IfModule> <IfModule mod_headers.c> Header set X-Powered-By "Mono" </IfModule> AddType application/x-asp-net .aspx AddType application/x-asp-net .asmx AddType application/x-asp-net .ashx AddType application/x-asp-net .asax AddType application/x-asp-net .ascx AddType application/x-asp-net .soap AddType application/x-asp-net .rem AddType application/x-asp-net .axd AddType application/x-asp-net .cs AddType application/x-asp-net .vb AddType application/x-asp-net .master AddType application/x-asp-net .sitemap AddType application/x-asp-net .resources AddType application/x-asp-net .skin AddType application/x-asp-net .browser AddType application/x-asp-net .webinfo AddType application/x-asp-net .resx AddType application/x-asp-net .licx AddType application/x-asp-net .csproj AddType application/x-asp-net .vbproj AddType application/x-asp-net .config AddType application/x-asp-net .Config AddType application/x-asp-net .dll DirectoryIndex index.aspx DirectoryIndex Default.aspx DirectoryIndex default.aspx
In /usr/local/lib/xsp, added by the mod_mono port, is a “test” folder that contains sample web services. Ther
# | cp -fR /usr/local/lib/xsp/test /usr/local/www/apache22/data/ |
# | service apache22 start |
You should now have Apache configured to run Asp.net.
With the bare minimum installed, you can almost guarantee that a web service is going to require a library you do not have installed. In fact, clicking on the second link in the “test” site, code-render.aspx, shows us this error.
Server Error in '/test' Application gdiplus.dll Description: HTTP 500. Error processing request. Stack Trace: System.DllNotFoundException: gdiplus.dll at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&) at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0 Version information: Mono Runtime Version: 2.6.7 (tarball Tue Mar 1 06:10:28 MST 2011); ASP.NET Version: 2.0.50727.1433
This library can be found and installed.
# # |
cd /usr/ports/x11-toolkits/libgdiplus make BATCH=yes install |
This has some Xorg dependencies so compiling it could take a while. Notice the BATCH=yes parameter passed to make above. This will prevent any prompts and accept the defaults for every port this command compiles.
Yes, the new versions released.
Read more here:
http://www.freebsdnews.net/2011/02/25/released-freebsd-8-2-release-and-7-4-release/