UTF-8 in GNU Emacs

I nicked the following from http://linux.seindal.dk/2004/08/07/gnu-emacs-and-utf-8-locale/:

(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

You may also specify your preference toward the Unix newline convention:

(setq locale-coding-system 'utf-8-unix)
(set-terminal-coding-system 'utf-8-unix)
(set-keyboard-coding-system 'utf-8-unix)
(set-selection-coding-system 'utf-8-unix)
(prefer-coding-system 'utf-8-unix)

FreeBSD VT aka newcons in base/head

Update 2015-01-05:

I was more or less forced to adopt VT, UTF-8, KMS, and DRM2 when I upgraded my laptop from stable/9 to stable/10 in the time between Christmas of 2014 and New Year of 2015. My laptop, a Dell Latitude D531 of mid-2007 design, is equipped with the AMD/ATI Radeon X1270 GPU. What an awesome beast back in 2007/8! :P

Adding the two lines below to /boot/loader.conf, lets me watch the transition from a 80×25 text mode console, to a 80×30 graphics mode console, to a 210×65 graphics mode console, as the bootstrap firmware, the VGA driver, and subsequently, the KMS driver does their magic.

radeonkmsfw_RS690_cp_load="YES"
radeonkms_load="YES"

The VT console with the proper KMS driver truly rivals the old sc console in terms of geometry, UTF-8 capability, and speed.

Now, if only the former and latter were true for FreeBSD VMs running inside VirtualBox, which are still forced to run the VT console with the VGA driver or in the old text mode.


Update 2014-08-27:

I compiled and installed r270452 of base/head the other day, and the VT console is faster than ever before in VirtualBox 4.3.12. I imagine the speedups are similar on real hardware.

The VT console can’t compete with the old sc console in terms of speed, but, making room for a new line on a screen full of text, is considerably faster now than earlier this year.

Setting hw.vga.textmode="1" in /boot/loader.conf is even faster if you don’t need doublewidth characters. However, you may feel comfortably with the 30 lines of text provided by the graphical mode.

It’s nice to see the sc and the VT code being merged, making it possible to have both consoles compiled in the kernel for base/stable/10 and base/head. Only one of them may be active at a time, so set your /boot/loader.conf accordingly:

kern.vty="vt" for the VT console, or, kern.vty="sc" for the old sc console.


2014-02-15:
For last couple of days I’ve been playing with base/head and the VT kernel. It’s refreshing to finally be able to put Unicode with the UTF-8 encoding to use on the console. The console speed, at least when run in VirtualBox 4.3.6, reminds me of the console of the Sun SPARCstation IPCs I used to manage before they all died some years ago. I’ll see if I can find some idle equipment at work that’s not too old and see if the console speed is any different on real hardware. Anyway, this newcons business surely is a step in the right direction.

FreeBSD’s local_unbound in mobile environments

FreeBSD’s local_unbound DNS resolver was introduced in head in September 2013, and later in stable/10 when that branch became available. Its configuration out of the box, particularly its treatment of the /etc/resolvconf.conf, assumes the local_unbound resolver is the sole resolver to be used.

The reason for this blog entry is that I appreciate being able to resolve DNS domain names even when the local resolver is unavailable for whatever reason. The use of single user mode with the network interfaces enabled and without any services running is one example I can think of. I’m certain this also applies to some of you. Continue reading FreeBSD’s local_unbound in mobile environments

Enabling PPDS on Lexmark MS510dn

Enabling Personal Printer Data Stream (PPDS) on a Lexmark MS510dn is pretty well hidden. None of the first two suggestions by Lexmark worked on this model. (Suggestion 1, suggestion 2.)

You need to send the printer a PJL command like this one:

00000000  1b 25 2d 31 32 33 34 35  58 40 50 4a 4c 20 44 45  |.%-12345X@PJL DE|
00000010  46 41 55 4c 54 20 4c 50  50 44 53 3d 4f 4e 0a 1b  |FAULT LPPDS=ON..|
00000020  25 2d 31 32 33 34 35 58                           |%-12345X|
00000028

Why on earth can’t this option be available in the menus with the factory settings in effect? Shame on you, Lexmark! Continue reading Enabling PPDS on Lexmark MS510dn

NAV, UPS-er og veksling mellom lysnett og dieselaggregater

Det er sjelden jeg kommenterer noe som ligner på politikk, men mine ord skal handle om teknikk. IKT-direktøren til NAV uttalte til digi.no at overspenning slo ut reserveløsningen, mandag 5. februar 2014.

Dette kan tyde på at både lysnettet og dieselaggregatene var tilkoblet UPS-ene. Det er ikke uvanlig at det er overspenning i lysnettet i noen få brøkdeler av et sekund når strømmen endelig kommer tilbake. Jeg har ingen detaljkunnskap om noen av systemene til NAV, men dette burde NAV ha tatt hensyn til. Vi skal heller ikke se bort fra at IKT-direktøren, bevisst eller ubevisst, har utelatt fakta av betydning. Continue reading NAV, UPS-er og veksling mellom lysnett og dieselaggregater

Disabling IPv6 autoconfiguration in Windows servers

After long hours of googling at work and at home, I finally arrived at http://www.excaliburtech.net/archives/192, stating this is the way to disable IPv6 autoconfiguration, say when you’re more keen on using a manually configured IPv6 address:

netsh interface ipv6 set interface "Local Area Connection" routerdiscovery=disabled

Continue reading Disabling IPv6 autoconfiguration in Windows servers