How to install a rtl8192cu on the Beaglebone Black (BBB) running Angstrom

opkg update
opkg upgrade
opkg install kernel-dev
opkg install kernel-headers

You may need to reboot.

cd /usr/src/kernel
make scripts
ln -s /usr/src/kernel /lib/modules/$(uname -r)/build
cd ~
git clone git://github.com/cmicali/rtl8192cu_beaglebone.git
cd rtl8192cu_beaglebone
make CROSS_COMPILE=""

Then follow 2.2 from bonenotes.tumblr.com:

Install the driver

mv 8192cu.ko /lib/modules/$(uname -r)
depmod -a
cd /etc/modules-load.d
echo "8192cu" > rtl8192cu-vendor.conf

Blacklist the old rtlwifi drivers

cd /etc/modprobe.d
echo "install rtl8192cu /bin/false" >wifi_blacklist.conf
echo "install rtl8192c_common /bin/false" >>wifi_blacklist.conf
echo "install rtlwifi /bin/false" >>wifi_blacklist.conf

Edit /var/lib/connman/settings and enable WIFI

[global]
OfflineMode=false

[Wired]
Enable=true
Tethering=false

[WiFi]
Enable=true
Tethering=false

Encrypt your passphrase

wpa_passphrase YourSSID YourPassphrase

Edit /var/lib/connman/wifi.config and set it to the following

[service_home]
Type=wifi
Name=YourSSID
Passphrase=YourEncryptedPassphrase

Plug in your WIFI adaptor and reboot

shutdown -r 0

Sources & Thanks:
Big Thanks to cmicali: bonenotes.tumblr.com/
Thanks to Nomel: nomel.org/post/30357133735/beaglebone-tutorial-how-to-compile-kernel-modules-and

How to restrict a specific package from installing (apt pinning)

I tend to be very picky so there are a couple of packages which I do not want installed on my machines:

  • msttcorefonts: the Microsoft-like fonts. If you have those installed, Firefox will use them and you will get ugly windows-like font on most websites which I personally hate.
  • wine: Application to run windows programs on linux. For security reasons.
  • postfix: a mail server. Just because I do not want to run a mail server on my netbook.
  • …and some other

The best way to restrict those packages from being installed is through Apt Pinning.

Apt pinning

It is very easy to pin packages and restrict them from being installed.
You will need to edit /etc/apt/preferences and add something like this:

Package: msttcorefonts
Pin: version  0.0
Pin-Priority: -1

Package: ttf-liberation
Pin: version  0.0
Pin-Priority: -1

Package: ttf-mscorefonts-installer
Pin: version  0.0
Pin-Priority: -1

Package: wine
Pin: version  0.0
Pin-Priority: -1

Package: postfix
Pin: version  0.0
Pin-Priority: -1

Pin-Priority: -1 restricts the given version from being installed, and the version 0.0 does not exist and should be a lower version than any versions of the given packages. As a conclusion, they will never be installed.

Be careful what you pin, though, as you might be too restrictive and could prevent installing or upgrading other useful packages.

How to create a simple approval queue with Request Tracker (RT) 3.8

Introduction

In this post I will show how to create a simple approval queue in Request Tracker 3.8.

Request Tracker

The General queue will be used as the approval queue.

Here are the different entities (groups) we will create:

  • Submitters: they can submit new tickets only to the General Queue.
  • Approvers: they can approve tickets (move them from the general queue to another queue)

I will also show how to add a new dashlet (“RT at a glance“) containing all the tickets the user created (“My issues”).

Continue reading “How to create a simple approval queue with Request Tracker (RT) 3.8”

How to set up Expires header with Apache2 on Ubuntu Lucid 10.04

A very good way to reduce page load time on your website is to tell your visitors’ browser it can cache some specific files and save a copy on the disk.
This process is done by your web-server which is sending an Expires header and a max-age header during the HTTP response, e.g.:

200 OK
Cache-Control: max-age=604800
Connection: close
Date: Tue, 27 Jul 2010 22:31:03 GMT
Accept-Ranges: bytes
ETag: "2c956-376b-4696cb8b385c0"
Server: Apache/2.2.14 (Ubuntu)
Content-Length: 14187
Content-Type: image/gif
Expires: Tue, 03 Aug 2010 22:31:03 GMT
Last-Modified: Fri, 08 May 2009 20:46:23 GMT
Client-Date: Tue, 27 Jul 2010 22:31:02 GMT
Client-Peer: 127.217.30.5:80
Client-Response-Num: 1

Apache2 offers this feature through its mod_expires module. Note that this module is usually disabled by default, meaning your visitors would download all the files over again each time they change the page.

Continue reading “How to set up Expires header with Apache2 on Ubuntu Lucid 10.04”

Things to remember to backup or copy when migrating servers

A new version of your operating system just got released and you want to have a fresh new install, or you want to migrate all of your data to another machine. There are so much stuff to backup that you don’t even know where to start?
I will try to list the most common stuff (on a web-server) to backup or copy somewhere when you want to do a server migration.

Continue reading “Things to remember to backup or copy when migrating servers”

Script to capture a screenshot (with Chromium) (Command-line)

Introduction

I wanted to take screenshots of about 15 Websites, but didn’t want to install any plugins as I wouldn’t use them often. I saw a lot of how-to’s using import from Imagemagick but they capture the whole screen, not clearly what I was looking for.

Using chromium, xwininfo (from X) and import, I made this bash script which captures only the webpage. See below for the Source code.

Continue reading “Script to capture a screenshot (with Chromium) (Command-line)”

Easy Apache log statistics using Visitors

There are many Apache log analyzers that you can now choose from, but it can be long or confusing to install most of them. I wanted to try and find a simple log analyzer that just does its work using cronjobs. Visitors seems to fit the needs!
We’ll also use ip2host to resolve the IP addresses into domain names.
All of this will be run daily by a cronjob.

Screenshot of a report generated by Visitors
Screenshot of a report generated by Visitors

Continue reading “Easy Apache log statistics using Visitors”

How To use MySQL Administrator & Query Browser through SSH tunnel

I try to keep my VPS (Virtual Private Server) as light as possible. That’s also why I don’t have PHPMyAdmin installed and wouldn’t want to install it. The only way of accessing MySQL and executing commands is through the mysql CLI (Command Line Interface), but I don’t always remember the exact queries to create a user, database or to grant privileges.

I recently decided to look for some GUI (Graphical User Interface) tools to tweak and administrate a MySQL server. I found the quite well-known MySQL Administrator (and Query Browser).

MySQL Administrator
MySQL Administrator

The problem is that by default (and for obvious security reasons), my MySQL server is not accessible from the internet (only accessible by localhost itself). This is where SSH tunnels enter the action!
Continue reading “How To use MySQL Administrator & Query Browser through SSH tunnel”