Sunday, September 30, 2012

Spotify on 64bit FreeBSD 9.1

Perhaps a little over a year ago Spotify became my new choice for music.  My mp3 collection is stale and unorganized, and I'm not feeling like taking either the time or money to update and organize it.  I used Pandora for awhile, but their music selection as of a year ago was far smaller, and their desktop client refused to work for me on any OS / architecture combination I tried.

So, with my still fresh install of FreeBSD amd64, what was I to do to run the 32-bit only spotify client?  Setup a 32-bit environment of course.

I more or less followed what is written up here: http://forums.freebsd.org/showthread.php?p=191438

When running make distribution, it failed with an error that sendmail's freebsd.cf file didn't exist so couldn't be installed.  Looking around the intarwebs, I ran into a number of reports regarding a tinderbox bug that caused exactly this, but I was not using tinderbug.  Ultimately, I just ran 'make' by hand in /usr/src/etc/sendmail and "make distribution" worked happily.

Just setting the display in the chroot environment didn't work out for me.  Eventually I installed x11-servers/xephyr.  Then it was just a matter of running Xephyr -ac :1 in the host, setting the DISPLAY variable to localhost:1 in the chroot environment, and I was able to get Spotify up and running under wine.

Saturday, September 29, 2012

Simple Opensmtpd Configuration

Having recently reverted my primary home desktop to FreeBSD, I went looking for a method to send out notifications and the like to my gmail account.  Typically I would install postfix, but that was such a case of overkill in this case that I wanted something simpler.  Before I moved to rolling my own, I went looking for a solution, and ran across opensmtpd.  Specifically, I found this guide: https://cooltrainer.org/2012/06/06/external-mailing-on-freebsd/

It turns out that there have been some updates in the past few months such that the configuration example given will not work.  Below is my working example of smtpd.conf (everything else in the post should be fine).


listen on 127.0.0.1

map "aliases" source db "/usr/local/etc/mail/aliases.db"
map "secrets" source db "/usr/local/etc/mail/secrets.db"

accept for local alias aliases deliver to mbox
accept from local for domain gmail.com relay via "tls+auth://smtp.gmail.com:587" auth "secrets"

Brackets in the map config line are optional, and will eventually be removed alltogether.

More importantly, the configuration options for a relay host are now all put into that URL format.

I'm not really a jerk

It turns out there were a few comments here, but I hadn't configured any notification method so I completely missed them.  Who doesn't enjoy being an unintentional jerk.