Displaying articles with tag

Hardy Heron on the M1530

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:

MySQL issues in Hardy Heron

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:

Macbook Air hacked in under 2 minutes

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…

pwndBook Air

Tags:

Finding the best apt mirror in 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):

  1. Click on “System | Administration | Software Sources”
  2. Under “Ubuntu Sotware” tab, choose “Other” in the “Download from” list box.
  3. 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 on the Dell M1530

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:

Angband save games directory in 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:

libpango1.0-0 dependency issues in Gutsy

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:

Finding bad JPEGs with Xorg hacks in 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:

Adding Progress Bars to cp and mv in Gutsy

Posted by hank, Sun Nov 11 02:07:00 UTC 2007

Notice that I can do a -g for a progess bar! Yay! Now for an action shot:


hank@rofl:~/tmp/coreutils-6.7$ cp -g coreutils_6.7-1_i386.deb /nexus/mod0/www/deb/binary/
coreutils_6.7-1_i386.deb         |  48% |   3.2 MiB |   118 KiB/s | ETA 

Continue Reading Tags: