Wednesday, April 26, 2006

Crickets chirping

Been a little quiet here, hasn't it? That usually means a combination of two things:


  1. Things have been working pretty well. My PC-BSD box has been running solidly, although I haven't really had time to do much with it (see #2), while my FreeBSD 6 server is working hard and playing nice 24/7, without any problems (knock on wood).

  2. I have been very busy on a variety of things, both work and play. My "personal" blog, Jiggle The Handle, spells out more clearly what I've been up to on a more personal note. But with the improving weather, there is lots more to do outside, away from the keyboard.



But it is amazing how much information can be gleaned from the freebsd.questions mailing list (which I actually read via GMane, as a newsreader can deal with the high volume of mails much better than my email client. Just a quick glance at a couple of postings already gave me the two previous entries. I also have long postings on using INN as well as mucking about with the size of a partition. I just have to finalize the notes and get them up here before I forget completely!



Portsnap Magic flag

It seems that the previously mentioned portsnap that is in ports is an old version and can run very slow. This doesn't affect post-5.3 systems, as they come with a newer version pre-installed. Let's hope for an update to the ports version soon!



In the meantime, users of the ports version can boost their portsnap performance by using the magical and undocumented "-x" flag to portsnap:




$ portsnap -x fetch

$ portsnap -x update



Enable Internation KB layout in X

Want to enable international keyboard layout for your X.org X server? Just add the following options :




Options "XkbLayout" "us"
Options "XkbVariant" "intl"



Thursday, March 2, 2006

More free books

Isn't life grand? Here is Yet Another cool book, completely free, online and usable. This time, it is The Art of UNIX Programming, by Eric Raymond. Remebmer, FreeBSD is a Unix brethren, and most Unix books will work just fine as FreeBSD books, so that's yet another fertile source of information. I haven't used this book much, but it's gotten some nice reviews.



The Art of Unix Programming



Monday, February 27, 2006

EmacsWiki

Pretty much ever since I began programming, my editor of choice has been Emacs or some variation on it. It can be a daunting task to learn it, but once you do, you know you'll be all set for life, because there will always be an Emacs for you to use on whatever platform you move to. It's been around since the days of TECO, and it'll keep going forever.



The version for Windows called NTEmacs is a wonderful version. Pretty much everything works "out of the box". I haven't bothered to try and use the Cygwin port, because NTEmacs is better integrated with Windows. I've been carrying around my .emacs (the startup file) for years. Heck, I don't even know what half the stuff in there does any more! But I can just copy it to my latest platform (Mac OSX in this case) and I'm good to go. If it can't be done in Emacs, it just isn't worth doing!



Anyway, I stumbled across this great looking Emacs Wiki site. Lots of good info, especially about Major Modes for programming, like php-mode and the like.



EmacsWiki: SiteMap



Saturday, February 25, 2006

The Complete FreeBSD

The book that got me all fired up about FreeBSD has been released under a Creative Commons license - yeah! It has the best explanation for the boot process ever! I was proud to help out with the 4th (and most recent) print edition, even getting a mention in the forward and a free copy of the book. I'm looking forward to helping out with the online version now. Download it and have a read!



The Complete FreeBSD page

Thursday, February 9, 2006

Playing Audio CDs

Someone on the PC-BSD forums was saying that they couldn't play their audio CDs. KsCD, the KDE audio play, wouldn't recognize that there was an audio cd in the drive. After some poking around, here's the answer I came up with:

Okay, here's what I found out vis-a-vis playing an audio cd using KsCD. The problem is two-fold:

1] KsCD defaults to use /dev/cdrom. This isn't enabled by PCBSD by default.

2] The CDROM device, usually /dev/acd0, isn't readable by a non-root, non-operator user.

For the default user, just changing which device KsCD uses should make audio playable. You do via the Extras button, and "Configure KsCD..." to use /dev/acd0. This is because I think the user created at install is a member of the operator group, which means you should now be able to play your audio cd.

However, if you create another, completely "vanilla", user, they will not be able to play audio cds, because the permissions aren't correct.

Both of these problems can be fixed with a couple of small tweaks to the /etc/devfs.conf file. This file sets permissions and the like for device filesystems at boot time, and already has the lines in it that you need.

For problem #1, you can uncomment the line that says "link acd0 cdrom" by deleting the leading #. Note the comment just above, which says many ports use this.

But a normal user still won't be able to play audio CDs. You need to go down a couple of lines and change the appropriate 'perm' line that matches your cd drive(s). Change the 0660 to either 0664 (to allow normal users to read the cd) or 0666 (to allow normal users to read and write the cd). So in the usuall case, it would be thus:

perm /dev/acd0 0666

I would suggest at the very least, the link line should be uncommented in an install, and I would further suggest that the perm line for /dev/acd0 be changed to be 0666.