Posts Tagged ‘Debian Linux’

Debian-based distro adventures

Since my previous post, I’ve used:

I’ve compared MEPIS 8 and Ubuntu 9.04, in what was called an unfair comparison by some. I think some of the commenters even indicated that Ubuntu 9.04 would’ve come up tops, but I begged (and still do) to differ.

Since then, I’ve used Mint 7 and Kubuntu 8.04, which one may realize are using GNOME 2 and KDE 3 as well. So I guess a more appropriate comparison would’ve been:

  • MEPIS 8 versus Kubuntu 8.04;
  • Ubuntu 9.04 versus Linux Mint 7.

All of packages I use (e.g. php-pear, imagemagick, mysql-server) have the same names across the four distributions (but that’s probably due to Debian).

All four distributions work fine w/ Oracle Express Edition, which is a great way to try out Oracle database if you don’t happen to work for a large corporation that uses its (probably too-)expensive licenses.

I must say that it wasn’t so much the particular distribution, source distribution or version number that affected the speed of the interface, but rather, the window manager.

GNOME 2 just seems… slow. KDE 3 is well… snappy.

To me, there is no discernable difference between MEPIS and Kubuntu — both use KDE 3, except perhaps Kubuntu uses Adept whilst MEPIS sticks to good old Synaptic. Both are great applications nonetheless.

I’ll gripe about the loss of Dropbox, which is available both Ubuntu and Mint due to GNOME. Apparently there is command-line instructions available. But I digress.

On the upside, I can’t seem to (easily) setup a network printer in either MEPIS or Kubuntu. I followed the instructions on the Ubuntu website, and voila, I could print. Likewise for Mint, which is basically Ubuntu nicely themed. Or maybe I’m just scratching the surface.

Kdesvn and Meld are almost interchangeable, unless you want to view svn logs of course (use the former).

So there you have it. If you’ve got a high-performance, dual- (or quad-) core laptop, Ubuntu or Mint will do fine. But if you’ve got a 2- to 3- year old laptop, consider Kubuntu 8.04 or MEPIS 8. Unfortunately, I can’t access mepis.org anymore — the site is down, why? — and Canonical maintains fast servers, so I’ll be using Kubuntu for the forseeable future.

Oracle and PHP5 in MEPIS

This post helped me install Oracle XE on my developer machine successfully!

It worked for my Debian Lenny system previously, and now it’s tested to work with MEPIS 8.0, Ubuntu 9.04 and Linux Mint 7 as well.

1. Oracle Express Edition
This step is optional if you already have a server to use, but my inexperience it’s far better to have one local.

First you need to add this line to your /etc/apt/sources.lst:

deb http://oss.oracle.com/debian unstable main non-free

Then run the following commands:

su
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | apt-key add -
apt-get update
apt-get install oracle-xe

It’s a big .deb file, 210.4MB to be exact. The installation, like most in Debian systems is a breeze. When the installer completes there is one extra step:

su
/etc/init.d/oracle-xe configure

You’ll be asked to create a system/sys (administrative user) password, and whether or not to start Oracle on boot.

2. oci8 static object
With oracle-xe successfully installed, we’ll focus on getting Oracle and PHP to place nice.

I downloaded the RPM versions of these files from here:

oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
oracle-instantclient11.1-jdbc-11.1.0.7.0-1.i386.rpm
oracle-instantclient11.1-odbc-11.1.0.7.0-1.i386.rpm
oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
oracle-instantclient11.1-tools-11.1.0.7.0-1.i386.rpm

I’m sure that not all of the RPMs are required, so maybe you can try just basic, devel if you like. No guarantees, though.

