Aug 16 2012

Getting Broadcom wireless to work with Debian Wheezy (kernel 3.2)

Éverton Arruda

First of all: HAPPY 19th BIRTHDAY, DEBIAN!

Recently, I have reinstalled Debian Wheezy in my notebook, and as usual I had problems with my NVidia graphics and Broadcom wireless cards.

The NVidia graphics card is for another post. In this one i`ll show you how to get your Broadcom wireless card to work in Debian Wheezy (which is frozen, by the time i write this), with kernel 3.2

My wireles card is: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)

I tried to compile the driver, as i usually do (as you can see in an older post[0] i wrote about it), but nothing happened. I tried to follow the steps in Debian`s wiki[1] and in one of those steps i got a message saying that the driver did not support the kernel version i was using.

So i went to ask Google about it and i found out that it really has no support for kernel 3.2, yet. But luckly we have another way to get it working.

All you have to do is add the necessary repositories to the sources.list, update your packages list and install the firmware package:

1
2
3
# echo "deb http://ftp.br.debian.org/debian/ wheezy main contrib non-free" >> /etc/apt/sources.list
# apt-get update
# apt-get install firmware-linux-nonfree firmware-b43-installer # or firmware-b43-lpphy-installer

And there it is! Or, at least, it should be.

The firmware package to install will depend on your Broadcom wireless card. You can check you cards with the lspci command.

I found this information on VivaOLinux[2]

Links:
[0] http://earruda.eti.br/blog/2010/07/getting-broadcom-wireless-cards-to-work-on-debian/
[1] http://wiki.debian.org/wl/
[2] http://ftp.vivaolinux.com.br/topico/Debian/Problemas-com-wireless-5


Jul 4 2012

A practical GIT web-tutorial. TryGit

Éverton Arruda

Want to learn how to use GIT[0]?

There’s a practical web-tutorial called tryGit, created by CodeSchool[1] and sponsored by GitHub[2], which is a great place to start.

All you have to do is access http://try.github.com/ and begin your studies.

Links:
[0] http://git-scm.com/
[1] http://www.codeschool.com/
[2] http://github.com/


Mar 29 2011

Iceweasel 4 on Debian Squeeze/Wheezy

Éverton Arruda

For those of you who don’t know what Iceweasel is, it’s written in Debian’s Wiki[0]:

Iceweasel is a fork Mozilla Firefox[1] with the following purpose :
1. backporting of security fixes to declared Debian stable version.
2. no inclusion of trademarked Mozilla artwork (because of #1 above)
Beyond that, they will be basically identical. (quoting Roberto C. Sanchez post in debian-devel mailing list)

Iceweasel’s (and Firefox’s) latest version, 4.0, was recently released[2], on Mach 22nd, and i’ve just upgraded Iceweasel 3.6 to Iceweasel 4.0 on my Debian Wheezy.

If you’d like to upgrade yours, follow the steps bellow.

1. Add Mozilla’s repository to sources.list
Edit the /etc/apt/sources.list file and add the repository’s address:

1
deb http://mozilla.debian.net/ squeeze-backports iceweasel-4.0

Even though it’s Squeeze’s repository, it worked fine on my Wheezy.
You can type the following command to add it:

1
# echo "deb http://mozilla.debian.net/ squeeze-backports iceweasel-4.0" >> /etc/apt/sources.list

2. Update packages list

1
# aptitude update

3. Install Iceweasel 4
You can check the version of iceweasel with the command bellow:

1
# aptitude show iceweasel

Install it with the following command:

1
# aptitude install iceweasel

Wait for it to finish and happy surfing!

Links/Sources:
[0] http://wiki.debian.org/Iceweasel
[1] http://mozilla.com/firefox
[2] http://blog.mozilla.com/blog/2011/03/22/mozilla-launches-firefox-4-and-delivers-a-fast-sleek-and-customizable-browsing-experience-to-more-than-400-million-users-worldwide-2/
[3] http://mozilla.debian.net/


Nov 9 2010

Problem starting tomcat6 on Debian Squeeze

Éverton Arruda

I was having problem when trying to start tomcat6(6.0.28-7) service on my Debian Squeeze, fortunately I found the solution on the web[0].

The following message was in /var/log/tomcat6/catalina.xxxx.log:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(...)
java.net.SocketException: Invalid argument
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:336)
    at java.net.ServerSocket.bind(ServerSocket.java:336)
    at java.net.ServerSocket.<init>(ServerSocket.java:202)
    at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
(...)

As said in eFreedom.com[1], it has something to do with IPv6. To solve this problem you’ll have to check if net.ipv6.bidv6only is set to 1/true:

1
# sysctl net.ipv6.bindv6only

If it is set to 1/true, you’ll have to set it to 0/false:

1
# sysctl -w net.ipv6.bindv6only = 0

Then you can restart the tomcat6 service and it will work, but only while your computer is running, if the you reboot the system it will fail again.

