Software Woes

Rants, tips and tricks



Thursday, June 25, 2009



Setting up wireless on Slackware

Setting up wireless on a public unrestricted hotspot has always been mystery to me. I didn't really need it often, and when I did I did not have Internet access to google a way to do it. Well, today I was with a friend so I used his laptop to find out how to set it up.

It's really simple once you do it. What's important:

1. start up wireless card
2. scan for networks
3. pick a network and connect to it

Starting up a wireless card might require that you load a kernel module manually. Some modules have option to turn on the LED indicator:

# /sbin/modprobe iwl3945

Once you start it up, open the Wireless section in KDE Control Center, and click "Activate" button.

Now, run /sbin/ifconfig to see all the interfaces. You should see something like wlan0. Then, use this interface name to scan the area for networks:

iwlist wlan0 scan

As a result, you'll get each wireless network and it's ESSID. Let's assume ESSID is MyHotSpot and connect to it:

iwconfig wlan0 essid MyHotSpot

In case you need to supply username and password, look into wpa_supplicant and it's config file (I haven't tried this). And start wpa_supplicant:

wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf &

Once you're done, use dhcpcd to get an IP address, default route, and DNS server information:

dhcpcd wlan0

...and that's it.

Update: there is a very nice and simple to use tool that automates all this and wraps it into a GUI. It's called wicd, and you can find it in /extra in the newest Slackware, or fetch it from the project page and compile it yourself (no special dependencies needed):

http://wicd.sourceforge.net



Thursday, June 18, 2009



X11 forwarding on Slackware

Many times I wanted X11 forwarding to be as simple as ssh -x host; run program.

Until today, that never worked for me. But today I was in the mood to try to make it work somehow.

It turns out, it can be made to work that way, and it's super easy. The thing is that X11 forwarding via SSH is disabled by default (which is very reasonable setting, BTW). To enable it, just open /etc/ssh/sshd_config on the remote host (where you want to run the applications) and make sure it contains the following lines (uncommented):

AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

Once you save the file, restart sshd to pick up the new config:

/etc/rc.d/rc.sshd restart

And you're done. On your local host, just run ssh with -X or -Y parameter. The difference is this:

-X Enables X11 forwarding.
-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls.

Gosh, think about all the times I've done things in much more frustrating way (via VNC for example).



Friday, June 12, 2009



Firefox 3 printing on Linux

Printing from Firefox has been greatly improved in version 3, but there are still some minor quicks. The most annoying one is that the print dialog does not remember settings.

And some of the settings have annoying defaults. Firefox developers should really know that people are not just using web browser to browse the Internet and occasionally print some web pages. Developers all over the world are developing web applications for both Internet and intranet and printing is very important.


The main problem I have, is that Header and Footer settings are not remembered. So, for each page I want to print, I have to go to that tab, set all six fields to "--blank--" and then print. Each time I want to print anything.

I mean, how hard could it be to save those settings somewhere in ~/.mozilla/firefox and add a nice "Reset" button for people how change the settings so much they get lost.