I also converted it to deb using alien (which you may not have, but can install using ’sudo apt-get install alien’, and then installed:

sudo alien oracle*.rpm
sudo dpkg -i oracle*.deb

You need to log in to your oracle.com account and accept the software license.

You’ll need the ‘pecl’ command, which is available in php-pear, php5-dev:

sudo apt-get install php-pear php5-dev
sudo pecl install oci8

Input “1″ and hit Enter, then type (or paste) the following text.

instantclient,/usr/lib/oracle/11.1/client/lib

When you’re done, hit Enter twice to begin compilation. It takes awhile.

You’ll need to add one line to the end of your php.ini file:

sudo pico /etc/php5/apache2/php.ini

Page Down to the bottom, then add “extension=oci8.so”, and then Ctrl + X, Y to save. Repeat for the cli version too, found in /etc/php5/cli/php.ini.

Lastly, restart Apache:

/etc/init.d/apache2 restart

SimplyMEPIS 8.0

My slow laptop is now running on SimplyMEPIS 8.0. Surprisingly, it doesn’t feel that slow anymore. Maybe it was an OS issue, but I digress.

The install process was a breeze. I used mepis-network to setup wireless access, gparted to partition the hard disk into two partitions of 8GB (root) and 2GB (swap) each, and then it installed by itself. Later, it setup grub for me so that if I wanted to boot into Windows, it would comply. But I won’t of course. When I boot into MEPIS for the first time, I wanted to setup wireless again, since the install was a Live CD. But I didn’t even need to perform that step! The network settings that I added during the Live CD boot had been saved! Voila!

IMO networking, particularly wireless networking has to improve significantly, even Lenny. I wish it would just work, rather than having to jump through hoops, and even then, not work particularly well.

Up till now, I cannot connect to my home wireless router. Before Lenny was released, there was a tool called “wlassistant” that worked occasionally. But now it’s gone, and all of the other tools (kwifi-radar, wireless-tools) do not work. And it’s not a router issue, because my other Windows laptops connect easily.

I’ll try to set this up as a development machine; if things go well I just might switch my (primary) laptop to MEPIS.

Back to KDE 3.5.1

Two nights ago I reverted to KDE 3.5.1, as the UI was getting less and less responsive.

Krunner, Kate, Kdesvn for some reason felt slower than when I first installed KDE 4.1. There was also a silly issue with Kate (my primary text editor) which didn’t help.

Maybe it was the hardware, as my laptop was bought in Aug 2006, I’m not sure. But now I know why Lenny was released with KDE 3.x.y, it just feels more… complete.

Katapult-like functionality on KDE4.1

OK, this post is more about recovering the Katapult functionality that I love. In fact, I started using KDE because of Katapult! But I digress.

In KDE4, which I recently installed there is a program called KRunner. It works exactly like Katapult, but the shortcut key is Alt + F2. This is a VERY poor shortcut; it’s a stretch to hit the Alt and F2 button at the same time. Previously I used the excellent Katapult (Alt + Space) as a launcher/calculator.

To change the shortcut:

K -> System Settings -> Keyboard & Mouse -> Keyboard Shortcuts -> KDE Component (Run Command Interface) -> Run Command.

Click Custom, and then press Alt + Space, or whatever shortcut combination you want. Click “Apply”. Voila.

Please also note that you need to prefix an “=” when typing equations, unlike Katapult; e.g.

=60*24*365

instead of

60*24*365

KDE 4

Actually it’s KDE 4.1; apparently this is more stable that the point release, that’s why I waited as long as I did. For more instructions, see here. You probably need to upgrade to Lenny first — I didn’t check as I’m already on Lenny.

Well, late to upgrade (or update) as usual, but the wait (to upgrade) to KDE 4 was well worth it, as there was only one small dependency issue which didn’t affect the boot into KDE 4.

Way to go! Text seem to render much prettier now, which is a good thing!

:)

Wireless setup on Debian (Fujitsu Lifebook S7110)

WARNING: The following set of instructions is based on my on experiences setting up my wireless card, which was a big pain. No guarantees that anything mentioned below should work, of course.

The S7110 uses the Intel® PRO/Wireless 3945ABG Network Connection adapter (iwl3945). Use “lspci” as root to find out what type of network card you have:

# lspci -nn | grep "Intel"
05:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG Network Connection [8086:4222] (rev 02)

Now we’re are good to go. You’ll need at least the 2.6.24 kernel, which is available on “lenny” onwards. If you’re using Etch (or even Sarge), tough luck. Significant upgrades to follow. Find out what kernel is loaded:

# uname -a
Linux woteba 2.6.26-1-686 #1 SMP Thu Aug 28 12:00:54 UTC 2008 i686 GNU/Linux

I’m using 2.6.26, which is recent. Otherwise add the following line to /etc/apt/source.list:

deb http://ftp.tw.debian.org/debian/ lenny main contrib non-free

Now use Synaptic Package Manager to download at least the following packages:

linux-image-2.6.26-1-686
firmware-iwlwifi

After everything is downloaded and set up successfully, you’ll need to restart, and choose 2.6.26 during the boot sequence. Once booted into the new kernel, try:

