Archive for April, 2008
cygwin and blackbox 0.70.1
Monday, April 28th, 2008Here is a step to step guide to get blackbox working with cygwin.
Firstly you should have cygwin and xorg-x11 too. You should check the default xserver works. I.e you should be able to start a xterm. Once you have that we can concentrate on getting blackbox installed.
Download blackbox-0.70.1.tar.bz2
Extract
tar -xvjf blackbox-0.70.1.tar.gz -C /
Edit ~/.xinitrc
and add blackbox to your the file. In my case this is the only line in my file.
blackbox
Edit /usr/X11R6/bin/startx
defaultserverargs="-multiwindow -clipboard"
to
defaultserverargs="-clipboard"
Fire it up and you should see this
Warning: I had to disable Unicode fonts in blackbox to get it working with cygwin. I have no idea why, but if blackbox tries to use unicode fonts all you get is boxes instead of the correct font renderings.
emacs line wrapping
Thursday, April 24th, 2008By default emacs has line wrap enabled for the whole window. I.e if you only have 1 buffer open then it will line wrap at the edge of the window.
If you open many buffers though there is no line wrapping on each buffer.
If you add the following to your .emacs file it will make side by side buffers behave like the full window.
(setq truncate-partial-width-windows nil)
I dont like line wrap, especially when coding so I set the following
(setq default-truncate-lines t)
I then use f12 to toggle the line wrap by adding the following
(global-set-key [f12] 'toggle-truncate-lines)
So my whole line-wrap.el file is
;; See http://www.delorie.com/gnu/docs/elisp-manual-21/elisp_620.html ;; and http://www.gnu.org/software/emacs/manual/elisp.pdf ;; disable line wrap (setq default-truncate-lines t) ;; make side by side buffers function the same as the main window (setq truncate-partial-width-windows nil) ;; Add F12 to toggle line wrap (global-set-key [f12] 'toggle-truncate-lines)
See 38.3 Truncation or the emacs manual for more information.
bootchart on gentoo
Wednesday, April 23rd, 2008Well after reading an article on OpenRC at Roys webs, I decided to take a look at my current system. I started by emerging bootchart.
Firstly I needed to unmask bootchart
echo "app-benchmarks/bootchart" >> /etc/portage/package.keywords
I then enabled the java use flag so I get the java code to generate png files
echo "app-benchmarks/bootchart java" >> /etc/portage/package.use
then I emerged it
emerge -av bootchart
I had to add init=/sbin/bootchartd to the end of the /etc/grub/grub.conf kernel line like this
kernel /boot/kernel-2.6.23-tuxonice-r11 root=/dev/sda3 init=/sbin/bootchartd
Then I editted the /etc/conf.d/rc and changed
RC_USE_BOOTCHART="no"
to
RC_USE_BOOTCHART="yes"
I enabled the auto chart creation by editing /etc/bootchartd.conf and changing
AUTO_RENDER="no"
to
AUTO_RENDER="yes"
This is what I got the first time.
Virtually all of my boot time is spent checking the internal tree of the 2 300Gb disks. One disk took around 17 seconds to check and the second one too around 15 seconds (its slightly smaller). Both are reiserfs. Both disks were unmounted cleanly and the fsck knew they were clean file systems, but the tree check still takes some time.
Do I really want it to not check the file system when it boot? That is the question…..
Heres the bootchart with the check disk disabled
I just changes the /etc/fstab entry from
/dev/sda3 / reiserfs noatime 0 1
to
/dev/sda3 / reiserfs noatime 0 0
I didnt enable the Process Accounting part so some short-lived process may not appear in the bootchart images. Ill try this next and see if I anything interesting.
GIMP Flame Fractal Backgrounds
Saturday, April 19th, 2008I found this tutorial on how to create fractal backgrounds with GIMPs Flame filter on the front page of the gentoo wiki site.
You can actually get some very good results quite easily.
Here are the first few I managed to create.
Large versions are available here
Once you generate a good flame pattern you can keep creating new images and reusing the last flame settings but with different colours.
There is one issue. It appears that it has trouble generating large flames. 1600×1280 worked for me, but I could not get 3200×1080 working (dual monitor wide flame).