Category Archives: ubuntu


[puppet forge] proletaryo-supervisor v0.4.0 now supports Ubuntu

Necessity is the great motivator.

I wrote this puppet module almost a year ago. The first version up to the last one only supports RedHat-based distros. Amazon Web Services is the primary platform that I use so the module is heavily tested and used in AWS Linux environments.

I was planning to support Ubuntu since day one but I managed to procrastinate because it’s not really needed in our deployments. That changed today though because we’re rolling out a few Ubuntu instances in AWS 🙂

I hope some people will find this module useful. It’s always open for contributions. Just fork it in GitHub:

If you have an existing Puppet installation, just install it in your Puppet Server:

puppet module install proletaryo-supervisor –version 0.4.0

Ubuntu 10.04 amd64 on Lenovo Thinkpad E125, making the LAN, Wifi, Video and Sound to work

UPDATE: I gave the official release of Ubuntu 12.04 LTS another try and everything worked out of the box! Nice!!!

So I guess I’ll have to give Unity another chance… (so far, I find the HUD useful)

After almost 2 years since my laptop died on me, I decided to buy a replacement. I proposed the idea to my wife, June, and she approved (maybe because I’ve been using her laptop for the past 2 years 🙂 ).

I’m targeting a >= 12″ inch netbook since I’ve learned in the last 2 years that I don’t need that much processing power . My usage pattern can settle for an Atom or Brazos CPU since I’m using laptops mostly as a terminal, the grunt work are done in servers. Besides,  I don’t want to haul a 2kg+ brick.

There’s a plethora of netbooks from different OEMs nowadays so there is a lot to choose from. I narrowed my list to these two: Lenovo Thinkpad Edge E125 or HP DM1. It was a tough choice to make. But after scouring a few stores (in Cyberzone MegaMall) and weighing my options, I settled with the E125.

I chose E125 because of these reasons:

  • Keyboard is better, IMHO
  • 2 DIMM slots (I’m planning to upgrade it to 8GB in the future)
  • no OS pre-installed

I tried installing Ubuntu 11.10 and Ubuntu 12.04 beta but these 2 are not that stable for my needs when I tested it. My SBW Huawei dongle is experiencing intermittent connections for one and I’m not convinced to switch to Unity yet.

This is the rundown of how I found device drivers for the Lenovo Thinkpad Edge E125.

core packages:

sudo apt-get install build-essential linux-image-generic linux-headers-genericcdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 ia32-libs


Download the driver from the Qualcomm website (direct link).

mkdir -p ~/drivers/lan-atheros && cd ~/drivers/lan-atheros
mv ~/Downloads/alx-linux-v2.0.0.6.rar ./
sudo make && sudo make install
sudo modprobe alx


sudo add-apt-repository ppa:lexical/hwe-wireless
sudo apt-get update
sudo apt-get install rtl8192ce-dkms
sudo modprobe r8192ce_pci


I encountered a problem with the sound configuration. Sounds are not playing in headphones if you plug one. It will just continue playing in the laptop speaker instead. I was able to fix it by upgrading ALSA to version 1.0.25, just use this guide on how to do it (just replace 1.0.23 with 1.0.25).


I was able to install the latest ATI Catalyst drivers by following this guide. The installation was successful when I installed the driver manually.

card reader:

Download the driver from the Realtek website. Make sure that you switched to superuser (not sudo) when running make, it will fail if you don’t.

mkdir ~/drivers/cardreader-realtek/ && cd ~/drivers/cardreader-realtek/
mv ~/Downloads/rts_pstor.tar.bz2 ./
tar -xjvf rts_pstor.tar.bz2
cd rts_pstor
sudo su
make install

additional packages:

sudo apt-get install vim-gtk ubuntu-restricted-extras pidgin-otr pidgin-libnotify openssh-server subversion rapidsvn


applications and browser add-ons/extensions that I really find useful

Here’s my list:

1. vi / vim / gvim
This is my editor of choice. Knowing the keyboard shortcuts is a must. The learning curve is a bit steep but it’s all worth it.

This is the my current vim settings, ~/.vimrc :

set nu
set nowrap
set tabstop=4
set shiftwidth=4
set expandtab
set wmw=0
set guioptions=mic
set autoindent
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
set laststatus=2
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12
set backupdir=~/.vimbackup,/tmp
syntax enable
colorscheme desert

" open tabbed left/right
nmap <C-h> :tabprev<CR>
nmap <C-l> :tabnext<CR>

" move the current line up/down
nmap <C-j>  :m+<CR>==
nmap <C-k> :m-2<CR>==

" move the selected block up/down
vmap <C-j>  :m'>+<CR>gv=gv
vmap <C-k> :m'<-2<CR>gv=gv

