Monday, March 23, 2009

LISFM (Linus Is Not For Me)

Once again, I gave Linux a chance...

[Previously on Linux Woes:

I've tried a few times to install Linux on my system - from the old RedHat 5, to Debian, Mandrake and Ubuntu, and every time there was something that just wouldn't work or was too complexe to function easily. I remember trying to run Karaoke on my linux box, only to find that there was no CDG software that worked with a GUI, and that my dual screen setup just couldn't frakin' work properly. Each time, I reinstalled Windows within a few days. Today, nothing changed a bit]

Once again, I used a livecd from a very popular distribution (Linux Mint, based on Ubuntu with some extra - nice - tools). I tried it out, was happy about the first glance at the system, and installed it (after, of course, backing up all important data to a secondary drive).

One small issues popped up during installation itself, the automatic partitioner wouldn't detect I had 20gigs free at the start of my drive and insisted on either wiping out my 150gb drive (with 100gb of data on it!) or resizing the end of my secondary partition and installing in that 10gb - leaving the 20gb free completely untouched. I manually partionned, no biggy. It was only the start.

One thing to understand is, I believe I am part of what I call the Linux "Middle Class". Linux applies very well to computer illiterates (the "Low Class"), because the interface is now very simple, installing software is automated and effective, and files downloaded (other than Windows software) generally opens up without a hitch. That was the case for me, Linux Mint opened divx files, mp3s, word documents and such very easily.

The "High Class" are the linux geeks which are comfortable with every aspect of their system, from the Kernel to the conf files, from the Terminal command line to Compiz. Linux is also awesome for them because, on the contrary of Windows, they can customize every single thing in their computer, modify the code to their need if they are so inclined, and have the choice between all the distros and x interfaces - even building it from scratch if they know how.

The "Middle Class" on the other hand, which I'm part of, can very easily install Linux on their computers from a LiveCD or installation CD. They know how to customize their system up to a certain extent, have specific software they need and want and can generally install it - even if it means installing extra compilers and libs... But only as long as there are proper instructions and solutions on google to the errors that pop up when it fails. MCs do not like to edit dozens and hunderds of lines of codes to make things work, but they are fine with using a single line of code from a website to install something once.

So, some more specific examples of what I, as an MC, had issues with. First and foremost, as with every other try with Linux I've had, graphics are always a huge hurdle. Granted, Mint was great when I installed it at first. Everything up to Compiz worked fine, the 3D cube desktop and the fancy effects were snappy and beautiful. But Mint insisted on annoying me with the fact that there was a custom drive (ATI) for my video card, and that I could activate it with a single click of a button - which I did. However, each time I did that I would logoff and my monitor would go "Out of Range". The only way to fix it was to boot in recovery mode, and have linux "attempt to fix my graphics", which it did by installing the default graphics server and disabling ALL of the compiz effects which I like so much. And of course, there was no way I'd boot into terminal to edit the xorg.conf or whatever, just to manually specify my screen's maximum resolution and refresh rate. I did resolve this finally, by activating VNC (Remote Desktop), connecting from my work laptop and manually re-ajusting the resolution to something more acceptable and supported by my screen.

I wanted to install TED (Torrent Episode Downloader) on Linux also, because my computer's main purpose is to accept my remote connections for stuff I don't want to be on my home computer (mostly tv shows, movies, music, etc). The problem is that TED is a java application and even though it "supports" linux, starting it requires - each time - a 50-character command in terminal with about 5 different --options and the typing of the file name. Most of the TED interface is written for Windows anyway, with things like "start in system tray".

