Enable window shading on mouse wheel action on Nautilus/Gnome

- open gconf-editor
- maximize apps
- choose “gwd”
- change the value of “mouse_wheel_action” to “shade”

Huawei E170 on MacOSX

So basically you own a MacBook, MacBook Pro, MacBook Air or the rest of the MacExtravaganza, and then you bought the latest 3G, 3.5G Huawei USB modem from your GSM provider and you want to hook it up to OSX, here are the steps:

- Download the drivers from: http://www.shasam.net/downloads/huawei-usb-modem-osx-drivers.zip
(Intel architecture)
- Download the drivers from: http://www.shasam.net/downloads/huawei-e220-mac-osx-ppc-drivers.zip (PPC architecture)
- Plug the modem to your Mac
- Open Network Preferences and click on +
- Select HUAWEI Mobile from the interface list
- Enter your the phone number: *99#
- Account Name and Password should remain Blank
- Click Advanced
- In the advanced window select Generic as the vendor and GPRS (GSM/3G) as the model
- You should ask your GSM/3G provider the APN along with the CID and use these information
- Click Apply and then Connect

Enjoy!

Pent@net DVB card on Linux (Debian)

Hello,

So basicaly you want to install a cheapo Pent@net DVB satellite PCI card on your Debian/Ubuntu machine, i had a hard time finding documentation for 2.6 kernels, i tried it on 2.4 and it worked perfectly. However, i’m certain that trying this same method on 2.6 kernels, no issues should occur.

Packages to download:
- autoconf
- automake
- kernel-headers-2.4.* < -- depending on your  kernel, 2.4.27 worked fine for me
- kernel-source-2.4.* < -- 2.4.27 in my case
- gcc & co
- pentanet-utils
- pentanet-dev

Installation steps:
- untar/gz the kernel-headers located in your /usr/src (Debian), and rename the untared file: /usr/src/linux
- untar/gz the latest Pent@net drivers, in my case 3.1: tar zxvf pentanet-(RHx-)x.x.x.tar.gz
- cd pentanet-(RHx-)x.x.x
- autoheader
- autoconf
- aclocal
- automake
- ./configure
- make clean
- make
- make install (You have to be the root user.)

Completing these steps, you’ll be able to ifconfig pentanet0….congrats

ps: leave me a note if it worked for 2.6

Installing/Updating NVIDIA Linux drivers (X.org)