" indent/unindent selected
vmap <Tab> >gv
vmap <S-Tab> <gv

2. gnome-terminal
A good terminal is a good friend if you’re a Linux admin/developer. Yeah, I know some server settings can be configured with GUI tools, especially if you’re using a RHEL-based distribution,  but if most (if not all) of your Linux servers are headless and you’re in a cramped space and you have to access it remotely, your terminal is still your best friend.

I’m using these keyboard shortcuts patterned from vim 🙂

3. rapidsvn
This is my preferred GUI svn client. It’s simple and it works, and that’s all I need.

4. meld
This a diff viewer for GNOME. It can browse SVN working copies as well.

5. tomboy notes
This one is a life saver. It’s built for saving small tidbits of information and I don’t have to worry if I press save (it doesn’t have one). I find the features search and synchronization to Ubuntu One very useful. I seldom use the “note linking” feature though.

6. gnome-dictionary (with offline enabled)
Having a handy-dandy dictionary while you’re reading some articles is always a good thing. You’ll never know when you’ll encounter those pesky new words. By default, gnome-dictionary needs an internet connection but you can an install an offline dictionary as well. Here’s a good guide that I followed to make it offline.

7. pidgin
This was the default IM client of Ubuntu before it was replaced by Empathy. One good reason why I can’t let go of Pidgin is because of its Off-the-Record plugin (pidgin-otr), basically, encryption support. The last time I checked, Empathy is not interested in OTR, so I’m not interested in switching in the foreseeable future either.

8. browsers & add-ons/extensions
I interchangeably use Firefox and Chrome. I was planning to switch to Chrome completely but it doesn’t support the Offline feature of Gmail.

These are the add-ons or extensions that I use…

downthemall!, this is a nice download manager
gmarks, this is how I keep my bookmarks in-sync with Chrome, its keyboard shortcuts are a gem: ctrl-d to add, tap Home twice to search
flashblock, nice tool to block annoying, huge flash applications/ads

Google Chrome:
chrome bird, nice twitter client with built-in support for URL shorteners
google bookmarks, extension to access my Google bookmarks. But unlike its Firefox counterpart it doesn’t have keyboard shortcuts… 😦
flashblock, same as the firefox add-on

9. Ubuntu One
Sync files. That’s it. I sync my documents to Ubuntu One so I don’t have to bring my work laptop every time I travel. All I need to do is set-up June’s netbook to access my Ubuntu One account and I’m ready to access my documents in case I need to.

By the way, this only works in Ubuntu and the first 2Gb free 🙂

10. Wammu
This application is very helpful if you need to send/receive SMS in your Ubuntu machine. See my previous post for more details.

11. gnucash
This is an accounting software. It’s a big help if you need to keep track of your finances (I think we all need to). Learning curve can be steep if you don’t have a background in simple accounting (debit/credit). The gnucash’s built-in help can assist if you find it difficult.

12. frogr
If you have a flickr account and you need to upload hundreds of photos, this is a good tool you can use in Linux. I’ve tried other tools but I’ve settled with this one because it can handle intermittent connections better. It’s not in the Ubuntu repository yet but you can download frogr here.


Send / Receive SMS messages using Wammu and a Huawei e160 dongle in Ubuntu 10.04

The same case as most hardware vendors, Huawei’s support for Linux is disappointing. It doesn’t have an out-of-the-box application that you can use right away for Linux if you want to send/receive SMS through your dongle. For Windows? yes. For Mac? yes. Linux? just a plain simple NO.

I’m having these frustrations because I’ve been using a prepaid Globe Tattoo for the past few weeks. I use Ubuntu as my main OS and I only switch to Windows if (and only IF) there’s a task that I can’t accomplish on Ubuntu.

If you’re familiar with Globe Tattoo’s SUPERSURF service, then you know that you can only subscribe to it by sending an SMS message (e.g. SUPERSURF50 to 8888).  Switching to Windows just to activate SUPERSURF then switching back to Ubuntu to really connect to the internet became an annoyance after doing it for a few times. Besides, Globe Tattoo has currently a bandwidth cap and you’ll only be notified that you’ve reached it through an SMS!

There has to be a better way and most of the time, the Linux community provides it. After a little Google search, I saw this site and it lead me to Wammu.

Now, Wammu isn’t perfect. If you’re expecting an application that will notify you right away if your dongle received an SMS, Wammu’s not it. But, it can send and receive SMS, you just have to be patient with it 🙂

To install it, just run this in your terminal:

$ sudo apt-get install wammu

Or, search for Wammu in Ubuntu Software Center (Applications -> Ubuntu Software Center)

Once you’ve done installing it, plug in your dongle and run Wammu. You can find it in: Applications -> Accessories -> Wammu