The last drop was, as usual, because I wanted to do something a bit more special that the masses, but didn't want to learn a new programming language just to make it happen - I wanted a system-wide equalizer on my computer, because my speaker subwoofer doesn't have Bass control and I need to lower it when playing music. I hate having to use specific software to play my music because even the default media player (totem) doesn't offer these functions. My sound card's Windows drivers give me an equalizer that applies to the whole system, and some audio equalizers are available in Windows if your sound card doesn't support it... But Linux? Forget about it. You need to activate a custom sound server (PulseAudio), edit conf files, download and install plugins, and the best of all is that the most common tutorial for this (called, PulseAudio Fixes & System-Wide Equalizer Support in Ubuntu"), while it shows you how to install the requirements (it's a whole page of commands!) doesn't even tell you how to use the equalizer. And it's no wonder - in order to change the settings, you have to manually edit a conf file with lines on how to modify each of the sound frequencies, save the file, and then restart the sound server.

Yes, you read correctly. There's no GUI, and no real-time ajustments. You change a text file with a bunch of numbers in it, save it, and then restart the sound server through the command line. This assumes that you understand how sound frequencies work, that you know the exact structure the text file needs (thankfully, someone was helpful enough to tell me, he's the only one ), and that you don't need to ever change it again.

So, the conclusion of all of this?
LISFM. Linux Is Not For Me.

Tuesday, March 17, 2009

Tutorial: Multilingual mojoPortal website

mojoPortal is a free ASP.Net portal with multiple database support, and is extremely user-friendly and fast (comparatively to other ASP.Net portals).

Since I've run into a few speed bumps while installing and configuring mojoPortal for use in a multilingual environment, I've decided to share my experience and what I have done to make it work with the help of multiple, complicated searches on google and the mojoPortal website. This tutorial will help you create a multilingual site that is linked together (users will be the same across all languages), but where the content is separate.

First of all, I'm assuming that you've already got mojoPortal running on your server and that it is fully functional. I'll also assume that you have already configured a main site, selected a skin, etc. Those basics are easy to figure out, and if you haven't - RTFM is your answer.

I'm using the SQLite release of mojoPortal, but I'm assuming that this guide should be valid for at least a few releases before and after this particular one - if it isn't, please advise me and I'll make appropriate changes.

Step 1: Create a Child site
  1. Logon to your site and go into the Administration, then Site Settings
  2. Next to your site title, click on the drop-down and select "New Site"
  3. The page loads again with a new site configuration, enter your new site name and click Save at the bottom.
Step 2: Make the site related
  1. Using a file manager (from your hosting or using FTP), open the Web.config file in a text editor.
  2. Change the following line
    <add key="UseRelatedSiteMode" value="false">
    to the following:
    <add key="UseRelatedSiteMode" value="true">
  3. Save the file (but don't close it) and go to step 3
Step 3: Force localization (language)
  1. Still in Web.config, locate the following line:
    <add key="UseCultureOverride" value="false">
    Change it to:
    <add key="UseCultureOverride" value="true">
  2. Under this line add the following:
    <add key="site1culture" value="en-US">
    <add key="site2culture" value="fr-CA">
  3. Modify "en-US" and "fr-CA" to the languages you want.
  4. Save, but don't close yet, Web.config
Step 4: Create a sub-folder for your language(s)
  1. Because websites are more easily accessible using something like instead of something like "siteid=2", we need to first tell Web.config to support this.
  2. Locate this line:
    <add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="false">
    And change it to:
    <add key="UseFoldersInsteadOfHostnamesForMultipleSites" value="true">
  3. Create a folder under your /www (or /wwwroot/) folder, and create a text file named "Default.aspx" under this folder (just an empty file, no content)
  4. Save and close (finally!) Web.config
Step 5: Add your content - tips and tricks
  • This setup completely separate the content between languages, so you will have to re-create all your pages, content, layout, etc. It can take a while to get used to the replication, but it's the best way technically and organizational-wise.
  • This guide doesn't cover (yet?) how to create language links on the top, or how (if) it's possible to link directly to the same page in another language. I will be working on that next. One hurdle in doing this is that even if you detect what page you're on right now, that page name will most likely not be the same in different languages (unless you manually set the page names, which is a possibility).