Mike Gerwitz web developer and administrator of GNU/Linux systems, focusing on the development of online communities (e.g. MyCustomBB). Mike is also a freelance web developer and can be found on RentACoder, and is a strong supporter of free software.
Through the Eyes of a Web & Software Developer
7 Sep
BASH (bourne again shell), the default shell used on many GNU/Linux distributions, keeps a history of all commands entered. This can be a great convenience. However, scrolling back, I saw a number of commands I would prefer gone in case somebody decided to snoop around my system. Especially the commands where I accidently entered the root password in the shell. I’m sure it’s happened to many of you before too - you think you type “su”, but something happens and it doesn’t enter. So then you type your password, not noticing (in my case, I may be reading a chat or article while I’m typing it in), and then BAM - it’s entered in the BASH command history.
So, when going through my home folder one day, I came across a hidden file called .bash_history. Hmm, I wondered. Could this solve my problem? Yes! It can!
rm ~/.bash_history
After deleting the file, open BASH and hit the up key - you should get nothing but a pleasant beep. A wonderful representation of security. Of course, it’d be best to shred the file using a utility such as, well, shred, so that nobody can retrieve the deleted contents:
shred ~/.bash_history
And all should be well. But, what if you don’t want it to keep a track of your history? Well, there’s a couple ways to do so. I pulled the examples from the following link:
http://gentoo-wiki.com/SECURITY_Bash_History_Functions
The easiest one, which I did (I don’t feel like wasting any more time on this), was the following command:
ln -s /dev/null ~/.bash_history
This creates a link so that .bash_history points to /dev/null. Anything sent to /dev/null never returns - thus the name. It is simply discarded.
7 Sep
Since I last installed Gentoo, I noticed spellchecking in many applications weren’t working - notable Pidgin and Xchat. It’s a necessity! You need to come off as someone who knows how to spell while chatting!
It seems the problem was with myspell - the English dictionary for some reason was not installed. So, it was a simple fix:
emerge myspell-en
Restart the programs and it should work. It may also help to ensure you have your LINGUAS variable set in make.conf. For example:
LINGUAS="en_US en"
30 Aug
2.6.27 kernel note: Everything works properly in 2.6.27 if you compile the kernel with support for rt61 (or your driver). Run make menuconfig in your kernel source directory (usually /usr/src/linux) and locate the RaLink driver you need in Device Drivers -> Network Device Support -> Wireless Lan. It is located at the bottom. If you compile it as a module, remember to modprobe.
Crash note: Pre-2.6.27 (I was using 2.6.26), my PC would simply restart and complain about a Hyper Transport sync flood error once it rebooted (BIOS message). This would happen when the driver was loaded and the card was in use. I have not yet had this problem with the 2.6.27 kernel.
I recently purchased a Linksys wireless PCI card for my home computer and ran into a few problems with the driver installation under Gentoo using a 2.6.26 kernel. A simple “emerge rt61″ command would not work - the sources would not compile. I tried a number of things, including compiling support with the kernel (as included in 2.6.24 and up), but that still did not work.
Yes, this will require some compiling - but don’t be afraid of it. The process is quite simple.
First, to find out if we’re talking about the same type of card here, type lspci as root. Below is my output:
01:07.0 Network controller: RaLink RT2561/RT61 802.11g PCI
RaLink provides open source drivers for this card on their website, however, as I stated above, they do not seem to compile with 2.6.26 kernels. I finally came across the following wiki page:
http://gentoo-wiki.com/HARDWARE_rt2×00
The “Open Source…” section contains the information I used to get my card working. Be sure to read it in addition to this entry, as it provides you with additional information such as necessary kernel configuration options. The wiki page then instructs you to download the open source drivers that pertain to your card from the following website:
http://rt2×00.serialmonkey.com/wiki/index.php?title=Main_Page
In my case, the drivers I needed were “rt61″. Select the drivers that pertain to your system as stated by lspci. Download it, extract it, compile, and install (as root). Be sure to replace the wget URL below with the URL to the CVS tarball you require:
$ wget http://rt2x00.serialmonkey.com/rt61-cvs-daily.tar.gz
$ tar -xzvf *.tar.gz
$ cd rt*/Module
$ make
$ make install
That should be it! Again, as root, attempt to load the kernel module. Again, this will differ based off of the driver you installed:
$ modprobe rt61pci
At this point, the wiki does not go any further. So, if you don’t know how to manually configure wireless network settings, you’re kinda screwed. First, let’s make sure your wireless card is properly recognized:
$ iwconfig
$ iwlist wlan0 scan
When running the first command, you should see additional information next to “wlan0″ or a similar device. When running the second, you should see a list of all available networks within range. If you do NOT, then you may not have set it up correctly. Refer to the wiki and driver documentation for more information.
The problem only is, it is not yet set up. So, let’s get to that. In the Module directory of the tarball you extracted (if you haven’t closed the terminal you ran the make command in, you’re in the correct directory) there is a README file. Direct your attention to the “Configuration” section.
It provides two options - a GUI or manual configuration. Let’s start with the GUI:
http://rt2×00.serialmonkey.com/wiki/index.php/Downloads
Download the graphical configuration tool. After you extract it, you will have to compile it:
$ ./configure.sh
$ make && make install
You may then run the command rutilt. If it does not recognize the command as root, try running it as a normal user. When needed, it will prompt you for your root password. Use the “Site Survey” tab and click “Scan” to list the available networks. Then, simply select one, enter the necessary information (such as the key, if you have one) and you should be on your way!
I noticed that when I upgraded my kernel to 2.6.27 and used the built-in driver rather than the one discussed above, the GUI tool no longer worked. I wanted to abandon it anyway - I didn’t want to set up my configuration every time I started my computer. I wanted it to start up automatically.
I referenced the following link from the Gentoo documentation:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4
Take a look over it and decide what method you would like to use. I decided to go with wireless-tools. In the example below, I am using DHCP to keep things simple. If DHCP works for you, then you can get into manually configuring your IP address. Again, refer to the documentation for more information, as this is just an example and provides little explanation.
In the example below, the ESSID I’m attempting to connect to is “Gerwitz Wireless Network” which uses an open WEP ASCII key. I replaced my actual key below with “XXXXX”.
$ emerge -av wireless-tools
$ vi /etc/conf.d/net
—–
/etc/conf.d/net:
modules=( "iwconfig" );
key_Gerwitz_Wireless_Network=”[1] s:XXXXX key [1] enc open”
preferred_aps=( “Gerwitz_Wireless_Network” )
config_Gerwitz_Wireless_Network=( “dhcp” )
fallback_Gerwitz_Wireless_Network=(” 192.168.1.10/24″ )
fallback_route_Gerwitz_Wireless_Network=( “default via 192.168.1.1″ )
—–
$ /etc/init.d/wlan0 restart
* Caching service dependencies ... [ ok ]
* Bringing down interface wlan0
* Bringing up interface wlan0
* Configuring wireless network for wlan0
* Scanning for access points
* Found "Gerwitz Wireless Network" at 00:15:E9:76:1A:EE, managed, encrypted
* Connecting to "Gerwitz Wireless Network" in managed mode (WEP enabled - open) ... [ ok ]
* wlan0 connected to SSID "Gerwitz Wireless Network" at 00:15:E9:76:1A:EE
* in managed mode (WEP enabled - open)
* dhcp ...
* Running dhcpcd ...
wlan0: dhcpcd 4.0.1 starting
wlan0: broadcasting for a lease
wlan0: offered 192.168.1.103 from 192.168.1.1
wlan0: checking 192.168.1.103 is available on attached networks
wlan0: acknowledged 192.168.1.103 from 192.168.1.1
wlan0: leased 192.168.1.103 for 10800 seconds [ ok ]
* received address 192.168.1.103/24 [ ok ]
Remember to replace “wlan0″ with your interface. It should now start up on boot.
Granted, this guide does not cover everything - it is simply to help you to get your card working.
15 May
Ubuntu 8.04 LTS was recently released. So I upgraded a couple of my computers (that I’m far too lazy and have no time to maintain Gentoo on) to this new release to find that my wireless PCMCIA card did not work on my laptop. Okay - that’s fine. I’ve had this problem since I began using Linux years ago. However, unlike the previous release, Hardy Heron didn’t seem to list the driver for it in the restricted drivers. Granted, you need an internet connection to download the drivers either way, it would have been nice for it to say “Hey, we’ve got you covered!” So I was worried that it was for some reason removed from this release.
So, for those of you who have this problem - start by plugging it into a wired connection and updating your repositories (sudo apt-get update). Then in System -> Administration -> Hardware Drivers, the driver for your wireless device should be listed. Simply install it and restart and you should be good to go.
10 Mar
Well, I recently ordered a Sansa e280 from Amazon. I was looking for a good mp3 player that the open-source firmware RockBox supported. I noted that the v2 series was not supported, but Amazon did not state that it was such a model. You can imagine my disappointment once it arrived.
After debating whether or not to return it, I decided to keep it. v2s are out now, so v1 I assume will be discontinued - RockBox will eventually support it. And I’d like to provide aid to the RockBox team however I can. Unfortunately I have not looked into the firmware so I will not be much help in the actual development, however I will provide whatever information I can regarding the player, as the dev team does not own any v2s.
So, in deciding to keep it, I ran into a few problems. It was a bit frustrating, and in order to help save you guys some of the frustration, I’ll post some information on how to use it with GNU/Linux. Specifically, Ubuntu Gutsy.
Recent Comments