To make it permanent you will have to make sure that the -Djava.net.preferIPv4Stack option is set to true and is being added to JAVA_OPTS in catalina_sh() function, inside /etc/init.d/tomcat6. The line which does that is:

1
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"

And that’s it.

[0] http://efreedom.com/Question/1-2876231/Start-Tomcat-6026-Update-Debian-Squeeze
[1] http://efreedom.com/

:wq


Aug 12 2010

cron/USER: Permission denied

Éverton Arruda

I was trying to run crontab -e command and got this error message:

[git@pandora gitorious]$ crontab -e
cron/git: Permission denied

As the message says: it’s a permission problem. To solve this you’ll have to change /usr/bin/crontab‘s permissions:

1
# chmod 4755 /usr/bin/crontab

And if that does not solve your problem, check /var/spool/cron/‘s permissions, they should match: drwxr-xr-x (755).

Sources:
* http://www.webhostingtalk.com/archive/index.php/t-638933.html
* http://linux.derkeiler.com/Mailing-Lists/Debian/2003-09/3613.html


Jul 8 2010

Getting Broadcom wireless to work on Debian

Éverton Arruda

Debian-like distributions come with b43, or b43legacy, and ssb modules for broadcom wireless cards, but they never worked for me. Searching over the internet i found out that broadcom provides the driver for BCM4311-, BCM4312-, BCM4313-, BCM4321-, and BCM4322-based hardware, all we need to do is compile it and install the module. This is how we do it:

1 – Check your wireless card:
First of all we need to be sure that your wireless card is one of the BCMXXXX-based hardware:

1
$ lspci | grep Network

The return should be something like this:
08:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)

In that line you can see that my wireless card hardware is BCM4312, so it is supported.

2 – Download the Driver:
You can access Broadcom’s website[0] and download it or use wget to download it through shell.
For 32-bits CPUs:

1
$ wget -c http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_32-v5.60.48.36.tar.gz

For 64-bits CPUs:

1
$ wget -c http://www.broadcom.com/docs/linux_sta/hybrid-portsrc-x86_64-v5.60.48.36.tar.gz

3 – Remove the other modules:
Check if b43, b43legacy, ssb and/or an older version of wl modules exist:

1
$ lsmod  | grep "b43\|ssb\|wl"

Remove them, if they exist:

1
# rmmod b43 ; rmmod b43legacy ; rmmod ssb ; rmmod wl

Add b43, b43legacy and ssb to the blacklist, preventing them to be probed in initialization:

1
2
3
# echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf
# echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf
# echo "blacklist b43legacy" >> /etc/modprobe.d/blacklist.conf

4 – Install the wl module:
Extract the tarball you downloaded and compile it, you’ll need to install the build-essential package to compile it:

1
2
3
4
5
# aptitude install build-essential -y
$ mkdir broadcom
$ cd broadcom
$ tar xvzf ../hybrid-portsrc-x86_<32/64>-<version>
$ make

If you have an older version of wl, which is usually in /lib/modules//kernel/net/wireless, you should rename or remove it, to avoid conflicts:

1
# mv /lib/modules/`uname -r`/kernel/net/wireless/wl.ko /lib/modules/`uname -r`/kernel/net/wireless/wl.ko.old

Copy the new wl.ko to /lib/modules//kernel/net/wireless and install it:

1
2
# cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless/
# insmod wl.ko

Add it to /etc/modules to load it at boot time:

1
2
# echo "lib80211" /etc/modules
# echo "wl" /etc/modules

After these steps your wireless network should be working.

Troubleshooting
I had another problem: after rebooting, ssb module was being loaded even after being blacklisted, and the recently added wl module wasn’t.

To check if this is happening to you run the command below:

1
$ lsmod | grep ssb

If the command returns something, it means that the ssb module is being loaded, then you’ll have to:

1 – Remove ssb and wl modules:

1
# rmmod ssb; rmmod wl

2 – Back up the current boot ramfs, generate a new one and reboot system:

1
2
3
# cp /boot/initrd.img-`uname -r`  somewheresafe
# update-initramfs -u
# reboot

3 – Reinstall wl module:

1
2
3
# cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless/
# insmod wl.ko
# depmode -a

And wl module will be loaded at boot time.

[0] http://www.broadcom.com/support/802.11/linux_sta.php


Jul 1 2010

Debian Squeeze 64-bits, Iceweasel and flashplugin

Éverton Arruda

I’ve installed Debian Squeeze 64-bits, the current testing version of Debian, with KDE4 and i wasn’t able to watch YouTube (and similar websites) videos. I’ve noticed that the default SWF decoder library is swfdec[0], and i thought that installing the Flash Player from Adobe would solve the problem. Fortunately i was right, but i found out that Adobe Flash Player does not support 64-bit Linux[1].

Searching about it i ended up in a page, on Debian Wiki, with a workaround that worked for me. Just follow the instructions in http://wiki.debian.org/FlashPlayer

