So yesterday I spent quite a bit of time debugging an issue with my Arch Linux server that I hooked up to my TV. When I looked at it the screen was just completely blank and it wasn’t responding to any keyboard commands. So I figure that a reboot would probably fix it. Unfortunately (well fortunately for this blog post), I still had problems after a restart. It seemed to boot up okay after a restart and auto-logged in on tty1 as I had previously set up. However, the hostname was set to “(none)” and it still wouldn’t respond to my wireless usb keyboard.
So I tried bypassing the usb hub and connecting the wireless keyboard to the computer directly, then a wired usb keyboard. Finally I had to dig out my old awesome IBM Model M PS/2 keyboard and after rebooting the keyboard worked fine. So it seemed that the computer wasn’t loading the correct usb drivers. It wasn’t even loading the correct network drivers either, all I had was the lo interface.
Another symptom was the size of the console screen. Typically the console would only be some sort of standard 800×600 pixel screen, but recent kernels and Intel graphics drivers have required KMS (Kernel Mode Setting) which means the console is full resolution (1360×1000 or so). So I hopped over to the Arch Wiki article about KMS for Intel chips and enabled the intel_agp and i915 kernel modules in my /etc/rc.conf.
After rebooting the computer worked flawlessly. The hostname was set correctly, and the wireless usb keyboard worked too. Now I just need to finish my XBMC setup.
Debugging an unresponsive Arch Linux server
August 3rd, 2010Getting the most out of iTerm
August 1st, 2010Today I finally got the most out of iTerm. By default when iTerm is installed it presents some “niggles” that bother me. The main two are:
* The alt key doesn’t function “properly”
** This means that some bash shortcuts (such as alt+. to recall the last argument on the command line) do not work
* Non-ascii characters are not recognized
** I use non-ascii characters to display some nice things, such as extra spaces at the end of a line and embedded tab characters.
The fix for the first issue is to in iterm go to bookmarks->manage profiles->keyboard profiles and mess with the Global and xterm (OS X) settings for the Option Key. Changing the xterm (OS X) option key from normal to meta fixed the problem for me.
The fix for non-ascii characters is to go into bookmarks->mange profiles->terminal profiles->default and change the encoding from Western (ASCII) to Unicode (UTF-8). Then as long as your font supports it (I’m using the lovely monaco font) non-ascii characters will display perfectly. So you do things like have a git prompt that shows (master↑3‣1), showing that you are on the master branch, ahead by 3 commits, and 1 file that was changed but not staged.
For more info about that zsh prompt, look at: http://github.com/olivierverdier/zsh-git-prompt
But I had to make a few changes to it before I could use it. That will have to wait for a different post.
Using an ALFA B/G/N Wireless card on Arch Linux
June 14th, 2010So I just got an ALFA AWUS036nh wireless card. To set it up on Arch Linux was not too hard, just need to blacklist a few drivers in /etc/rc.conf, specifically !rt2×00usb !rt2×00lib !rt2800usb and then enable rt2870sta
One way to verify the driver needed is the use the lsusb command which returns this for the wireless adapter:
Bus 001 Device 003: ID 148f:3070 Ralink Technology, Corp. RT2870 Wireless Adapter
From there we can verify that it uses the RT2870 chipset from Ralink.
Mounting /home on an sd card with Arch Linux on an EEEPC 701
May 9th, 2010Since the SSD on my venerable EEEPC 701 is a mere 4GB I wanted to move /home to my 16GB sd card.
This guide is based on this forum thread: http://forum.eeeuser.com/viewtopic.php?pid=316671
Here are the instructions:
- Partition your sd card
- I used gparted and formatted it to ext4, the same as my current /home partition
- Copy your /home to your sd card
- cp -a /home /mount/sdcard
- Note: This means you mounted your sdcard at /mount/sdcard
- cp -a /home /mount/sdcard
- Edit /etc/fstab to mount /home from your sdcard
- I originally added the line: /dev/sdb1 /home ext4 defaults 0 1
- However, this tried to check and mount the filesystem right at boot, but at this time the sdcard isn’t mounted yet so it fails. This is where I needed to use the forum thread.
- I changed the line to /dev/sdb1 /home ext4 rw,noauto,user,user_xattr 0 0
- The noauto is the key, it makes the filesystem not mount automatically, which means we need to mount it “manually” in one of the init scripts
- Edit /etc/rc.local to mount /home
- Add the line /bin/mount /home
That’s it! /home should now be mounted on your sd card. You can verify by running something like df -h or mount.
Synergy-plus
May 2nd, 2010Recently I’ve become a contributer to the excellent Synergy+ project. For those that don’t know Synergy+ (or googleable synergy-plus) is a program that allows you to move your mouse and keyboard between multiple computers running entirely different Operating Systems. In a way, it is like a software KVM.
Synergy+ is a maintenance fork of the original Synergy project which unfortunately hasn’t been updated since 2006.
I haven’t been able to contribute that much yet, just some help on the mailing list, issue tracker, and wiki. However, I hope to contribute much more in the future.
Programming competition tomorrow!
October 22nd, 2009I have a 24 hour programming competition tomorrow! Can’t wait. It’s called IEEEXtreme
Ubuntu “Checking Battery State” hang
April 12th, 2009If your system hangs on “Checking Battery State” while doing updates you can look for the process that is trying to start the acpi subsystem by doing a ps aux | grep acpi
the line should look something like this:
root 25873 0.0 0.1 4012 1504 pts/1 S+ 20:48 0:00 /bin/bash /etc/init.d/acpi-support start
That second line is the PID (process id) to kill that process you just need to issue sudo kill 25873
Of course, the PID on your system will differ from 25873.
Right-brain math
April 8th, 2009I think that how come people on reddit talked about foiiling was related to right brainness. Specifically, they mentioned that they would first do many (a few?) of the problems and then after a while their brain (I’m considering this their right brain) simply did the calculation for them and they had trouble doing it in the L-mode (rather than r-mode = right-brain mode). This makes sense because the right brain is non verbal and they did not quite understand how they were getting the answser (because r-mode is unable to verbalize information).
Right brain correlation with handwriting
April 8th, 2009I wonder what the correlation of handwriting is with right brainness. I think that if someone is more in-touch with their right brain (heavy right brainness if you want to get technical
) than they have neater handwriting. I think this goes well with some theories that I have read because being able to use both hands (ambidextrous) is more prevalent amoung (intelligient) people. Of course I am just remembering these theories/facts out of my memory which is of course inherently unreliable since every read is a write.
Satellite Radio is doomed
February 28th, 2009Satellite radio is only a temporary solution to the problem of radio-wherever-you-want-it. It will soon be superceded by streaming internet ala iPhone. With this kind of service you can simply get your music fix from the internet instead of going through a third-party like Sirius. Sirius is doomed.