Archive

Archive for the ‘Linux’ Category

Using the @ZainJo HSPA Dongle With Ubuntu Linux

April 4th, 2011 No comments

After my experience with Zain’s WiMAX, I didn’t think I’d be using their service again. But Zain gave me a 21Mbps dongle (The Huawei E367) for free as to see how much better the new service is and I thought I might as well try it. I’ll be writing on my experience with the service in a separate post inshalla.

I’m a big Ubuntu fan and been using it as my primary desktop since 2007, and Linux compatibility has always been absent in the mobile Internet world. I wasn’t gonna switch my primary OS just to use a USB dongle.

After plugging it in nothing happened, didn’t see a notice on the screen, no pop-pups or anything to show that something happened. After a quick lsusb I found this:

Bus 002 Device 005: ID 12d1:14ac Huawei Technologies Co., Ltd.

Kudos Huawei on showing us Linux users some love. Zain gets extra points for this choice.

Ok let’s get this bad boy configured. I got the settings from Zain’s Windows application. The following was done on Ubuntu 10.10, other distributions might vary.

1) If the dongle was unplugged when you booted your computer, restart Network Manager (sudo service network-manager restart), wait a few seconds, then right click the Network Manager icon and choose “Edit Connections…”

2) Go to the “Mobile Broadband” tab and click “Add” (You will not see “Zain Jordan” on your screen)
3) The following screen will show up, if you didn’t restart Network Manager you will not see the Huawei modem, click “Forward”
4) Choose “United States” then click “Forward”, don’t bother looking for Jordan, you won’t find it
5) Choose “I can’t find my provider and I wish to enter it manually”, then enter any name you desire, I chose “Zain Jordan”
6) Choose “My plan is not listed…” and for “Selected plan APN (Access Point Name)” enter “zain”, all lower case letters, without the quotes, then click “Forward”
7) Click “Apply”
8 ) The following window appears, don’t change anything except “Username” and “Password”, set them to “Zain”, all lower case except for the Z, then click on “Apply”
9) You’re all set, to connect, left click on your Network Manager icon and choose your connection name
If you face any issues, just remove the dongle, reconnect, then restart Network Manager.

Categories: Linux, Technical Tags: , , , ,

Ubuntu 10.04

When Ubuntu 9.10 came out I was very eager to try it, but sadly I was very disappointed. So when I was downloading 10.04 I wasn’t really expecting anything. I’m glad I was wrong.

So far it appears the sound and flash issues have been fixed. Empathy seems to have gotten some improvements. Most noticeable are the fact it now saves the window position of the contact list, and gives you an indication when the person you’re chatting with on Google Talk is typing something on the keyboard.

If you hate the new window button placement, like I do, here’s how to fix it:

  1. Open gconf-editor
  2. Got to /apps/metacity/general
  3. Change “button_layout” to “menu:minimize,maximize,close”
Categories: Linux, Technical Tags: ,

Speeding up Firefox under Ubuntu

February 14th, 2010 No comments

Ever wonder why browsing under Ubuntu is slower than Windows even on the same network? Well, it has to do with Ubuntu enabling IPv6 by default. This means Ubuntu will try IPv4 only after IPv6 times out. Also, Firefox comes built with Pango by default which makes it slower than it should be. I’ve fixed that on Karmic Koala, other versions should be similar. Here’s how to do it:

Disable IPv6 globally:

sudo vi /etc/default/grub

then find

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and replace it with

GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”

Then update grub from the command line

sudo update-grub

Tell Firefox not to load Pango:

vi ~/.bashrc

and add

MOZ_DISABLE_PANGO=1

at the end

Tweak Firefox’s about:config settings:

network.http.pipelining -> True
- network.http.pipelining.maxrequests -> 8 or 10
- network.http.proxy.pipelining -> True
- network.dns.disableIPv6 -> True

Enjoy

Cleaning up your boot partition with Ubuntu

December 25th, 2009 No comments

If you haven’t reinstalled Ubuntu in a while, the /boot partition will eventually fill up with all the updated kernels, and you’ll get an error when trying update.

At first I used to uninstall the old kernels manually but being lazy I think it’s too much work. When you get the error with update-manager or Synaptic try this:


sudo aptitude search linux -w 160 | egrep '(image|headers|restricted)' | egrep '^i' | grep -v 'KERNEL_VERSION' | grep -v -P '[^d]-generic' | grep -v linux-restricted-modules-common | sed 's/i A/i  /' | awk '{print $2}' | xargs sudo aptitude remove

Replace “KERNEL_VERSION” with your currently running kernel.

This might break your grub configuration but update-manager will fix that for you so no need to worry. Just make sure you run this BEFORE update-manager does the update.

To be honest I didn’t try this without “grep -v ‘KERNEL_VERSION’” so I’m not sure if removing it would break something. Just leave it there to be safe.

Categories: Linux, Technical Tags:

Empathy, the new kid on the block

February 5th, 2009 No comments

If you’ve used Linux as a desktop, you’ll know it’s only playing catch-up when it comes to instant messaging. I’ve been using Pidgin since was called Gaim, I think I started using it back in 2003. I love how minimalistic it is. Sadly the developers are going nowhere with it, at least that’s my (as well as a few others) humble opinion.

I stumbled upon this post which mentions a new (or maybe just new to me) client called Empathy. After playing with it for a few days now I think it has great potential. It’s still pretty basic but also under heavy development. It’s very minimalistic and uses the Telepathy library, which IMHO is a better approach than Pidgin’s libpurple.

It still doesn’t have proxy support, but you can work around that, at least for MSN and Gtalk, the protocols that I use. Here is how I did it it:

Gtalk: Just create a tunnel with SSH


ssh -C -q -f -M 0 -N -L 5223:209.85.137.125:5223

Where 209.85.137.125 is the IP address of talk.google.com, then set the account to use localhost as a server

MSN is a little different, this trick didn’t work because the client connects to a login server, which redirects the client to a different server. MSN is implemented using the telepathy-butterfly executable. Just use a socks server like this:


mv /usr/lib/telepathy/telepathy-butterfly /usr/lib/telepathy/telepathy-butterfly-old
vi /usr/lib/telepathy/telepathy-butterfly

#!/bin/bash
exec /usr/bin/tsocks /usr/lib/telepathy/telepathy-butterfly-old

chmod +x /usr/lib/telepathy/telepathy-butterfly

Enjoy :)

Categories: Linux Tags: , , ,

Google Chrome on Ubuntu

September 5th, 2008 2 comments

I came across this guide about installing Google Chrome under Ubuntu. It is somewhat slow, slower than Windows and much slower than Firefox but it still works, well, kinda. You have a few problems with fonts, as well as sites that don’t work properly with Chrome yet. I’m sticking with Firefox for the time being, but at least I have an option for those sites that aren’t compatible with it.

I wrote this post from Chrome, so yeah, it does work :)

Categories: Linux, Technical Tags:

Slow Browsing Under Ubuntu

August 23rd, 2008 2 comments

EDIT: This post only covers IPv6, please check the update post which covers IPv6 and Firefox

Today when I rebooted to my Windows installation which I very rarely do, I noticed that browsing under Windows feels much faster than under Ubuntu. After booting back to Ubuntu I noticed the “looking up domain.tld” part was taking a lot of time, which seemed a little odd.

Anyways, after some googling I found out that Debian enables IPv6 by default and uses that before and uses it before IPv4. A quick remedy was:

sudo vi /etc/modprobe.d/bad_list

#Add this line
alias net-pf-10 off

After which you should reboot your system. Now browsing feels much faster. To speed it up a little I installed a local caching DNS server which works like a charm. A quick HOWTO can be found here

Hope this helps.

Microsoft Keyboard Function Key Fix

July 14th, 2008 1 comment

I’ve owned a Microsoft MultiMedia Keyboard 1.0A for years now. It’s a well belt keyboard to say the least. Only one problem though, the “F Lock” key. As a Linux user I have no use for the “Special” keys Microsoft added to the keyboard, and the button always starts turned off, no way to fix it.

I used to keep my PC on at all times so I only needed to press that button every couple of months, or when I want to take a screenshot, but now I started to turn it off at night, and having to press that stupid button every time I boot my system is a huge pain in the butt.

I found a fix for it here and thought I should share

vi /usr/local/bin/f_lock_fix
setkeycodes bb 59 # Help  -> F1
setkeycodes 88 60 # Undo  -> F2
setkeycodes 87 61 # Redo  -> F3
setkeycodes be 62 # New   -> F4
setkeycodes bf 63 # Open  -> F5
setkeycodes c0 64 # Close -> F6
setkeycodes c1 65 # Reply -> F7
setkeycodes c2 66 # Fwd   -> F8
setkeycodes c3 67 # Send  -> F9
setkeycodes a3 68 # Spell -> F10
setkeycodes d7 87 # Save  -> F11
setkeycodes d8 88 # Print -> F12
chmod 700 /usr/local/bin/f_lock_fix

Now add this to your startup file “/etc/rc.local” or equivalent

if [ -x /usr/local/bin/f_lock_fix ]; then
	echo "Fixing the F-Lock scan codes for F1-F12 keys...";
	/usr/local/bin/f_lock_fix;
fi

Surround sound under Ubuntu Hardy Heron

April 27th, 2008 4 comments

Been using Ubuntu Hardy Heron for about a month now, and I have to say it rocks, the best Desktop Linux so far.

Anyways, I have a Creative Audigy 2 card since I’m not a fan of software mixing under Linux, which is connected to an old creative 4.1 set. Since I don’t have any space I hooked only the front speakers and use the rear channels with a headset. After upgrading to Hardy I couldn’t get the headset to work. I just found the solution on the Ubuntu forums and thought I should document.

The new Ubuntu uses PulseAudio as it’s default sound engine, you can set volume levels for each application separately which is cool if you ask me. PulseAudio uses 2 channels by default. All you have to do is change:

; default-sample-channels = 2

To:

 default-sample-channels = 6

In /etc/pulse/daemon.conf, then restart gdm and you’re done

Booting Windows and Linux using the NT loader

April 20th, 2008 No comments

I recently decided to install Windows on my home PC since I wanted to play some games, it’s been about 3 years since I started using Linux exclusively but thought a change would be nice. Since I didn’t find good guides I decided to write my own :)

Why would you want to do that? Well, back when I used to dual boot on a single drive I used to re-install Windows very frequently. Windows wipes out grub during installation so I needed to keep grub on a separate partition.

This guide assumes you have 2 hard drives; one for Linux and the other for Windows, you can do the same with a single drive but with minor changes.

Install Windows on the first hard drive
Install Linux on the second drive, and install grub on the master boot record of that drive
Download Grub4Dos
Save grldr and menu.lst to C:
Edit menu.lst and put the following:

title Linux
chainloader (hd1)+1
rootnoverify (hd1)

Edit your boot.ini and add the following line:

C:GRLDR="Linux"

Another way to do this is using bootpart. Make sure to install grub on the first sector of the boot partition because bootpart can’t read master boot records.

Categories: Linux, Technical, Windows Tags: , , ,