[0] http://swfdec.freedesktop.org/
[1] http://labs.adobe.com/technologies/flashplayer10/64bit.html


Mar 12 2010

Progress bar in cp command

Éverton Arruda

Reading Planet Debian (http://planet.debian.org) i’ve seen an interesting post, made by Daniel Stone (http://www.fooishbar.org/blog/tech/), in which he links to Chris Lamb’s blog (http://chris-lamb.co.uk/).

In the post, he answers the following question: ‘Can you get cp to give a progress bar like wget?’. The answer is the name of the post: ‘damn right you can’.

Check it out: http://www.fooishbar.org/blog/tech/cp-progress-bar-2010-03-04-12-15.html

:wq


Dec 4 2009

Creating Web Albums with gThumb

Éverton Arruda

If you want to create a web album with some images you have in your computer, with Linux as your OS, i recommend you to use gThumb.

gThumb is, as said in WikiPedia (http://en.wikipedia.org/wiki/GThumb):

… an open-source image viewer and organizer for the GNOME desktop environment released under the GNU General Public License. It was originally based on GQView, and is designed to have a clean, simple interface.

gThumb Homepage: http://gthumb.sourceforge.net/

INSTALLING GTHUMB:
I’m using Ubuntu 9.04, named Jaunty Jackalope, to write this tutorial, so the installation process is very simple, all you have to do is run:

1
# aptitude install gthumb

This should work the same way for Debian GNU/Linux, but if you’re using another distro Linux, you might have to compile gThumb.

CREATING WEB ALBUM:
When you run gThumb you’ll see this interface:

gThumb Interface

I mapped it to make it easier to follow:

gThumb Interface Mapped

The steps to create the Web Album are:
1 – Create directory to keep the images:
First create a directory and put the images you’d like to be in the album in it.

2 – Open directory with gThumb:
In gThumb interface, select the directory in which the images are (#1 in MAP)

3 – Select the images you’d like to show in the album:
After opening the directory, which contains the images, you’ll have to select the images you’d like to show in the album (#2 in MAP)

4 – Open the “Create Web Album” window and configure it:
Now, with all images selected, go to Tools > Create Web Album (#3 in MAP)
Then you should see a window like this:

gThumb Web Album Interface mapped

This is where you’ll configure your web album. The options are:

#1 – Where the web album files will be saved.
#2 – The name of the page, i recommend you to leave it as it is.
#3 – How many images per line and per column will be shown.
#4 – The title of the page, or header message, if you preffer.
#5 – The footer message of the page.
#6 – The theme that will be used in the web album.

The other options are not so important for me, so i didn’t put them in here.

In the end, you’ll have something like this: http://am.softwarelivre.org/galeria/fedora12releaseparty/

:wq


Oct 13 2009

IpForward from Computer with Linux to PS3

Éverton Arruda

I’ve recently bought my PlayStation 3 (FInaly!!!!!) and was thinking of a way to connect my PS3 to the internet using my 3G BroadBand internet connection, which is provided by the brazilian Phone Company Claro. The only thing that came to me was: IpForward.

So i did this:
1 – Connected my Notebook to the 3G Broadband:
Just connected as I normally do.

2 – Connected my PS3 to my Notebook:
Created a LAN between them, through my notebook’s interface eth0.
I configured my PS3′s network connection as follows:
In the PS3′s main menu go to Settings > Network Settings > Internet Connection Settings, then, go through this sequence of choices: custom, wired connection, auto-detect, manual (the ip settings are shown bellow), automatic, do not use (in my case i don’t use any proxy), enable.

The Ip Settings are:
Ip address: 192.168.0.2
Subnet mask: 255.255.255.0
Default Router: 192.168.0.1 (This is my Notebook’s Ip)
Primary DNS: 208.67.222.222 (This is Claro’s primary DNS Server)
Secondary DNS:
208.67.220.220 (This is Claro’s secondary DNS Server)

3 – Set Notebook to IpForward
I found a Script in the internet that does everything it needs to ipforward, all i did was add the final line, which sets a fixed ip to the interface that is connected to the LAN. I don’t remeber who wrote the script, but the credits are his/hers.
All you have to do now is save the script bellow and run it everytime you want to connect your PS3:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Basic firewall and forward/masquerade setup

PATH=/usr/sbin:/sbin:/bin:/usr/bin

# Delete/Flush old iptables rules
iptables -F
iptables -t nat -F
iptables -X

# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE

echo "1" > /proc/sys/net/ipv4/ip_forward

ifconfig eth0 192.168.0.1 netmask 255.255.255.0

If you did as it is described in here, then it should work just fine.

Just for the record, I’m sing BrDesktop Lenny Linux as Operating System (a Debian Pure Blend).

Note: Everytime I try to test the connect through PS3, my notebook loses the ip 192.168.0.1 and starts o search for another one, breaking the connection between them. So i recommend you not to use that feature when using the connection method described in here.

:wq