Displaying articles with tag ubuntu
Posted by hank,
Fri Jul 25 09:44:00 UTC 2008
Oh man, what a day.
I attended quite a few talks, grabbed a lot of swag, and entered a few contests. I ended up buying the Arduino Starter Kit from MAKE so I can do some awesome embedded Ruby like I saw at FOSCON. It looks really fun - I can’t wait to try it out.
The talks I attended were half-way decent, but I learned a lot more on the first day.
A good overview of how one can use Amazon’s S3 and EC2 services to cheaply process and store data on a pretty large scale. The New York Times digitized hundreds of years of articles in a single day using these services and some awesome C++ code.
This ended up being a marketing talk. I don’t know what it had to do with cloud computing, and I didn’t stick around to find out.
An awesome overview of all the new stuff in Ruby 1.9 given by Sam Ruby. I had no idea they were changing so much, and this was a good dive with code examples into that. There was some discussion among everyone in the middle on whether for loops should work like .each blocks with regards to scope. I happen to disagree with what ended up being the popular thought on this subject. Most were advocating that a for loop constitutes a block, and that scope variables and iterators should be localized inside of it. This is contrary to almost every language, which I brought up using the example of C. Yet, when you iterate with .each, you immediately define a block and a scoped iterator, which, if it has a conflicting name with the outside world, it doesn’t matter since that’s out of scope. The only thing this changes is the value of a variable outside after the loop finishes. I think leaving the ability to modify a variable external to the loop is very convenient - in summary, leave it how you’ve done it in Ruby 1.9 already.
This was an interesting session on where Canonical is taking mobile technology, and what the community can do to help. They seem to have a pretty neat subnotebook coming out soon.
This could have been one of the best talks, but the speed at which it was given and the lack of enthusiasm in the presentation left most of us either bored or unfulfilled at the end of the talk. He spent the first half explaining what Python and C++ were, then he got to what SWIG is. The end was a quick dive into an extremely complicated bunch of files that didn’t help very much. In the future, it would be helpful to go to a SWIG talk that details how to make a simple Python extension with SWIG. I may have to throw that one together myself…
I also attended the tail end of Designing Political Web Apps for MoveOn.org, but I didn’t take any notes.
We ended up going to dinner at Widmer Brothers, which was pretty awesome. I had the Pork Schnitzel, a very tender piece of meat if I do say so myself, along with 2 Full Nelson IPAs. Afterwards, we caught the bus from the convention center to BeerForge and the SourceForge Community Choice Awards party. Beerforge was a blast. I ended up talking to Jean-Baptiste Kempf, one of the developers of VLC, for hours - a truly great guy. I learned a lot about France and the French people, but also about VLC. Apparently, you can use VLC from the command line much like mplayer, which I did not know. Yet, he explained that they removed Directshow support from VLC in Linux in favor of open source alternatives, which in part I can understand. Yet, the only codec available that is able to smoothly play 1080p h264 video is closed source (CoreAVC), and until the ffmpeg avc codec catches up, I’ll have to continue using mplayer. When I can play everything back smoothly with VLC, I may consider switching.
The beer at BeerForge was pretty good - I had the IPA. SourceForge had some sort of mixed drink which wasn’t too great. All in all, a good day, but now I’m dehydrated…
Tags: ubuntu
Posted by hank,
Sat May 03 01:53:00 UTC 2008
So, I upgraded my Ubuntu installation from Gutsy to Hardy today on my precious laptop. It went pretty well except for the nvidia driver. I ended up having to copy one of my old configurations over xorg.conf to actually make it work. Just so anyone who has the same problem again (including myself) can fix it without being really lucky, here’s a link:
A working xorg.conf for Gutsy and Hardy on the M1530
It ends up looking like this:

The above was done with emerald and Compiz Fusion.
Horray!
Tags: ubuntu
Posted by hank,
Sat Apr 12 00:44:00 UTC 2008
I couldn’t get MySQL to start in Ubuntu 8.04 Hardy Heron after I changed my datadir to /nexus/tardis/mysql - it turns out I needed to change the AppArmor configuration like so:
/etc/apparmor.d/usr.sbin.mysqld
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
/nexus/tardis/mysql/** rwk,
/nexus/tardis/mysql/ r,
This was in response to the following syslog messages:
/var/log/syslog
Apr 12 00:30:59 tardis mysqld[17818]: 080412 0:30:59 [ERROR] /usr/sbin/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
Apr 12 00:30:59 tardis mysqld[17818]: 080412 0:30:59 [ERROR] Fatal error: Can't open and lock privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
Apr 12 00:30:59 tardis kernel: [25185.601980] audit(1207974659.063:36): operation="inode_permission" request_mask="r::" denied_mask="r::" name="/nexus/tardis/mysql/mysql/host.frm" pid=17817 profile="/usr/sbin/mysqld" namespace="default"
Apr 12 00:30:59 tardis kernel: [25185.602018] audit(1207974659.063:37): operation="inode_permission" request_mask="r::" denied_mask="r::" name="/nexus/tardis/mysql/mysql/host.frm" pid=17817 profile="/usr/sbin/mysqld" namespace="default"
Apr 12 00:30:59 tardis mysqld_safe[17823]: ended
Apparently I didn’t see this important message in my.cnf when I was modifying it:
# * IMPORTANT
# If you make changes to these settings and your system uses apparmor, you may
# also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.
Then, I went and checked /etc/mysql/debian.cnf for the debian-sys-maint password and set it like so:
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<that password>' WITH GRANT OPTION;
Tags: ubuntu
Posted by hank,
Sun Mar 30 12:12:00 UTC 2008
So, at the PWN2OWN contest, a MacBook Air was hacked in under 2 minutes. A Vista machine was also hacked a little later, but the Ubuntu machine stood strong despite various attempts. Just goes to show that Macs are definitely not as invincible as many people keep saying they are…

Tags: ubuntu
Posted by hank,
Sat Mar 22 12:27:00 UTC 2008
I wanted to speed up package downloading to set up my apt-proxy today in Gutsy, so I decided to find the correct way to find the fastest Ubuntu mirror. It’s actually done like so (stolen from here):
- Click on “System | Administration | Software Sources”
- Under “Ubuntu Sotware” tab, choose “Other” in the “Download from” list box.
- Choose your country and then click “Select Best Server” and choose the recommendation.
This automatically updates the /etc/apt/sources.lst file. The same utility can also be reached from the Synaptic Package Manager, through “Settings | Repositories”.
In action:

It says mirrors.rit.edu is the best one for me. Makes sense.
Tags: ubuntu
Posted by hank,
Wed Mar 19 23:00:00 UTC 2008
I got my new laptop today!! It’s awesome - I installed Ubuntu very easily on it, and Beryl using a second monitor on the HDMI port even works without much tweaking (just enabling TwinView with the restricted nVidia driver):
I made an Ubuntu Wiki Page on the matter. All the information about what works and doesn’t is on there.
Tags: ubuntu
Posted by hank,
Wed Jan 02 00:13:00 UTC 2008
I finally found where Angband saves are stored in Ubuntu thanks to the helpful file listing it provides. It’s all in /var/games/angband, and the save directory looks like this:
root@rofl:/var/games/angband/save# ls -al
total 60
d---rwx--- 2 root games 4096 2008-01-01 23:57 .
drwxr-sr-x 9 root games 4096 2007-12-31 16:18 ..
-rw-r--r-- 1 hank games 45651 2008-01-01 23:57 1000.Hank
-rw-rw-r-- 1 root games 47 2006-11-13 01:20 delete.me
The inside of 1000.Hank is complete binary gibberish, but at least I can back it up now and move it between computers. This is so encouraging me to cheat. To find out more about angband, read this article.
Tags: ubuntu
Posted by hank,
Sat Dec 01 17:56:00 UTC 2007
If you, like me, were having issues like the following:
Depends: libpango1.0-0 (>=1.18.3) but 1.18.2-0ubuntu1 is to be installed
The solution is adding this to your /etc/apt/sources.list:
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
Apparently, they only put the new libpango libraries into gutsy-updates. That’s kinda lame IMHO.
Tags: ubuntu
Posted by hank,
Sat Nov 24 19:46:00 UTC 2007
So, I have all these JPEGs, and I want to know which ones are corrupt (specifically, ones that end prematurely). qiv will spit out the following to STDERR when it finds one:
Premature end of JPEG file
So, this is nice, except it’s entirely unscriptable. The solution I found was using the following script to the display the images in sequence:
perl -e 'for(glob("*.png *.jpg")){$output = `qiv "$_" 2>&1;`; if($output =~ /Premature/){print $_, "\n";}}'
All this does is mix STDERR with STDOUT for a qiv of the file, and check the output for the word “Premature”. If it finds the word, it prints the filename. Simple.
The only problem is that qiv doesnt have a way to just check whether a JPEG file is corrupt (and if there is a command line utility that does, please let me know). To make it go thru the list, I wrote this little gem:
while(true); do xte "key q"; done
All this does is send the q key to the Xserver infinitely. All I have to do is put focus on the first qiv window to make it and all subsequent qiv windows receive q’s. So, just run it, and click on the window. Then there are lots of flashes, and eventually that perl script will print out the names of the bad files. It’s totally ghetto, but it’s the best I’ve got right now. The point of this post is to hopefully find new ways to do this more programmatically.
Tags: ubuntu