Simple password generator
While reevaluating my security practices, I came up with the conclusion that my password system is a mess. For obvious reasons, I won’t talk about it much, but I realized that having a handy password generator will be a good idea. While searching a few minutes for hints and solutions, I came up with two methods that works out-of-the box on a OpenBSD machine, without needing any extra package...
The value of good documentation
One of the strengths of OpenBSD is its documentation. I’m really glad that developers really takes it seriously, since a good manual page can save you a lot of time and troubles. Here’s an example: I was trying to sort out a text file and remove duplicates. The file was above 200 MB. My first approach was the following: cat list.txt | sort | uniq > list_m.txt But after a...
Setting your dpi
For a pleasant desktop experience, it’s generally a good idea to have your X server run with 96 dpi (dots per inch). Other values might work as well, but I found this to be the perfect choice for my machine. Usually, the system would set this dpi value correctly, but if it doesn’t or if you want to make sure it will not miss, look at your /etc/X11/xdm/Xservers file and find the line...
Permalinks and .htaccess
If you host a Wordpress blog, like I do, you may want to enable those pretty permalinks. Wordpress documentation will tell you what kin of .htaccess file you need in your base folder (meaning the same fodler where your index.php is located for your Wordpress webiste). That’s helpful, but you still need to do a few tricks to have it running on OpneBSD, if you don’t want to end up seeing...
This may be quite trivial and it can be found also in the FAQ with a simple Google search, but I’ve somehow missed it until now. Enabling softupdates can really boost your desktop performance. It’s not something I can measure and prove it, but the general feeling is that Xfce feels faster and this time it’s usable and not that laggy. There’s room for speed improvements...
Empty tar.bz2 file (follow-up)
Remember this problem I had? Well, thanks to Andrei Mureșan, it’s fixed now. Apparently, cron has no idea of environmental variables when running the backup script, so I had to add the following line at the begining of my script: PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:. Works like a charm now. For future reference, he’s...
Smart IP filter with pf
Not long ago I’ve talked about two ways of making a good IP filter with pf. The first methods involved a pf table created after failed ssh attempts, but the table was not persistent after reboot, and the second method had a static text file from where pf could load unwanted IP for filtering. Let’s merge the two methods. Let’s say that we already have a text file, manually...
Powering down your OpenBSD
After running halt command, the system shuts down nicely, but one thing bugged ever since I’ve first played with OpenBSD: the system did not powered down without pressing the power button. I can live with that, but it’s rather frustrating and I thought that’s probably because OpenBSD doesn’t love my motherboard, though every modern operating systems knows how to power down...
Making things pretty
As part of my OpenBSD workstation project, making things pretty is a vital task. I can’t work in an ugly environment, so things have to be simple, functional and more important, coherent. One of the first things I do on a fresh OpenBSD system intended for desktop use is to install msttcorefonts pack. Probably due to license reasons, you can only install this from ports, so if you...
LaTeX in BSD
I was surprised to see that a TeX Live meta-package is missing for FreeBSD, but there is one for OpenBSD. And it also installs nicely as a dependency for gedit-latex, a plugin for gedit that is probably the best LaTeX editor I could find in GTK. The magic of gedit-latex plugin is that it adds cite-autocompletion and it’s beyond me why this feature is not available in every other LaTeX...
/usr disk space problem
I use the proposed auto-layout of my OpenBSD disk that is suggested during install. The problem is that, while /home partition is generous enough, /usr might be to small for some operations. For example, on a 20 GB hard-disk drive, the OpenBSD installer thinks that 2 GB is enough for /usr. Well, probably it is for some stuff, but when trying to compile TexLive from ports I’ve...
Installing Xfce 4.8 on OpenBSD 5.0
After playing with FreeBSD for a few days, I’m back on my OpenBSD. First time I tried installing Xfce I gave up, due to some mouse problems and window manager issues. Now I’m back on track for installing this simple desktop environment, ready to fix all the problems. The mouse problem arise probably due to the fact that my moue is a PS2 mouse, but it connect to my PC trough a...
FreeBSD on my desktop
Since I haven’t tried FreeBSD in a long, long time (years), I gave it a shot these days and I must say I was surprised. After almost a day of using it, it didn’t feel different than any other modern Linux distribution. It even have a graphical update manager that didn’t work! Jokes aside, FreeBSD had made some huge progress in desktop usability and if we consider the server tools...
I learned to love vim. In the first days of my *NIX adventures, I was using nano, since it reminded me of Norton Commander’s editor, but I soon realized that vim was more elegant and it seems I was more quicker using it then nano or, God forbids, Emacs (who uses an operating system to write a text file, anyway?). When in X, I prefer other, more fancy, editors, but when stuck to command line,...
GNOME on OpenBSD
Once we’ve got X configured and running on our OpenBSD 5.0/amd64, getting GNOME 2.32 it’s not that hard. I just had to fetch and install a few packages. # pkg_add -vi gnome-session # pkg_add -vi metacity Here, you will have to chose GTK2 variant of metacity, to avoid conflicts later on. Let’s continue our GNOME installation. # pkg_add -vi gnome-panel # pkg_add -vi nautilus...
Desktop project: getting started
OpenBSD was installed on the following hardware: Asus P5B-E motherboard with Intel Core2 Duo E6300 CPU at 1.86 GHz with 4 GB RAM and on a WD 75 GB hard disk drive. NVIDIA 8600 GT video card was present on the system, but this will not affect our installation to much. Installing was performed using the default options, giving the whole 75 GB disk to OpenBSD and installing...
The great mistery of the empty tar.bz2 file
Nihil sine backup, and what better way to do backup than a script placed in crontab? The script is a simple one: NOWD=$(date +”%F”) NOWT=$(date +”%T”) /usr/local/bin/mysqldump -u root -password \ dbname > /root/databases/db.sql /bin/tar cvfj /home/john/backup/backup-$NOWD-$NOWT.tar.bz2 \ /var/log /var/www /etc /root/databases /bin/rm /root/databases/db.sql It dumps...
Desktop project: evaluating requirements
The plan is to install OpenBSD at home, on my desktop and use it for exclusively for at least a week, to evaluate it’s usability for daily routine and how fit am I to use it like this. It will be an act of asceticism giving away the polished look of Mac OS X, but maybe I will end up enlightened after this experience :) Before starting this thing, I need to evaluate my daily needs. Off...
More fun with PF: blocking unwanted guests
Every once in a while, I check my /var/logs/auth to see people knocking on my port 22 door. While I do have a strong password for my user and “PermitRootLogin no” on my /etc/ssh/sshd_config, I’m still not very comfortable with people wanted to get in. Once again, PF came to rescue, delivering an elegant solution. Actually, two. First, I tried the manual method. Looking in...
Fun with PF: blocking ports
Firsts things first: we have to close our unused ports. We surely need port 22 open for ssh connection and 80 for Apache. I would also use ntpd, so 123 will remain open. After a few Internet readings, port 53 should remain open, due to its use by bind for zone transfers and such. I’ve learned that PF is a great OpenBSD tool, but it sure does require some reading before using it and...
I like playing with operating systems, I always did. I can’t settle with one operating system, I often install and reinstall them, just for the fun of it, to see what’s new, to test them, to try and find one that suits my needs. Unfortunately, I don’t see an operating system as a mean to other purposes, but as a purpose by itself. I know it’s not the right approach, but...