main application window

To let Wammu detect your dongle, run the phone wizard and just follow the on-screen instructions, click on: Wammu -> Phone Wizard

my setting for my Huawei e160 dongle after running the phone wizard

To connect to your dongle, click on: Phone -> Connect

waiting screen

Once you’re connected, you can retrieve the SMS messages in your dongle by clicking: Retrieve -> Messages

my messages a few days back, don’t be surprised by the date in the bottom 🙂

Note: As far as I know, Wammu won’t retrieve new messages automatically. In my case, I have to check for messages manually, the shortcut Alt + R, M comes in handy.

To send an SMS, click on: Create -> Message or Ctrl + M

make sure you’ve checked the “Send message” checkbox before clicking OK

And this is how I send / receive SMS in Ubuntu using Wammu. It’s not perfect, but it works 🙂

How to calculate the total bytes you’ve downloaded if you’re using a Huawei dongle in Ubuntu

Since I’m using Globe Tattoo right now and its SUPERSURF service has a daily cap of 800Mb, I have to have a way to check my usage.

And I wrote this one liner to do just that:
$ pcregrep "$(date +%b)\s+$(date +%d).+pppd.+received" /var/log/messages | perl -e 'use strict; my $t=0; while(<>) { if(m/received (\d+)\s+/) { $t=$t+$1; } } print "$t\n";'

If pcregrep is not installed in your system, you can install it by running : sudo apt-get install -y pcregrep

The downside of this approach is I have to disconnect first to get an accurate reading. If you have a better idea, please let me know 🙂

Gmail with Offline enabled with Firefox 3.6.12 in Ubuntu 10.04

A couple of months ago, I switched from Firefox to Google Chrome because the fox is eating a lot of memory. And to free that up, I have to quit Firefox with all the opened tabs (unlike in Chrome) and just run it again, which is pretty annoying if you have a lot of tabs opened.

So, I decided to switch to Google Chrome. Then, I found out that Google Chrome for Linux doesn’t support Gmail’s Offline feature, one feature that I really find quite handy. Still, I stayed with Chrome, hoping for the best that eventually, Offline will be supported in the next releases. Ironic that Gmail Offline is not supported in Google Chrome…

After months of hoping and waiting… still no Gmail Offline support. *sigh*

I decided to switch back to Firefox. The last time I installed Google Gears, it’s not supported yet in 64-bit, that’s why I looked for ways on how to do it.  I was using Ubuntu 9.04 back then. Since I already upgraded to Ubuntu 10.04, I figured that I’ll just have to retrace the steps that I did back then.

Apparently, I don’t have to. Google Gears installs fine in 64-bit nowadays 🙂

How-To: Enable bluetooth internet using Ubuntu Karmic 9.10 + Sony Ericsson K770i

Long before USB 3G modems and mobile broadband became ubiquitous, most phones can already be used as modems a few years back. It can either be by USB cable or Bluetooth. A good friend of mine even created a detailed guide on how to enable Bluetooth internet three years ago. It’s a series of steps, has a lot of manual tasks, but it’s the only option during that time.

Using a phone to connect to the internet via Bluetooth may not be practical in a sense, but the holiday season is here, a long vacation awaits for me, so I have to keep this option open. Besides, I’ll be out of the metro, so my Sun Broadband Wireless is quite useless.

So, I was revisiting the steps in how to enable Bluetooth internet in Karmic and it turned out to be a breeze… (proves the point things are improving in the Linux community)

Here’s how I did it in Ubuntu Karmic 9.10, using a Sony Ericsson K770i phone:

Note: Before anything else, I enabled Bluetooth in my K770i and made sure that it’s visible.

1. I made sure first that Bluetooth is enabled in my laptop (of course!).

2. I clicked on the Bluetooth icon, then clicked on Set up new device… It gave me this window, Bluetooth New Device Setup

3. I clicked on Forward, then, it searched for Bluetooth devices…

4. I selected my phone, jhayem-k770i, then clicked on Forward, then it gave me the PIN window.

5. The k770i detected that a device wants to pair, it asked for the PIN and I entered the PIN provided above. The phone inquired if I want to enable the following:
    – add to pro-ubuntu-0 to my Devices? – Yes
    – allow pro-ubuntu-0 to use the phone as modem? Yes, Allow always
    – allow pro-ubuntu-0 to use your phone as remote control? – Yes
    – start remote control now? – No

6. After all those inquiries, the Bluetooth New Device Setup has this last window

7. I checked Access the Internet using your mobile phone, then clicked on Close

That ends the set-up part, now, how to connect?

Once your done with the set up, If you click on the Network Manager icon, you now should have a PANU in your list of networks…

Just click on that to connect to the internet via Bluetooth through your phone :p