Firefox User Agent Switcher
User Agent Switcher is a very handy add-on for Firefox, especially if you use Linux and have to deal with websites that don’t like Linux.
One of the issues with it though is by default, it only comes with a few Internet Explorer agents, a few search robot agents and one to emulate an iPhone.
I’ve found that emulating a Mac is very useful in some situations. For example, my bank will let you use a scanner to deposit checks online but if I login using Linux, I’ll just get a “Your system doesn’t meet the minimum requirements” message. If I emulate Windows/IE, their system wants to use my scanner directly and that just doesn’t work. However, if I emulate a Mac running Safari, they’ll allow me to upload a previously scanned picture of the checks. The only problem is User Agent Switcher doesn’t have a Mac profile but this can be easily fixed.
First, you’ll need to copy/paste this into a file with a .xml extension.
<useragent description=”Safari 531.21.10 (OS X 10_6_2 Intel)”
useragent=”Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us)
AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10″
appcodename=”" appname=”" appversion=”" platform=”" vendor=”"
vendorsub=”"/>
Then you’ll need to Import the User Agent which is pretty simple. In Firefox, go to Tools -> Default User Agent -> Edit User Agents… Then click on Import in the window that pops up, select your .xml file and after restarting Firefox, your new User Agent should be there.
Linux Wireless Networking Setup on a Desktop Machine
I have a desktop machine that doesn’t move and will only need to connect to my home network. Even though it’s a pretty new machine and could handle it easy enough, I didn’t want the overhead of a network manager running all the time.
Assuming you use wpa, you’ll need to learn how to manually connect to your wireless network using wpa_supplicant and wpa_supplicant.conf (don’t worry, we’ll automate this in a minute).
My setup is pretty typical I think so here’s what my wpa_supplicant.conf looks like.
network={
ssid=”networkname”
psk=”secretpassphrase”
}
After you make wpa_supplicant.conf, you’re ready to start setting up your connection. Here are the commands I use to do that.
wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
After running that, you probably still need an IP address if you’re using dhcp (as most people do). Arch Linux uses dhcpcd but it seems like most other distros I’ve used have dhclient installed. Anyway, on my system I use this to get an IP address from my wireless router.
dhcpcd wlan0
If you want, you could just do these things every time you boot but it’s also pretty easy to automate so you can have networking start at boot time with no pesky daemons that you don’t need running all the time. Arch uses a file called /etc/rc.local. You can put commands in this file and they’ll run at boot time but since the system isn’t fully up and $PATH may not work correctly yet, you’ll want to modify those earlier commands just a little. The locations of these commands can vary by distro but in Arch, here’s my rc.local file.
/usr/sbin/wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
sleep 2
/usr/sbin/dhcpcd wlan0
Notice these are the same commands we used to manually set up the connection but with the full path to the command inserted. Also, the sleep 2 line pauses 2 seconds just to make sure the association is complete before the machine tries to get an IP address.
That’s all there is to it. Keep in mind, if you’re not using Arch this exact procedure will not work for you but the basic idea could be used if you want.
The Linux Nazis
First, let me be clear that I mean Nazis in the spirit of the Seinfeld “Soup Nazi” episode, not the real Nazis.
I’ve been using Arch Linux quite a bit lately and I’ve liked it so much that my distro hopping has slowed considerably. However, I’ve always disliked the community that surrounds Arch. Much like the Soup Nazi, they take pride in their product and it tastes good but they serve it up with such a condescending attitude that you can’t help but feel you’re selling a piece of your soul when you eat it.
If you want to try Arch, here’s my advice. Just download it and use it. If you have a problem, use Google and solve it yourself. If you can’t, switch to somthing else. Don’t ask for help on the forums because in the Arch community, if you ask for help you are obviously a newbie and you will be an object of ridicule. If they drive you away, they will be proud for having done it.
If anyone’s wondering, no I was not driven away personally. I’ve just seen it done to many others and decided that crowd is too self-important for me. I enjoy helping others so I’ll look for a community where that’s acceptable.
Anyway, I’m writing this from a new Debian Squeeze install. I haven’t used Debian since Etch so I thought I’d give it a try.
Mythbuntu DVR Update
I finally put my DVR project on the shelf for a while after having some trouble with Mythbuntu 9.04. I just couldn’t get it to quit filling the hard drive with logs every few days. Well, a couple weeks ago I tried Mythbuntu 9.10 and my DVR computer has been working great ever since. With the new version, I even get my audio over the HDMI cable.
If anyone’s thinking of doing something like this, here’s my setup:
Scientific Atlanta 4200HD Cable Box hooked to the computer by Firewire – this box has 2 Firewire ports but only one works. Also, the only way it seems to connect is if you power cycle the cable box after the computer has booted. Schedules direct seems to work well to get program guide info for Cox Cable.
Intel x4500 Graphics (with HDMI out) and Realtek ALC888 Audio
Samsung 40″ HDTV (1080p)
Hooking the cable box by firewire gives very reliable channel changing and pretty good HD video quality with no need for a TV capture card.
I’ve been using MythWeb on my laptop to schedule recordings and it’s much easier than using the remote. This is a great little feature. My wife’s even started using MythWeb and says it’s easier than the old Tivo.
If you’ve been thinking about setting up a Myth Box, check out the latest Mythbuntu. It sure looks like it’s made some strides to me.
Getting the Mute and Volume Buttons Working in Openbox
Here’s the easiest way I’ve found to get the mute and volume buttons to work in Openbox. I found this in a thread on the Arch forums.
Simply add this code to the ~/.config/Openbox/rc.xml file. If you look through the file, you’ll see a section with other keybindings and you can just add this to the end of that section.
Make sure you have alsamixer installed. In Arch, that’s part of the alsa-utils package.
<!– Keybindings for volume control –>
<keybind key=”XF86AudioRaiseVolume”>
<action name=”Execute”>
<execute>amixer sset Master 1+</execute>
</action>
</keybind>
<keybind key=”XF86AudioLowerVolume”>
<action name=”Execute”>
<execute>amixer sset Master 1-</execute>
</action>
</keybind>
<keybind key=”XF86AudioMute”>
<action name=”Execute”>
<execute>amixer sset Master toggle</execute>
</action>
</keybind>
Making a DVR
I’ve wanted to make a DVR for quite a while now and finally gave it a shot using MythTV. It took me a long day of googling and trying things but I finally got it working (for the most part).
I’m using Mythbuntu 9.04 connected by firewire to a Cox Cable Scientific Atlanta 4240HD box. For a while I was pulling my hair out trying to get a picture to show up and I was about to give up after finding some posts suggesting my “Partial Lock” is a symptom of encrypted channels. Then I found a post that said it may work if I turn the computer off and pull the power plug from the cable box, turn the computer on and then power up the cable box. That did it. I’m getting all the channels I’ve checked except the movie channels so I’m pretty happy with MythTV so far. It’s way better than the Cox DVR, even with no pay channels.
I still have some stuff to do like get a remote control for it and get that working but I think the hard part is done.
I’d really like to get my HDMI audio working too but for now, I’ve got it working well enough with a regular monitor cable and audio patch cord. If anyone has any idea about HDMI audio from an Intel GMA X4500. The video works great but I’m not getting any audio.
Moblin alpha 2 – Lenovo S10
I just tried out Moblin alpha 2 on the Lenovo S10 and while Moblin is optimized for netbooks, it doesn’t seem to be optimized for the S10.
The Good: After installing to my hard drive it boots fast. There’s no GDM login screen so it takes about 15 seconds from the time you press the on button until the XFCE desktop comes up (this is with an OCZ SSD, not the hard drive it came with). Wired networking works.
The Bad: Wireless doesn’t work out of the box. Also the screen seems a little fuzzy. I’m sure a little tweaking could fix it but the little I tried didn’t seem to help. The most disappointing thing was that even with 2.6.29rc7 and rc8 kernels the internal mic doesn’t work.
I may come back and try this one out again later but for now, I’m going to keep distro hopping on the S10.
Common Access Cards on Linux
One reason I use Ubuntu much of the time is that setting up a common access card reader is easy under Ubuntu. The directions found on their wiki page can have you working in a few minutes start to finish.
However, if you’re using something that’s not Debian based and the packages you need aren’t available, it can be a little tougher. On Arch I found a couple of the programs needed had PKGBUILDs in the AUR, but Coolkey wasn’t in there. I may try to take care of that but in the interim, there’s a very helpful document on the Navy Research Lab’s site to help you get your card reader working. I followed the directions and got mine working under Arch so now that I know how to do that, I’ll think about learning how to make a PKGBUILD and see if I can get it to work that way.
antiX-M8 on Lenovo S10
I’ve tried antiX before (I think it was 7.2?) on my desktop machine. It was a great looking distro. The one thing that kept me from installing it was I couldn’t get the installer to work. Besides that, some of the stuff on it seemed to be a little out of date so I just sort of moved on.
Well, I just saw that the new version (M8) is out. It’s based on Mepis, which is based on Debian (Lenny at the moment) but I did a little reading and it seems you can use the sid or sidux repos. So, it seems like you may be able to get a really good looking, bleeding edge, lightweight OS from this.
I didn’t have a lot of time to work on it today and most of what I had was spent looking for how to make a USB install key. I found a post in the antiX formus with a nice script that will put the iso on a usb stick for you. It worked very well.
So far all I’ve really tested is wi-fi. To my amazement, it works out of the box!! I don’t expect that to happen with the sound though. We’ll see. Right now I’m just running off the live usb stick. Haven’t installed to the hard drive yet but I think I may try this one out for a while.
Screenshots without a screenshot program?
Ran across this today and I think it may come in handy for taking screenshots. I need to get some of those in here, I know.
Look at #19 here: http://www.tuxradar.com/content/linux-tips-every-geek-should-know
“There are plenty of screen-capture tools, but a lot of them are based on X. This leads to a problem when running an X application would interfere with the application you wanted to grab – perhaps a game or even a Linux installer. If you use the venerable ImageMagick import command though, you can grab from an X session via the console. Simply go to a virtual terminal (Ctrl+Alt+F1 for example) and enter the following:
chvt 7; sleep 2; import -display :0.0 -window root sshot1.png; chvt 1;
The chvt command changes the virtual terminal, and the sleep command gives it a while to redraw the screen. The import command then captures the whole display and saves it to a file before the final chvt command sticks you back in the virtual terminal again. Make sure you type the whole command on one line.
This can even work on Linux installers, many of which leave a console running in the background – just load up a floppy/CD with import and the few libraries it requires for a first-rate run-anywhere screen grabber.”
Looks like a cool hack to me and I’ll try it out to get some pics in here.