Archive for Tutorials

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”).

Read the rest of this entry »

――

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.

Read the rest of this entry »

――