Thursday, September 20, 2012

Fixing Penn State Wireless Network Stability Issues on Linux

On Linux Mint (and I'm assuming most Gnome-based distributions of Linux), NetworkManager does a bad job staying connected to the new psu network that has spread to most of campus.
wicd is an alternative network manager that seems to relieve a lot of the problems that NetworkManager had.

Install wicd
$ sudo apt-get install wicd
Then edit or create an encryption template "psu" as /etc/wicd/encryption/templates/psu. Note that this file may exist already but is probably outdated (as of today, mine was outdated). Find my version of the psu encryption template here: https://bitbucket.org/zachwolfe/dotfiles/src/2dc9a24fbc7b/etc/wicd/encryption/templates/psu
Then open the wicd-gtk client and connect to the "psu" network using the "psu" encryption template you just defined. You should also select the "use these settings for all networks sharing this essid" checkbox as well for obvious reasons.

Saturday, September 15, 2012

HP dm4 laptop right click fix

On Linux Mint Cinnamon, (and probably most Ubuntu versions at or before 12) my hp dm4's synaptics touchpad did not automatically detect that it has a right a left button.

To fix this, create the directory /etc/X11/xorg.conf.d/

$ sudo mkdir -p /etc/X11/xorg.conf.d

Then place this file into /etc/X11/xorg.conf.d:
https://bitbucket.org/zachwolfe/dotfiles/src/88321594ef20/etc/X11/xorg.conf.d/50-synaptics.conf

Restart the X Server (Ctrl Alt Backspace or log out or reboot)

Wednesday, August 1, 2012

nginx HTTP/HTTPS setup

Setting up nginx SSL is pretty easy. I'm running nginx/1.0.10.

Use make-ssl-cert to make your SSL certificate.
make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/private/zachwolfe.org.crt Copy this file to /etc/ssl/private/zachwolfe.org.key and /etc/ssl/certs/zachwolfe.org.crt.

Modify /etc/ssl/private/zachwolfe.org.key to only include the key (as follows):
-----BEGIN CERTIFICATE-----
...key text is here....
-----END RSA PRIVATE KEY-----


Modify /etc/ssl/certs/zachwolfe.org.crt to only include the certificate (as follows):
-----BEGIN RSA PRIVATE KEY-----
...certificate text is here....
-----END CERTIFICATE-----


nginx setup:
File /etc/nginx/conf.d/zachwolfe.org.ssl.conf
server {
    listen       443;
    server_name  zachwolfe.org;

    ssl                  on;
    ssl_certificate      /etc/ssl/certs/zachwolfe.org.crt;
    ssl_certificate_key  /etc/ssl/private/zachwolfe.org.key;

    ssl_session_timeout  5m;

    ssl_protocols  SSLv2 SSLv3 TLSv1;
    ssl_ciphers  HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers   on;

    location / {
        root /var/www/;
        index  index.html index.htm;
    }
}


File /etc/nginx/conf.d/zachwolfe.org.conf
server {
    listen       80;
    server_name  zachwolfe.org;
    access_log /var/log/nginx/zachwolfe.org.access.log;

    location / {
        root /var/www/;
        index  index.html index.htm;
}