Entries : Category [ OpenBSD ]
Stuffz related to OpenBSD!
[OpenBSD]  [Random]  [Security]  [Hardware]  [MacPPC]  [SPARC]  [MobileCows]  [fedora]  [desktop]  [windows]  [macosx]  [redhat] 

20 December

Q (as in "qemu for running OpenBSD on Mac OS X")

For those too lazy to dual boot

Q emulation window on Mac OS X

For those too lazy to dual boot OpenBSD on their Intel Mac hardware, I found another solution to run OpenBSD in emulation: Q (as in "qemu on Mac OS X") will boot OpenBSD just fine. Previously I had tried VirtualBox, which shows problems in disk access from OpenBSD as guest OS. Since Q is another open source alternative, there's no need to spend large amounts of playmoney for this software, and you can still go and test your favorite ports to make wiwi happy!

Speed seemed reasonable. I didn't do anything heavy yet - actually I didn't do much at all - but there did not seem to be any of the slight lag you sometimes get with emulation / virtual machines.

I didn't have to do anything special to get Q to run OpenBSD. Booted from the 4.2 installer CD disk image (leeched off wiwi's mirror, ofcoz). After playing around a bit with xorgconfig I got X to work almost reasonably. I say "almost", because it does not want to give me the macbook's native resolution of 1280x800, so fullscreen mode looks warped. I haven't completely figured out what I can and can't do with networking either. We'll see.

Oh, yeah, here is a dmesg too, scp'ed directly from the virtual machine.

Posted by betabug at 11:06 | Comments (1) | Trackbacks (0)
04 August

BSD in Paris

They renovate servers too (or something)

BSD company sign

There is obviously a lot of BSD here in Paris. This company does everything from BSD installations, renovation, up to plumbing... is there something xsa hides from us?

Posted by betabug at 21:26 | Comments (0) | Trackbacks (0)
24 February

watch for syslog.conf

I've been bitten more than once by this so I have to write this down.
The problem: spamd wasn't logging to /var/log/spamd even though I followed the spamd(8) man page which says:

daemon.err;daemon.warn;daemon.info /var/log/spamd

What I didn't pay attention is the way that syslog.conf(5) seperates fields:

The selector field is separated from the action field by one or more tab characters.

So the problem was that I simply copy/paste 'ing and with it not seperating fields with tab.
I found this message by Jared which suggested:

sed -ne '/spam/l' /etc/syslog.conf

This will show you 'tabs' (\t) which in my case were missing.
Hope this helps others.

Posted by rgouveia at 22:08 | Comments (0) | Trackbacks (0)
31 March

xrandr example script

Switching an extra VGA monitor around on an OpenBSD laptop

To set up and configure an external monitor in X on OpenBSD, we typically use xrandr(1). There are some GUI tools (like lxrandr, from ports) to "help" with that, but for me, a very simple shell script can do the job:


# TODO: handle HDMI-3 / 4 / 5

case "$1" in
    xrandr --output VGA --same-as LVDS
    xrandr --output LVDS --off --output VGA --auto
    # external monitor is off, internal on
    xrandr --output LVDS --auto --output VGA --off
    xrandr --output VGA --auto --right-of LVDS
    xrandr --output VGA --auto --left-of LVDS
    # default fall through ...
    # external monitor is off, internal on
    xrandr --output LVDS --auto --output VGA --off

Usage: I save this as a script with the name "monitor" and then use it as one of monitor mirror, monitor right, ... etc.

When a more special setup is needed, this script can serve as a cheat sheet. Further than that, the xrandr man page is pretty good.

Differences to lxrandr: lxrandr doesn't do dual monitor setups (the ones where the extra monitor is used in addition to the internal one), it only does mirroring and "choose one of them". On the other hand, lxrandr handles changing of the resolutions. Also my script is only set up for the VGA port, if I ever get around to hook up something to the displayport, I'll have to adapt it.

Posted by betabug at 20:12 | Comments (0) | Trackbacks (0)
14 April

openbsd ipsec.conf roadwarrior puzzlestone

Took me a while to notice...

When setting up the IPSec NAT on my "roadwarrior" laptop, I was baffled for quite some time with the question: How do I set up the src address, without having to edit ipsec.conf whenever I am on a different network in a different RFC1918 private natted address range? One day I would be on and the next on