Alright, so let’s say you want to install/update the latest NVIDIA drivers for your Linux machine, you downloaded the drivers from www.nvidia.com, ran the NVIDIA-Linux-(arch)-versionnb.run script but X still doesn’t want to boot, you probably missed few steps.

  1. Download the NVIDIA Linux drivers from www.nvidia.com
  2. chmod +x
  3. if its a fresh install skip to step: 5
  4. Unload module “nvidia” using rmmod or modconf (debian)
  5. Kill your X server, i usualy do a /etc/init.d/gdm stop
  6. Run the driver installation script and follow the instructions
  7. Depending on your distro, everything should work normaly, on Debian i had to create symlinks from /usr/X11R6/lib/modules/nvidia_drv* to /usr/lib/xorg/modules/drivers/
  8. You might as well want to enable glx, for that create symlinks from /usr/X11R6/lib/modules/extensions/* to /usr/lib/xorg/modules/extention/
  9. Load the module “nvidia” using modprobe or modconf
  10. Change your /etc/X11/xorg.conf using “nvidia” in the Driver variable of the Section “Device”
  11. Restart X, i use /etc/init.d/gdm start
  12. Enjoy !!

cdrecord/cdrdao on a USB CD-RW/DVD-RW on Debian

So…you got a new external USB CD-RW / DVD-RW and you don’t know how to run it on Debian GNU/Linux? no problemo amigo!

thing is, the Linux kernel emulates all USB devices as SCSI devices so you really have to know what kernel drivers you choose while compiling your kernel. Normaly to run a USB CD-RW/DVD-RW you need the following drivers to be compiled with the kernel:

- SCSI emulation support
- IDE/ATAPI CDROM support
- SCSI disk support
- SCSI CDROM support
- SCSI generic support
- USB device filesystem
- EHCI HCD (USB2.0) support
- USB Mass Storage support

of course, its your choice to compile log support for SCSI or USB, after compiling and modprobing the modules chosen (you can do that using modconf), get the following packages from apt:

apt-get install cdrdao cdrecord usbmount usbutils dvd+rw-tools

Of course, if you download k3b (KDE’s CD/DVD burner) for example, it will automaticaly download some other necessary packages.

that’s it, you should now be able to burn on your new external USB CD-RW/DVD-RW

Upgrading from Debian stable to testing (or unstable)

So you’re in your fresh Debian sarge (stable) installation and you want to upgrade to testing or unstable and the first thing you try to do is to [code] apt-get dist-upgrade [/code] but you’re shocked to see an error message that says:

E: This installation run will require temporarily removing
the essential package perl-base due to a Conflicts/Pre-Depends
loop. This is often bad, but if you really want to do it,
activate the APT::Force-LoopBreak option.

So the first step to fix that is to upgrade the following packages: e2fslibs, e2fsprogs, libc6 and finally libc6-dev. To do that, you need to insert a special option in apt that will allow you to by pass the Force-LoopBreak issue by issuing the following command:

apt-get -o apt::force-loopbreak=true install e2fslibs e2fsprogs libc6 libc6-dev

once this is done, you can go on by issuing apt-get dist-upgrade

enjoy !

Enable spell check in Evolution 2.2x on a Debian installation

To enable spell check in your favorite mail client, Evolution (2.2.3 while writing this blog) few packages should be apt-getted

apt-get update

Here I want to enable US English spell check, here are the packages you need to fetch:
apt-get install aspell-en gnome-spell aspell libaspell15 ispell myspell-en-us

After this is done open up Evolution -> Edit -> Preferences -> Composer Preferences -> Spell Checking -> Check the language you want to enable -> Check “Check spelling while I type” -> Choose a color -> Close and you’re done.

Enjoy!

Sushi (a.k.a Sultan Basha)

So that’s my 1 year old cat ‘Sushi’ wasted…meow?
Sushi, the cat

IRC’s DCC Send behind iptables

To establish an IRC’s DCC Send connection behind your Linux’s Iptables firewall few modules should be compiled/loaded on your kernel to make this connection possible.

While compiling your kernel make sure to add the following drivers on the kernel or compile them as modules:
ip_nat_irc
ip_conntrack_irc

Note: When both drivers are compiled as modules remember to modprobe them, a good idea is to insert the lines in your firewall script:
modprobe ip_nat_irc
modprobe ip_conntrack_irc

-Your IRC client should not set to any unsual IRC networking settings such as: Behind a firewall, proxy, socks etc…
-Set your IRC client to get Local host and IP address on connect, for mIRC, the lookup method should be set as “normal”
-For Windows XP SP2 users, turn off the Firewall option or just set mIRC as an exception.

Note: If on the firewall’s syslog you get:
kernel: Forged DCC command from internalIP: externalIP:ports
then something is wrong on your client.

Use عربي/arabic on your Debian system

From the first day i started using GNU/Linux as my main machine at home or at work, beeing able to browse arabic websites was a complete failure. The default fonts that Debian installs by default with X11 or even the packages I tried to install such as:

  • ttf-arabeyes
  • ttf-kacst
  • xfonts-intl-arabic
  • were no good.

    I’m no fonts expert but what made it work is when i apt-get’ed the following packages:
    apt-get install ttf-arabeyes ttf-kacst xfonts-intl-arabic msttcorefonts

    msttcorefonts – “Microsoft TrueType Core Fonts” made it work (i guess), give it a try, restart X11 and you should be able to browse in arabic.

    Now, in order to write in arabic in most of the application you use, insert in your ~/.bashrc:
    setxkbmap -symbols "us(pc105)+ar+group(ctrl_shift_toggle)"
    group(ctrl_shift_toggle) enables you to switch from Latin to Arabic by using the combination “Ctrl+Shift”.

    enjoy!

    Connect your Linux machine via a LAN Internet

    If you’re reading this, its most likely that you have no clue how to connect to the L.A.N Internet (in Lebanon referred as: Cable connection) using your brand new Linux operating system. Don’t feel bad, you’re not alone.
    Everybody had to ask few questions on how to get the freakin’ internet work, and without the help of some folks in the Lebanese LUG, I would have still been using Microsoft’s Windows because connecting to the internet with it is so easy.
    Internet is an important element when it comes to general computing, so if someone wants to introduce a new computer system such as Linux, at least let it run the most used service.

    Now remember, you will not connect directly to the internet. Basically I’m going to teach you how to connect to a network that will enable you to use the internet.
    I’m not going teach how to use a certain distro, or a certain GUI. Distro’s network settings sometimes differ, so what I’m going to help you with is ignoring all the distro’s default settings and write your own internet.sh script that would let you connect to the internet as easy as 1, 2, 3…

    So lets see what you have:
    A cable coming down from outside directly plugged to your NIC (Network Card), normally if you have one NIC, it would be named: eth0 (ethX -> X will change if you have more than one NIC). In this example we’re gonna use only one NIC to enable Internet on one station only.

    General internet connection requirements:
    - an IP address + netmask
    - a Gateway address
    - a DNS address
    - and sometimes a Proxy server address.

    Know what you need. It’s important to know what you need to connect to your ISP’s (Internet Service Provider) network. You will definitely not guess those. While having a nice conversation with your ISP, ask them for the following:

    - Your personal external IP address + netmask (will use 192.168.0.55 and netmask: 255.255.255.0 as example)
    - Your network address (If your IP is xxx.xxx.0.xxx then your network address would be xxx.xxx.0.0) – The gateway’s (Server) internal IP address (will use 192.168.0.1 as example)
    - Your DNS (usually same as the gateway) internal IP address (will use 192.168.0.1)
    - and finally, ask him if he uses a proxy server, write down it’s IP address and port if the ISP uses one. (Will use 10.3.3.1 port 8080 as example; don’t get shocked if the proxy’s ip address is the same as the gateway and/or DNS).

    You also need to know the following:

    -Path for Ifconfig
    -Path for Route

    to do that do the following, open a terminal and write down:
    haytham@sadusbox:/$ whereis ifconfig && whereis route

    You’ll get something similar to:
    haytham@sadusbox:/$ whereis ifconfig && whereis route
    ifconfig: /sbin/ifconfig /lib/ifconfig ...
    route: /sbin/route /usr/share/man....

    We’re just interested in these:
    ifconfig: /sbin/ifconfig
    route: /sbin/route

    Now that you gathered enough information, open your favorite editor, (will use VIM here, know how to use your editor for the following commands, open, save as, close)

    Write down what is written in the box, and change the variables to your needs (Variables start from the START EDIT comment to the END EDIT comment)
    #!/bin/bash
    #-------START EDIT--------
    #Setting some variables
    echo "Setting Variables..."
    NICNAME=eth0
    EXTERNALIP=192.168.0.55
    SUBEXTERNALIP=255.255.255.0
    NETWORKIP=192.168.0.0
    GATEWAYIP=192.168.0.1
    DNSIP=192.168.0.1
    IFCONFIG=/sbin/ifconfig
    ROUTE=/sbin/route
    #-------END EDIT--------
    #Initialize external NIC IP address
    echo "Initialize external NIC ($NICNAME) IP address"
    $IFCONFIG $NICNAME $EXTERNALIP netmask $SUBEXTERNALIP up
    #Setting Network and Gateway Settings
    echo "Setting Network and Gateway Settings"
    $ROUTE add $EXTERNALIP $NICNAME
    $ROUTE add -net $NETWORKIP netmask $SUBEXTERNALIP $NICNAME
    $ROUTE add default gw $GATEWAYIP eth0
    $ROUTE add -host 127.0.0.1 lo
    #Adding a DNS server
    echo "Adding a DNS"
    echo " " > /etc/resolv.conf
    echo nameserver $DNSIP > /etc/resolv.conf
    echo "..."
    echo "Internet is enabled, happy surfing..."

    Save this file as: internet.sh in your /home/user/ directory and then set its permissions to 755 by doing the following command:
    haytham@sadusbox:/$ chmod 755 /home/user/internet.sh

    you can now login as SuperUser and just write:
    haytham@sadusbox:/$ su
    Password:
    root@sadusbox:/$ sh internet.sh

    Internet should be smiling at you. If your ISP uses a proxy server address don’t forget to add the proxy server’s address (10.3.3.1 and port 8080) inside your favorite web browser so that you would be able to surf the pages and most importantly in your .bashrc script so that it would let you connect to the proxy from bash. To do that open with your favorite editor the file .bashrc and write the following in the first lines:
    export http_proxy=http://10.3.3.1:8080
    export ftp_proxy=http://10.3.3.1:8080

    Back to Beirut

    So i’m back from my “Internship” in Saudi Arabia and Lebanon never felt so commodious!
    I’m preparing for a project i’ll be working on with the same company i visited in Saudi Arabia, some sort of Partnership so that’s taking most of my time, aaaaand not to forget my preparations for University.

    time to hit the sack! good night

    K.S.A

    Heya folks,
    I’m currently in K.S.A (Kingdom of Saudi Arabia for those who don’t know) doing my internship at Nesma Internet (http://www.nesma.net.sa).
    I should be back on Sunday the 18th of Sept. lots of things to be done before school starts.

    Enjoy your time in this personal purposeless blog of mine.

    Powered by WordPress with GimpStyle Theme design by Horacio Bella.
    Entries and comments feeds. Valid XHTML and CSS.

    haytham’s crib is Digg proof thanks to caching by WP Super Cache!