# modprobe iwl3945
# iwconfig
.
.
.
wlan0     IEEE 802.11  ESSID:"MakeTeaNotWar"
Mode:Managed  Frequency:2.412 GHz  Access Point: 00:1F:9E:CF:58:B0
Bit Rate=54 Mb/s   Tx-Power=14 dBm
Retry min limit:7   RTS thr:off   Fragment thr=2352 B
Encryption key:6565-1671-75
Link Quality=76/100  Signal level=-58 dBm  Noise level=-87 dBm
Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:0  Invalid misc:0   Missed beacon:0

If “iwconfig” fails, you might need to download “wireless-tools”, using Synaptic. Good. The wireless card has been detected as “wlan0″. Your entries may differ, of course. The output above shows a connection to the router with SSID “MakeTeaNotWar”.

I use this software called “wlassistant”. It is a QT-based program, and has several dependencies, but it’s really easy to use. You can get it via Synaptic, of course. Once Wireless Assistant is up and running, you should be able to connect to most wireless networks.

References: Debian Wiki.

Linksys WUSB54gv4 in Debian (Etch)

The wireless support in Debian 4.0ro (Etch) is lacking, unlike MEPIS.

I’m using the Linksys WUSB54gv4, which is distributed by Starhub, so I imagine, most cable users in Singapore would be familiar. There are a few solutions (e.g. ndiswrapper, using the official .inf files from Linksys; downloading the .deb file from Serial Monkey), all of which do not work, for me at least.

If you browse the original CD provided by Linksys, the .inf file for wusb54gv4 is named rt2500usb.inf, which made me assume (incorrectly, as I would find out later) that it was using the Ralink RT2500 chipset. The driver works fine in Windows XP, but somehow it did not work correctly in Linux when using ndiswrapper.

After much Google-ing, i found that it is actually using the RT2570 chipset. You can download the driver here, under section rt2570 (USB).

You will need the Linux headers (if not already installed):

#apt-get install linux-headers-2.6.18-4

Checkout the README after unzipping said driver.

  1. cd Module
  2. make
  3. make install
  4. modprobe rt2570
  5. ifconfig -a

I saw the blessed new (rausb0) interface after the last command. Now you can click:

Desktop > Administration > Networking

and setup rausb0 accordingly. I’m using WEP 128-bit hexadecimal encryption, it works fine.

Debian 4.0 (Etch i386) netinst

I made the mistake of downloading and installing the netinst version of Etch.

I’d setup MEPIS 6.0 on my sister’s laptop previously, so I imagined it would’ve been a breeze for Debian.

The installation went successfully, except for the network detection part, but I dismissed it thinking that I’d be able to setup once everything was complete. I was so wrong. I had no IP address, so I was bumbling around without network connectivity, and horrors of horrors, it was commandline-only.

I Google-d around looking for some solutions; thankfully there was a spare laptop for use. It turns out that my (new) company’s sysadmin setup the router to NOT assign IP addressed by DHCP. It also happened that he was not around during the time that I was fumbling around, so there was no one to answer my queries.

In the end, the solution was to add entries to:

/etc/network/interfaces
/etc/resolv.conf

These settings are initalized upon each boot, since I am afterall using it as a workstation, not a server.

I found there was this apt package manager that was supposed to let me get X, KDE and all those fancy GUI bells and whistles. But it wouldn’t work. My /etc/apt/sources.list looked like this:

deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1 20$
 
#deb http://security.debian.org/ etch/updates main contrib
#deb-src http://security.debian.org/ etch/updates main contrib

I was supposed to use the command:

# apt-get install kde

So that I could get KDE up and running. It turns out that you need to comment out the line with the CD-ROM,

and getting the message that there was no such package. Hmmm. To cut the long story short, you have to comment out the cdrom line and add in:

deb http://ftp.tw.debian.org/debian/ etch main non-free contrib

So we get our package listing for wherever is good for you:

# apt-get update
# apt-get install x-window-system x-window-system-core kde kdm kdebase --fix-missing

If you get errors like “md5 checksum mismatch”, it was probably a network issue, so repeat.

# startx

There’s a lengthy wait, but no worries, KDE will come up fine. You won’t be needing to use the wizard since you are currently logged in as ‘root’. Just log out, and then reboot:

# telinit 6

It took me two(!) days to get my desktop up to scratch (aptitude, automatix, gaim, iceweasel, katapult, skype, synaptic, openoffice.org, wine, ..) because of the initial network problem and my inept-ness with apt-*.

My advice? Download the 4GB+ ISO for your installs instead.

Return top