linux

Scroll wheel in debian guest after updating virtualbox from 3.x to 4.x

After update from virtualbox 3.x to 4.x the scroll wheel of my mouse stopped working - just behaved as a three button mouse.

Newer versions of debian no longer have an xorg.conf file - since it's not normally needed.

After some searching I found that it has a config loading directory /usr/share/X11/xorg.conf.d/ and virtualbox had added a 50-vboxmouse.conf there.

I changed this file from

Section "InputClass"
        Identifier      "vboxmouse"
        MatchDevicePath "/dev/vboxguest"
        Driver          "vboxmouse"
EndSection

to

iSCSI on the ReadyNAS NV+ and OSX Snow Leopard

The Pro series of NAS from ReadyNAS (Netgear) support iSCSI out of the box. But the NV+ 4disk unit does not. However - a third party plugin is available. Let's look at what is needed to get iSCSI connections between the ReadyNAS NV+ and an iMac running Snow Leopard.

Increasing max number of open files for glassfish user on debian

My glassfish process kept dying with "Too many open files" in the log.

I'm not surprised that it has too many - it has quite a few large applications running - but how to increase this?

ulimit -n shows that the user has a default of 1024.

But ulimit -n 2048 gives -su: ulimit: open files: cannot modify limit: Operation not permitted

Some digging leads to /etc/security/limits.conf

Here we added:

Linux disk activity checking

As part of Building a debian firewall on a CF card I was trying to make sure that disk writes to the firewall CF card were kept to a minimum.

However - I've never really been able to test this. So I was pleased to find http://samwel.tk/laptop_mode/faq - under section 5 there is a question titled "My disk spins up all the time and I have no clue what causes this. Can I debug this?".

Increase entropy on a 2.6 kernel linux box

A good source of entropy is needed for random number generation. This affects services that go via SSL amongst other things.

However - in 2.6.x kernels the entropy sources of a system were reduced - as far as I can see it now is only affected by keyboard, mouse and some IRQ interrupts.

Building a debian firewall on a CF card

I currently have an OpenBSD firewall running on an ancient 586. I have a mini-itx board, CF/IDE converter and a CF card and have been intending to upgrade.

However - rather than OpenBSD I'm going to try for debian (since I know that much better).

This post will end up being a "how I did it" - but at the minute is just a collection of the notes I'm grabbing for now.

For the initial install - I hung a CD-ROM as the slave IDE unit on the primary IDE channel.

I used the 4.0r3 etch netinst CD downloaded from debian.org.

mplayer and rtc

mplayer works best with the real time clock (rtc) device /dev/rtc. It also wants to be able to set frequency up to 1024 as a user.

First make sure the rtc module is loaded - one way is to add rtc to /etc/modules

Now - lots of places I see the recommendation to add

echo 1024 > /proc/sys/dev/rtc/max-user-freq

to your startup scripts. I've never been sure where to hack this in - and the people who are giving the advice have many different suggestions. The whole thing feels like a bad hack.

So - after some investigation - I feel that it is much better to use sysctl - by adding the following to /etc/sysctl.conf

Copying partition contents with tar

Technical:

Note to self - here's the tar command you keep having to lookup

cd /path/to/source
tar lcvf - .|(cd /path/to/dest; tar xpvf - )

Re-generate openssl certificate for apache

Technical:

Just a note to self - to generate a new certificate

openssl req -new -key /etc/ssl/private/keyfile -x509 -days nnn -out /etc/apache2/ssl/certfile

exim4 - dnslookup - ignore_target_hosts

Technical:

The dnslookup section of the exim4 config contains

# ignore private rfc1918 and APIPA addresses
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16

To allow one specific subnet thru change it:
# ignore private rfc1918 and APIPA addresses
ignore_target_hosts = !192.168.3.0/24 : 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16

Here it allows the 192.168.3.x network.

Gnome default browser - under xfce4

Technical:

Running xfce4 - and have no gnome control panel - but I needed to change the default browser.

gconftool -g /desktop/gnome/url-handlers/http
gconftool -g /desktop/gnome/url-handlers/https

will tell you what is set - in my case "epiphany %s"

I tend to use opera - so

gconftool -s /desktop/gnome/url-handlers/http -t string 'opera -newpage %s'
gconftool -s /desktop/gnome/url-handlers/https -t string 'opera -newpage %s'

did the trick

Adding a new disk with LVM and XFS

Technical:

This machine is a debian sarge install (2.6 kernel). During installation - it was set up with root as ext3, some swap - and the rest of the disk as an lvm area. All partitions within this area are xfs. All the work was done by the debian installer. Now - we have a new disk which I needed to add.

So - since this is an already running box - the debian installer can't really be used - let's use the actual utilities.

All of the required steps are documented on the LVM HOWTO

First - we need to decide if we are going to use the whole disk or a partition. In this case - the whole disk /dev/hdb. To be able to do this - any existing partition table must be removed

Converting .3gp videos

Technical:

From this blog information on getting mplayer to play .3gp files:

In /etc/mplayer/codecs - find the section for the videocodec ffh263 (just search for it) and add:

format 0x33363273

XDM shutdown buttons

Technical:

When using xdm instead of gdm/kdm it's useful to have buttons to allow for shutdown/restart. This is possible using Tcl/Tk and some config tweaks.

Most of the info needed is here:

XDM shutdown buttons

Bluetooth/GPRS

Technical:

Running a dial-up over bluetooth to a S700i.

Most of this is cargo-culted from the pages listed on http://www.holtmann.org/linux/kernel/ (page no longer available) - with most of it coming from here.

Installed bluez-hcidump, bluez-pin and bluez-utils.

Used hcidump and sdptool to scan for the device - got the device's id.

bluez-pin worked for me - so I kept that.

Config files.

/etc/bluetooth/hcid.conf - unchanged

/etc/bluetooth/rfcomm.conf

rfcomm0 {
bind yes;
device device_id;
channel 1;

Myth TV - further hardware ramblings

Technical:

At least 2GHz CPU
Between 256 and 512 MB ram
Disk - two 200Gb disks? Maybe LVM? Either XFS or JFS?
2x Hauppauge 350 capture cards or 1 350 and 1 DVB card (is DVB available in Norway)?
Soundcard - probably the on-board one will be good enough
Vid card - TV out - use the 350?

Myth TV - testing software

Technical:

Testing some of the software that Myth TV uses. XML TV for Norway is currently broken in the release version - but the CVS version of the grabber seems to be sorted.

So - how to make a box that is powerful enough but quiet enough? Some of the mini-itx boards look good - but - not enough slots - so ... how to decide what the hardware should actually be?

Myth TV

Technical:

Looking at setting up a MythTV box (MythTV)

Normal questions - what hardware to get - why can't you get motherboards without inbuilt sound/screen/net etc etc.

Could be fun - so far it may look like

2.x+ GHz processor
2 or 3 250 Gb disks (maybe time to learn lvm?)
Hauppauge 350 encoder/decoder card (1 or 2)

Not sure about graphics card or sound card just yet.

Longer term - add a DVD burner :-)

Subscribe to RSS - linux