Aug 31 2009

Really quick boot

I’ve been setting up a new server for my parents and boy is it fast. And by fast I mean fast bootup. This untweaked server does it from power up to login prompt in just over 16 seconds. So I’ve stripped a few services I didn’t need but the important ones are there; acpid, crond, rsyslog, sshd and something called udev-post


Aug 14 2009

Auto detecting monitors in Linux

When using an external monitor to my laptop I have set my X to enable TwinView and have the larger external display be primary display left of the laptop display. But when I am away from home and does not have external monitor connected the nv driver does not detect that and still set up TwinView as before leaving much of the desktop out of display. To remedy this I have made two xorg.conf, one for single display and one for dual.

I have copied these manually before when I’m switching. Now I have something slightly better. I start X, run xrandr, capture its output and copy one of the configs depending on what’s in the output. This is how I do it

rm -f /tmp/xrandr /tmp/nullconf
/usr/bin/xinit /usr/bin/xrandr -q -- /usr/bin/X -config /tmp/nullconf -quiet >/tmp/xrandr 2>/dev/null
if grep -q '^DVI.* connected' /tmp/xrandr ; then
cp -f /etc/X11/xorg.conf.dual /etc/X11/xorg.conf
else
cp -f /etc/X11/xorg.conf.single /etc/X11/xorg.conf
fi
rm -f /tmp/nullconf

My external monitor is detected as a DVI and the internal as LVDS


Aug 8 2009

Sunburn

If I could offer you only one piece of advice; Wear sunscreen.

Got a bit sunburned today while trying to catch the last sun rays (death rays?) before my vacation is over.

Last year I got virtually no tan at all because of the weather and suffered from sleepyness the rest of the autumn and winter.


Aug 3 2009

Upgraded harddrive with encrypted LVM

My HP laptop with 160GB harddrive was getting full and I wanted to upgrade it to a bigger one. Found that 2.5″ 500GB was relatively cheap so I bought one and detailed the procedure of upgrading with all data intact. I bought a 2.5″ USB-SATA chassis as well for the old drive to sit in. As I hit a few snags when doing this I thought it could be useful for others to read about.

Continue reading