A Procrastinator's Journal

Thinking aloud…

Archive for the ‘Technology and Software’ 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.

Advertisements

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

Troubles with Gnome NetworkManager

leave a comment »

I always thought NetworkManager was a pain. But I stuck with it because I was too lazy to find/write an alternative. But when it repeatedly deleted my static IP settings for wired links, that was the trigger.
This problem is discussed here:

http://linux.derkeiler.com/Mailing-lists/Ubuntu/2008-11/msg02734.html

And I found wicd, a nice alternative to NetworkManager. Seems sensible to me, works well with wired LAN. Will try it on the eeepc for wireless next.

Update: Have been using wicd for over two months- works great for both wired and wireless.

I’m leaning away from the gnome-desktop. I remember the good old days of wmx. I should try the xfce or fluxbox once again.

Written by ppatil

March 29, 2009 at 11:46 am

Getting vmplayer running on Ubuntu feisty

with 2 comments

The vmware-player gives pixbuf library trouble on the new Ububtu feisty. The problem lies in the gdk-pixbuf.loaders file used by vmplayer. A quick hack is to do the following:

cp /etc/gtk-2.0/gdk-pixbuf.loaders.32 /usr/lib/vmware-player/libconf/etc/gtk-2.0/gdk-pixbuf.loaders

But the next trouble is with the GTK themes- it works fine in GNOME, but in XFCE, it gives trouble. Looks like some conflict between gtk-2.4 and gtk-2.10 in feisty.

Written by ppatil

April 25, 2007 at 6:07 pm

10 good UNIX usage habits

with one comment

Taken from developerworks (thanks to ./): Learn 10 good UNIX usage habits, (Break bad UNIX usage patterns)

When you use a system often, you tend to fall into set usage patterns. Sometimes, you do not start the habit of doing things in the best possible way. Sometimes, you even pick up bad practices that lead to clutter and clumsiness. One of the best ways to correct such inadequacies is to conscientiously pick up good habits that counteract them. This article suggests 10 UNIX command-line habits worth picking up — good habits that help you break many common usage foibles and make you more productive at the command line in the process. Each habit is described in more detail following the list of good habits.

Adopt 10 good habits
Ten good habits to adopt are:

  1. Make directory trees in a single swipe.
  2. Change the path; do not move the archive.
  3. Combine your commands with control operators.
  4. Quote variables with caution.
  5. Use escape sequences to manage long input.
  6. Group your commands together in a list.
  7. Use xargs outside of find.
  8. Know when grep should do the counting — and when it should step aside.
  9. Match certain fields in output, not just lines.
  10. Stop piping cats.

Written by ppatil

December 17, 2006 at 6:27 am

Cleaning up a Debian GNU/Linux system

leave a comment »

A common problem faced by many Debianers who don’t need to reinstall the system over years: accumulated auto-installed packages which are no longer required.

Here’s a solution suggested at Debian Administration :

… One form of neglection is to install, install, install and never un-install any package. The common utility to perform installation and un-installation of packages is apt-get which adds to the problem because it doesn’t have automatic removal of non-needed dependences.

Aptitude to the rescue. Aptitude is another package manager front-end like apt-get but it can keep track of automatically and non-automatically installed packages.
…That is nice, but since the neglecting previous administrator didn’t use Aptitude, all the packages are marked as non automatically installed. …
Well, the answer is: try to mark all files as automatically installed except those that you really want. To do that you can use the following (which you could write in one line if you want): …

A simple solution to a simple problem 🙂

Written by ppatil

November 12, 2006 at 5:43 am