Posted about 1 year ago
An excerpt from Mailing List Etiquette on FreeBSD.
Please use a standards-compliant Mail User Agent (MUA). A lot of badly formatted messages come from bad mailers or badly configured mailers. The following mailers are known to send out badly formatted messages without you finding out about them:
- * cc:Mail
- * Eudora� (older versions)
- * exmh
- * Microsoft� Exchange
- * Microsoft Internet Mail
- * Microsoft Outlook�
- * Netscape� (older versions)
As you can see, the mailers in the Microsoft world are frequent offenders. If at all possible, use a UNIX� mailer. If you must use a mailer under Microsoft environments, make sure it is set up correctly. Try not to use MIME: a lot of people use mailers which do not get on very well with MIME.
I just find this hilarious. I mean what exactly defines user friendly? Software that has shiny buttons or that formats its data in a way that complies with standards and is compatible with other users *standard compliant* software?!
Sean
Posted in General, Linux, Tech | no comments
Posted about 1 year ago
I am working on a personal use Rails application that I use to create reminders using Cron...
There are a couple gems that are useful for dealing with Cron using Ruby. The first is rbcrontab which allows you to create crontab entries using Ruby. The other is trak3r-crontabr which actually maintains a crontab using Ruby. The latter of the two might be easier to use for those who do not understand Cron syntax but know Ruby well. I am leaning toward rbcrontab right now simply because I feel it may fit my needs better than trak3r-crontabr.
I'm not sure that I really need a full blown web interface or not. It would be nice but I think what I really need is just a mailer with templates. I don't know, once I figure out the details I will make a part 2.
Sean
Posted in Ruby on Rails, Linux, Tech | no comments
Posted about 1 year ago
I recently had to configure Xorg to run a 40" LCD monitor. The monitor did not seem to support EDID queries. To my understanding this is essentially a protocol that most monitors support to explain what modes they support and give general information about the monitor.
After a little Google searching and not finding anything on the model number of the unit which is 40LC45S. I eventually found this this modeline generator in this link. All you need to know are the resolution and refresh rate combination(s).
Sean
Posted in Linux, Tech | no comments
Posted about 1 year ago
My war with Postfix wages on. However I have resolved an issue that has been haunting my email server for quite some time now!
I constantly received a mail loop error when postmaster notifications were being sent to mail.skiblerspot.net. I knew it was something simple but never spent the time to track down what was missing. Perhaps I made the assumption that if Postfix knows to accept mail for skiblerspot.net it will automatically accept mail for mail.skiblerspot.net. This is an incorrect assumption and rightly so as this would be a terrible feature.
My problem was solved by simply changing:
mydestination = localhost, localhost.localdomain
to
mydestination = localhost, localhost.localdomain skiblerspot mail.skiblerspot.net
Adding skiblerspot was unnecessary to fix my immediate issue but I figured it doesn't hurt. Notice that I could have also added mail.skiblerspot.net to my virtual mail boxes database. I think in my case adding the hostname to mydestination is a better solution. Though if I were expecting mail for other users and wanted to create aliases for this domain I would then add it to virtual mail box database instead. Note that a domain should NEVER be in both places (mydestination and virtual mail box database).
This page notes on postfix configuration helped me realize my mistake.
Sean
Posted in Network Admin, Linux, Tech | no comments
Posted about 1 year ago
I had a little trouble installing lm_sensors on my Acer 5610 laptop running Gentoo 2.6.27-r8. I will describe what I did to successfully install lm_sensors and its dependencies.
Stuttering on read-edid
My main issue with installing lm_sensors is that one of its dependencies x11-misc/read-edid-1.4.1-r1 seems to be broken for my kernel version. I found a patch Gentoo Bug 252701 and downloaded it. After messing around for a little bit I figured out how to have ebuild patch the install for me so I can stay within the Gentoo packaging system.
Note that package ebuilds and other data are stored under /usr/portage directory. In this case if one were to look in /usr/portage/x11-misc/read-edid/ they would find an ebuild for each version of read-edid as well as a files directory. In that files directory might reside some patch files. I noticed that during an emerge these patches are applied. So I took the patch I downloaded and tossed it in /usr/portage/x11-misc/read-edid/files.
Confessing to ebuild
Now don't think ebuild is so stupid as to just let you be on your jolly way emerging this package with the new patch. It will be sure to let you know that the checksums are incorrect. So lets have ebuild regenerate the manifest for this ebuild.
sudo ebuild /usr/portage/x11-misc/read-edid/read-edid-1.4.1-r1.ebuild manifest
Now that ebuild has been appeased try to emerge read-edid alone or lm_sensors and ebuild should apply the patch to read-edid and the package should compile and install. Unlike Debian and Ubuntu lm_sensors for Gentoo seems to require not only that you load modules but also that a daemon be run so you will need to start that.
sudo /etc/init.d/lm_sensors start
Notes
One note, I actually rsync'ed the patch file from the link above over whatever patch was in the files directory. I don't think this is recommended but if you must do so at least make a backup of whatever patch file currently exists there.
If any instructions here weren't clear enough for you then you may contact me. Don't necessarily expect a response though, I'm a busy person!
Hope this helps someone
Sean
Posted in Linux, Tech | no comments
Posted about 1 year ago
I have managed to get Gentoo running on my Acer Aspire 5610 laptop. Here is an overview of the specs:
- CPU: Intel Core Duo 1.86Ghz
- RAM: 2GB PC25300
- HD: 160GB SATA 3G
- Network: Intel Pro/Wireless 3945ABG, Broadcom 44xx 10/100 Ethernet
- Removable Storage:Unknown 4-in-1 media card reader
I installed using the Gentoo 2008.0 i686 Live CD. I am wishing I would have taken the time to compile my own custom kernel but that can always be done later on. Anyway here are some tips to help anyone with the Acer 5610 series hoping to get Gentoo installed. I only ran into a couple of easy-to-fix problems after the install completed and I was booted into the system.
Getting Networking...Networked...
I had to manually insert the b44 module using
sudo modprobe b44
to get my wired network card to work properly. Before doing this eth0 did not exist and caused a few errors to spring up during boot up. This module can be loaded automatically by adding b44 into /etc/modules.autoload.d/kernel-2.6 as documented here.
Wireless networking has not been tested yet but I believe the 3945ABG is well supported among distributions. It seems to be recognized and I know there are modules for it. If you are having trouble try the following commands.
lsmod | grep 3945
If you don't see anything promising from that then try to find the appropriate module.
modprobe -l | grep 3945
Try inserting the modules that the previous command spat out, you only need to type in the module name not the extension nor the full path, look at this example.
modprobe iwl3945
Graphics Adapter Support?
I was very surprised with this one. Oddly letting Xorg -configure generate an xorg.conf clearly found an Intel 950 GMA integrated graphics controller. The xorg.conf looked pretty good, at least for now. However I got errors when trying to start X (errors will be posted later). I actually needed to also load a module for this as well, I forget the name of the module you can probably find it yourself though.
modprobe -l | grep intel
After loading that module my X server started up fine.
My laptop is not here, which is why some of the above information is not complete. The system was still updating before I left work and I wasn't about to pull the plug to the Inter Web. I will come back to this and update the information once I have it back. I need to see how the multimedia card reader works out so I will update with that info.
It might not be long before I have to take the Ubuntu stickers off the laptop and replace them with Gentoo counterparts.
Sean
Posted in Network Admin, Linux, Tech | no comments
Posted about 1 year ago
I'm setting up a testing environment with a Debian Etch based virtual machine running in Virtual Box. The environment calls for RAID 1 using mdadm and I have already begun setting up for this. I'm cloning a current non-RAID VDI and will document some of my findings and bottlenecks in this blog.
Assuming you are or can get as far as creating a VM...if not try Google or RTFM :)
Cloning a VDI
Move to the directory in which your vdi files are stored. I noticed that the VBoxManage command does not take into consideration that you may not be using the default ~/.VirtualBox directory for this. If you are NOT storing your VirtualBox images in ~/.VirtualBox then you MUST specify the full path as of version 2.1.2r41885. In my case the command would look something like below and I had to ask sudo to bless me with write permission to /opt. Clone as many virtual disks as you wish or your hard drive space will grant you.
VBoxManage clonevdi /opt/debian-web2-vraid1.vdi /opt/debian-web2-vraid2.vdi
Adding the Images
Add these disk images to VirtualBox, this can be done through the Virtual Media Manager in the File menu of VirtualBox. Then open the settings of the VirtualBox that you have hopefully created already and add these images in the hard disks menu. Sorry I'm just too lazy to make screenshots.
RAIDing Linux
I have found software RAID with Linux (specifically Debian) to be rather easy. Simply create an identical partition layout on each disk intended to be used in the RAID 1, instead of using a typical ext3 filesystem use the for RAID device option. Once all your partitions have been created, select the new option at the top of the main disk partitioning menu Configure RAID. Create a new RAID device, select RAID 1, I chose two active devices for the RAID you may be using more. You can also use a spare if you have planned for that. Repeat this for each RAID 1 device you wish to create. Once back at the main disk partitioning menu select each newly created RAID device and you can now set mount points and other options as you would any other device.
If I have left anything major out please let me know. Happy RAIDing! After having all this fun I bought 3x500GB Seagate Barracuda drives to add to the one I am already using to store my movies/music etc on. I plan on setting them up in 2 pairs of RAID 1 and creating one big device using LVM on top of the RAID for a sexy 1TB RAID 1! There is also a chance of a RAID 1+0 but LVM will be more difficult which is what I'm all about.
Sean
Posted in Linux, Tech | no comments
Posted about 1 year ago
I have been wrestling with Virtual Box for the past couple of days trying to get a small network of virtual machines communicating using the host machine (Kubuntu 8.04) as a router. Have been able to get the guest machines to communicate to the host machine and even to my server then on to the Interweb! Routing through Linux is so much fun and not hard to configure.
I often get stuck on a very simple and humbling problem. For some reason I always forget that the machine(s) being routed to will need to know how to get back. It happens to me a lot. I have been banging my head on the desk wondering why I can't get to 10.23.23.1 but I can get to 10.23.23.2, because I CAN get to 10.23.23.1, but 10.23.32.1 just does not know which route to take to get back to me.
Anyway, I have the kernel set to forward packets with:
echo '1' > /proc/sys/net/ipv4/ip_forward
The host machine knows how to get to both guest machines, and they know how to get to the host machine. They are both on the same network so a route that says use 192.168.0.2 to get to 192.168.0.0/24 should certainly be enough.
If I figure out what the problem(what I am overlooking) is I will update this blog.
Up too late again...but what is the point of living life if you don't live it!
Sean
Posted in Network Admin, Linux, Tech | no comments
Posted about 1 year ago
So in all the excitement of discovering over 100GB of free space on my hard drive and using it for Virtual Box, I will be installing different Linux distros for fun. I have decided to once again battle the mighty Gentoo. Since I enjoy a challenge I am going from the minimal install disc. I have the system running now, although I am missing a logging daemon :( and that is caused by what seems to be a C compiler issue. Since I am convinced as always, that I have done something foolish I will keep banging my head against the wall instead of sending a bug report. Maybe I will post on a forum somewhere, likely LinuxQuestions.org which I seem to frequent.
There has always been some mysterious force driving me to use Gentoo. Once I get it running and toy around with it for awhile in Virtual Box I could possibly end up going to Gentoo for my desktop at home. I still remember and more is coming back to me now, the long nights of maddening insanity trying to install Gentoo before I even knew what Linux even was. Haha, what a poor soul I was in those moments.
Going to finish my crown on the rocks which is now just crown, crank out some push ups, dips and sit ups. Then I need to find out what I'm doing with the rest of my night.
Update: Well I have Gentoo running in a virtual machine but still have trouble getting xfce installed. I am not giving up though, I want to give Gentoo a try and if I like it enough I may bear the task of migrating my Ubuntu desktop to Gentoo!
Update: Fixed this by re-emerging x11-libs/cairo with the X USE flag set. One can add USE flags on a per package basis by adding a configuration line in /etc/portage/package.use as shown below.
x11-libs/cairo X
Sean
Posted in Linux, Tech | no comments
Posted about 1 year ago
So I’ll keep this one short and to the point. I wanted to see in the admin of my site how much disk space each photo album was taking up, and also a grand total of all photo albums. As noted in the title I am using Attachment Fu in Rails. The latter of the two is very easy, I could just use a system call to du -chs and be done with it, or I could do some fun programming! Here is what I did…
To find the disk usage of a particular photo album is not completely simple. I need to consider each of three thumbnail sizes for each image as well as the original image itself. I might as well take advantage of the attachment_fu helpers in some sort of nested looping.
Ok, I’m beginning to rant so here’s the damn code:
Calculating size of each photo album.
def photo_album_size(album)
album_size = 0
album.pictures.each do |p|
album_size += File.size(DOCUMENT_ROOT + p.public_filename)
p.thumbnails.each do |t|
album_size += File.size(DOCUMENT_ROOT + t.public_filename)
end
end
return album_size
end
Calculating grand total of all photo albums.
def total_photo_albums_size()
albums_size = 0
albums = PhotoAlbum.find(:all)
albums.each do |a|
a.pictures.each do |p|
albums_size += File.size(DOCUMENT_ROOT + p.public_filename)
p.thumbnails.each do |t|
albums_size += File.size(DOCUMENT_ROOT + t.public_filename)
end
end
end
return albums_size
end
So thats it. I threw these in my photo albums helper and they work pretty well. By the way DOCUMENT_ROOT will have to be defined or you will have to substitute for it in some other way.
Sean
Posted in Ruby on Rails, Linux, Tech | no comments