Archive

Archive for the ‘Dave L’ Category

eeePC: TrackPad Mouse Clicking in Linux Mint 9

July 5th, 2010 Dave L No comments

One of the most enraging things I’ve experienced with my Asus eeePC is that the TrackPad can be used to make a left mouse click by simply tapping. The problem with this is that it only clicks when you don’t want it to.

In Windows, changing this feature was a big pain, as I had to install a 3rd party utility. However, in Linux Mint 9, it is a simply checkbox in Control Centre under the “Mouse” panel.

        
Categories: Dave L, Guinea Pigs, Linux, Linux Mint Tags:

lua + nginx + FastCGI on Debian

June 22nd, 2010 Dave L 1 comment

(This was originally posted here on my personal blog.)

I’ve recently been doing some testing in lua, and have been comparing the results to the EdgeLink Consulting CMS that we’ve designed in PHP. So far this solution is able to serve substantially more requests per second than our current CMS. However, we haven’t really spent much time optimizing the CMS. The goal is to have a working copy first before any optimizations are done. We’ve also been working on some eCommerce modules for the platform.

With all that being said, I’d like to post a quick tutorial on how I got this setup. It was quite the task. Although there was a tutorial I found to do the same task, it was a little bit confusing. My tutorial will have a lot of the same steps, with some minor adjustments. This tutorial is written at an intermediate level. Some trivial steps have been omitted.

NOTE: This has been tested with Debian 5.0.4 (Stable)

  1. Install nginx

    apt-get install nginx

    We’ll have to do some modifications later on to add the FastCGI handler. For simplicity we will keep the web path to “/var/www/nginx-default” and listen on port 8081 in case you have another webserver running on port 80.

  2. Install lua 5.1 (and WSAPI libraries)

    apt-get install lua5.1 liblua5.1-wsapi-fcgi-0 liblua5.1-coxpcall0 liblua5.1-filesystem0

    apt-get install liblua5.1-wsapi-doc

    Can’t do much testing without this. Note: The second line is not necessary if you are running Debian testing, and get the liblua5.1-wsapi-fcgi-1instead.

    EDIT: You’ll notice that I added in liblua5.1-filesystem0. Steve pointed out that there is a bug in liblua5.1-wsapi-fcgi-0. It doesn’t include it as a dependency. He reported this as a bug here, and it was fixed in liblua5.1-wsapi-fcgi-1.

  3. Install spawn-fcgiIf you’re running Debian testing you may be able to get spawn-fcgi through the distribution, however, I just downloaded it and compiled from source.

    wget http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz
    tar -xzvf spawn-fcgi-1.6.3.tar.gz
    cd spawn-fcgi-1.6.3.tar.gz
    ./configure
    make
    make install

  4. Create a FastCGI Socket

    spawn-fcgi -F 4 -u www-data -s /var/run/nginx-fcgi.sock -P /var/run/nginx-fcgi.pid — /usr/bin/wsapi.fcgi

    For the sake of simplicity, we will just spawn it manually for now. If you’re feeling crafty you can add the above line to the start condition in/etc/init.d/nginx, and the line below to the stop condition. You can add both of them to restart.

    cat /var/run/nginx-fcgi.pid | xargs -n 1 kill

  5. Create a lua file in /var/www/nginx-default/In this tutorial, use hello.lua. You can change this to whatever, you want but just make sure you make the modification in the nginx configuration below as well.
  6. Edit /etc/nginx/sites-available/defaultNow let’s add the code that will point nginx to the correct file. For simplicity, we will simply point it to hello.lua. You can change this to anything, or simply modify the code to accept any *.lua file, as seen in the tutorial listed above. Here is the top of my default file:

    listen   8081 default;
    server_name  localhost;
    access_log  /var/log/nginx/localhost.access.log;

    location / {
    fastcgi_pass    unix:/var/run/nginx-fcgi.sock;
    fastcgi_param   SCRIPT_FILENAME “/var/www/nginx-default/hello.lua”;
    fastcgi_param   PATH_INFO       $request_uri;
    fastcgi_param   QUERY_STRING    $query_string;
    fastcgi_param   REQUEST_METHOD  $request_method;
    fastcgi_param   CONTENT_TYPE    $content_type;
    fastcgi_param   CONTENT_LENGTH  $content_length;
    }

  7. Restart nginx

    /etc/init.d/nginx restart

  8. Visit http://localhost:8081/Congratulations! You should now see hello.lua.

If you have any problems, post in the comments. Stay tuned for more related posts.

        

OH GOD WHAT THE HELL LINUX!!!11

October 16th, 2009 Dave L 2 comments

Well, again, it’s been a little while since my last post. I hope you all enjoyed the podcast that we put out the week before last. If you haven’t had a chance to check it out, make sure to do so by going here. We had a lot of interesting discussions regarding the experiment. If you have any comments about the podcast, or there is anything you want to see, you can either leave a comment, or shoot me an email.

LINUX IS INSTALLED ONCE AGAIN

After approximately 46.3 attempts at installing openSUSE on my Asus eeePC, it is finally installed. With the help of Jake B. and Windows, we finally managed to get it working. It took only several hours of both of us cursing, and nearly an entire 24 of Stella, but it is working.

WELL, WORKING IS A RELATIVE TERM

I hate KDE more than I hate Differential Equations, and as Jon F. can probably confirm, I really hate Differential Equations. That being said, besides Sasha D, who doesn’t hate Differential Equations?

KDE just makes everything so difficult. With Gnome, most of the applications mesh well with the interface. However, with KDE, I have a hard time even getting some applications to mesh with it at all. Pidgin looks absolutely terrible. The message font doesn’t match up with what my system font is set to, and I did not have this issue with GNOME.

I don’t want any damn widgets… this isn’t a Mac!

I WANT MY GNOME BACK!!!

Screen-shots to follow… that is if KDE will let me do that.

        

Update

September 30th, 2009 Dave L 1 comment

Hi Everyone,

Sorry about the lack of updates. I’ve been pretty busy lately. After a lot of fighting and arguing, Linux and I are finally getting along.

I was unsuccessful in installing Linux as I had mentioned early, by running it from my portable hard drive off of my Mac. As a result, I decided to wipe the Ubuntu partition on my Asus eeePC and install openSUSE on there. It was fairly simple to do, and it installed without much hassle. This guide came in handy with the smooth transition.

Although Gentoo is definitely the best flavour of Linux I’ve encountered, openSUSE hasn’t been too bad.

With that being said, I have a few tasks for the coming days, and I will be sure to post about all of them. First, I want to install a softphone to connect to my Asterisk server. Jake has said after some fighting he managed to get this to work. If I run into issues, I can always ask him. Additionally, I have to get Eclipse set up with some various environments I’m going to have to use in the coming weeks. I’ve successfully set it up to work in OpenGL thus far.

That’s it for now. I’ll be posting more in the next few days as I accomplish these tasks.

        

Hello, World!

August 28th, 2009 Dave L No comments

Hi Everyone,

This is my very first post for The Linux Experiment. The time is ticking before the experiment begins, so I guess it is probably a good time to announce which distribution I will be using.

I’ve grown up using many different distributions, so it was very difficult to choose a good one that I’ve never used before. After a lot of thought, I decided that OpenSuSE would be a good distribution to try. I’ve never used it in the past.

I’m very excited to try it, as it seems to have a good reputation, and an established community.

I should also note that since I do not have a Desktop PC, I will be using it from an external hard drive through my Macbook Pro. This should be interesting…

Cheers.

        
Categories: Dave L, openSUSE Tags: