A Procrastinator's Journal

Thinking aloud…

Archive for the ‘systems’ Category

X11 forwarding on openssh server

leave a comment »

On my recent server installations, I noticed that X11 connections were not being forwarded via ssh. Initially I thought it was because of lack of some core X11 libraries in server installation. However, today I found that it was this OpenSSH bug related to a mess up between ipv4/ipv6. From the bug report:

What happens is that in x11_create_display_inet() (channels.c),
getaddrinfo() apparently returns the IPv6 address family first, and
sshd only tries to bind to that.

I always disable IPv6 in my installations (unless needed) to avoid confusion, and that explained why X11 forwarding refused to work over ssh.

A workaround for this problem is to add the following line to /etc/ssh/sshd_config:
AddressFamily inet

A similar problem also seems to affect Java networking according to this bug. I haven’t experienced it yet, but should remember just in case.


Written by ppatil

May 30, 2011 at 2:04 pm

Enable/disable input devices

leave a comment »

The right mouse button on my eeepc keeps troubling me intermittently (the right button remains pressed–probably it’s shorted sometimes). Although I rarely use the touchpad and its buttons (use a wireless mouse instead), the constant input of right click makes the eeepc unusable when this happens.

The solution?

Xorg provides a facility to control/configure the input devices while plugged in through ‘xinput’.
First, get the full name of the device with
xinput list
identify the device name from the list, e.g., “ImPS/2 Generic Wheel Mouse”

Then, to disable a device, run
xinput --set-int-prop "ImPS/2 Generic Wheel Mouse" "Device Enabled" 8 0

The 8 in this command is the ‘format’ of the attribute. The syntax for ‘xinput’ for newer Xorg is different (use –set-props instead).

To enable it back, run
xinput --set-int-prop "ImPS/2 Generic Wheel Mouse" "Device Enabled" 8 1

Written by ppatil

July 19, 2010 at 6:49 am

ssh keys

leave a comment »

If migrating ssh public/private keys (for example, if starting with a new, clean /home), remember to copy the .gnome2/keyrings/login.keyring in addition the the .ssh directory itself. Else gnome keyring will keep asking for password even if there is no key password.

Written by ppatil

May 1, 2010 at 4:45 am