OSQA install experience

OSQA is an opensource Q/A engine. In this article I’ll describe the way I installed it on my VPS.

I like Debian/Ubuntu OS. Debian lacks new packages, that’s why I chose Ubuntu 12.04 LTS.

Act 1. Lighttpd

I had Lighttpd installed on my machine, so firstly I tried to install OSQA on Lighttpd. Googling around I found that running OSQA in fcgi mode is not OK (when you have a VPS). WSGI is the right way. Unfortunately, Lighttpd’s WSGI is very unstable, experimental and unsupported. That’s why I decided to move to nginx.

Act 2. nginx

Django projects are great with pure WSGI servers. So I decided to install nginx with WSGI server (uWSGI, GUnicorn, etc.). Spending 3 days, writing LOTS of site blocks, tuning nginx, messing around with various WSGI servers, I finally switched to Apache.

Act 3. Apache

My Apache/Ubuntu way was as described in article on meta.osqa.com. After doing the steps I received 500 errors as well as this:

Middleware module "django.middleware.csrf" does not 
define a "CsrfResponseMiddleware" class

OSQA is not compatible with Django 1.4.0, but works OK in 1.3.1. Check your version:

python
>>> import django
>>> django.VERSION

If necessary install 1.3.1:

sudo easy_install django==1.3.1

P.S.

In my spare time I’ll continue playing with nginx + uWSGI (or gunicorn), I think it’s the best way of running OSQA.

Настройка трекбола Logitech TrackMan Marble Mouse в Ubuntu Linux


В статье описывается настройка трекбола Logitech TrackMan Marble с возможностью прокрутки страниц. Основной ref тут (документация сообщества Ubuntu) и тут.

Добавьте следующий код в

/usr/share/X11/xorg.conf.d/11-evdev-quirks.conf

и перезапусте X Window сервер:
(или в /etc/X11/xorg.conf.d/50-marblemouse.conf, предварительно выполнив

gsettings set org.gnome.settings-daemon.plugins.mouse active false

)

Section "InputClass"
        Identifier  "Marble Mouse"
        MatchProduct "Logitech USB Trackball"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "ButtonMapping" "1 8 3 4 5 6 7 2 9"
        Option "EmulateWheel" "true"
        Option "EmulateWheelButton" "8"
        Option "ZAxisMapping" "4 5"
        Option "XAxisMapping" "6 7"
        Option "Emulate3Buttons" "true"
EndSection

Я обычно предпочитаю ставить ButtonMapping таким, как указано выше, но некоторые предпочитают вот такой:

Option "ButtonMapping" "1 2 3 4 5 6 7 8 9"

С моим ButtonMapping я могу легко закрывать ненужные вкладки в браузере, использовать функцию копирования-вставки, и то, и другое с помощью малой левой клавиши. С альтернативным ButtonMapping теряются “возможности средней кнопки” и малая левая кнопка работает как кнопка “назад” при нажатии.

Обновление: работает также в Ubuntu 13.10, 14.04, Debian Squeezy.