# this can't be it!! wtf?
# ike dynamic from iwn0 to any
# ike dynamic from iwn0 to any
ike dynamic from iwn0 to any

Add up DHCP on all those networks and this really can't be it.

Turns out the information / solution actually is in the man page (yay for OpenBSD man pages):

Addresses can be specified in CIDR notation (matching netblocks), as
symbolic host names, interface names, or interface group names.

So basically what you can do is to start your ipsec.conf setup with your interface name as something like:

ike dynamic esp from iwn0 to any

Which means that the ipsec tunnel will get set up on whatever address that interface gets assigned. And you could even create an interface group "vpn" to cover both your wifi and ethernet interfaces. Neat.

The next thing to find out for me is how I can do from iwn0 to any but not to my local subnet... but I guess I'll figure that out too some day.

BTW: having OpenBSD IPSec on both sides of my VPN made the setup really easy.

Posted by betabug at 17:55 | Comments (0) | Trackbacks (0)
17 April

Getting the current session name from tmux

Are you talking to me?

Had the little mystery of how to get the name of the current session in tmux into a shell script. Why? Because that script should talk to the same pane/window/session again later. Hacking and searching around a bit, this is what I came up with:

SESSION=`tmux list-panes -F '#{session_name}'`

Funny enough it uses the list-panes command, which by default lists only the panes of the current window and session. Then, using the -F format string, we can tell it to give us the session name only.

Later I can use this in the script like this:

tmux select-window -t$SESSION:window_name

... and there shouldn't be any mistakes as to which session I'm talking to.

Posted by betabug at 21:00 | Comments (1) | Trackbacks (0)
16 November

Touchpad Synaptic Settings for Thinkpad L440

Probably the same for X240, T440, ... other 40 series Thinkpads

Got myself a cheapish Lenovo Thinkpad L440 as a replacement/spare laptop (while my X220 is hopefully being fixed), running OpenBSD ofcows. Problem with this machine's hardware: There are no real buttons for the TrackPoint, instead it uses the top of the Touchpad (you press it down) and some software to determine where you clicked.

On the X220 I had the Touchpad disabled in the Bios, and used exclusively the TrackPoint. Works great. On the L440, you can't disable the Touchpad in the Bios. Instead in OpenBSD you have to use the synaptics(4) driver, with some synclient(1) commands to set things up. Basically you disable the Touchpad (aka Trackpad) for mouse movement. You keep its functionality for clicking, and you define some areas where the middle and right button clicks are. This works fine, but the feel of the dedicated buttons was much, much better.

In any case, here are the settings that I'm using in my .xinitrc::

# disable touchpad, except for clicking
synclient TouchpadOff=1
# set up fake buttons for the trackpoint
synclient ClickPad=1

synclient MiddleButtonAreaLeft=2636
synclient MiddleButtonAreaRight=3442
synclient MiddleButtonAreaTop=0
synclient MiddleButtonAreaBottom=3306

synclient RightButtonAreaLeft=3443
synclient RightButtonAreaRight=0
synclient RightButtonAreaTop=0
synclient RightButtonAreaBottom=3306

Posted by betabug at 17:57 | Comments (1) | Trackbacks (0)
20 July

Make FireFox, Chrome, Lynx resolve IPv6 pages in OpenBSD

So far it defaults to IPv4

Finally got native IPv6 at home. Setting it up with ifconfig $IF inet6 autoconf is a breeze, but Firefox just ignored it. Actually, whenever there was the choice of reaching a site by IPv4, it preferred that. As did Chrome, as did Lynx.

As soon as I figured out that it's not just Firefox, the finger started to point at DNS. Turns out the solution is found in resolv.conf(5). At the time of writing, the DNS resolver "prefers" IPv4 addresses. The solution can be had as simple as:

echo 'family inet6 inet4' >> /etc/resolv.conf.tail

To give the priority to IPv6 (aka inet6 in ifconfig speak). I found testmyipv6 a good place to start for a solution, while test-ipv6.com gives a more comprehensive test (but requires JavaScript). The one thing that opened my eyes was the IPv6-only site test in test-ipv6, as soon as I noticed that this one works, things became more clear.

Posted by betabug at 17:22 | Comments (0) | Trackbacks (0)
Prev  1   [2]