Posts Tagged ‘lazyweb’

linen and towels

Friday, July 30th, 2010

Dear lazyweb or someone who is already in NY,

do I have to bring my own bed linen and towels or are they provided by Furnald? I couldn’t find the information on the website. I guess I have to bring that stuff since it is not really a hotel, right?

Running Gnome Applets in KDE

Wednesday, May 5th, 2010

Dear Lazyweb,

does anyone know how to run gnome applets in KDE? I’m talking about byzanz which is a software to record your desktop in an animated gif, ogg or Flash format. It provides a command line and a gnome applet, which apparently only works under Gnome. Is there a workaround to make gnome applets run under KDE as well?

How to find packages installed/updated yesterday?

Tuesday, January 26th, 2010

Dear Lazyweb,

since yesterday’s daily update, my laptop runs really sluggish. Is there a way to list all packages which where updated or installed yesterday to track down the problem?

My eyes! The goggles, they do nothing!

Monday, November 23rd, 2009

Dear Lazyweb,

do you know how to theme Tk apps? In the default setting, Tk apps running on my KDE4 desktop, cause spontanous eye cancer:

Default Tk theme.

there must be a way to theme them to look like the Qt or at least GTK apps, or not?

Gridengine and Qlogin Zombies

Saturday, September 12th, 2009

Dear Lazyweb,

we’re using gridengine 6.2 on our cluster system at work. On this system we have a queue for interactive jobs. The queue has a fixed number of slots. If someone wants to start an interactive session and no free slots are available the interactive job cannot start otherwise it will consume one slot during the session and free it again after the user quit the interactive session.

Unfortunately, if the user forgets to quit the interactive session properly (e.g. by entering “quit” in the terminal) and just closes the terminal, the interactive session becomes a zombie. The user cannot use this session anymore, but the process is still running and thus blocking a slot. Since it happens quite often that users fail to quit the interactive session properly, the free slots are used up pretty soon and no one can start new interactive sessions anymore — quite a nice bug in the gridengine software (available in Debian/Lenny by the way…)

You can see that those processes are still running using ps and qstat. The question is: how can I effectively search for those processes and kill them? Gridengine does not seem to be aware of those zombies and the user might run other interactive jobs in parallel which must not be killed. So how does one find the zombies and kill them reliably?

SO_REUSEADDR

Wednesday, July 22nd, 2009

Dear Lazyweb,

I have a simple test application where a TCP/IP server listens for incoming connections, reads the data and closes the connection again and a client which opens connections to the server and sends a package and closes the connection as fast as it can:

The server looks like this:

    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    sock.setblocking(False)
    sock.bind(("", 12347))
    sock.listen(1)

    slist = [sock]
    # use select to poll the sockets
    while 1:
        l = select.select(slist, [], [])
        for i in l[0]:
            conn, addr = i.accept()
            data = “”
            while 1:
                tmp = conn.recv(1024)
                if not tmp:
                    break
                data += tmp
            conn.shutdown(socket.SHUT_RDWR)
            conn.close()

The Client:

    # Open a connection, send data and close the connection as fast as possible
    while 1:
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect(("", 12347))
        sock.send("foo")
        sock.shutdown(socket.SHUT_RDWR)
        sock.close()

The Problem with this application: After roughly 25.000 Iterations the client quits with a friendly:

error: (99, ‘Cannot assign requested address’)

Netstat shows the problem: roughly 25.000 of these ones:

...
tcp        0      0 localhost:56946   localhost:12347         TIME_WAIT
tcp        0      0 localhost:47163   localhost:12347         TIME_WAIT
tcp        0      0 localhost:42758   localhost:12347         TIME_WAIT
...

I’m not a TCP/IP expert but I thought SO_REUSEADDR is supposed to address this problem by allowing to reuse those as-good-as-closed connections in TIME_WAIT state, or not? So why does it fail in my test application?

git-svn branch

Friday, February 27th, 2009

Dear Lazyweb,

how do I push a local git branch to a new svn branch? The other way round is quite easy and well documented but I didn’t find a single document describing what I want to do.

I’m working with an svn repository with standard layout. I use git-svn to be able to use git locally. Until now I’ve always had my master branch reflect the svn’s trunk. For every new feature, I created a local git branch, merged with the master branch when I was done and dcommit’ed it to the svn’s trunk. But now I need to publish an experimental feature which should not yet go into the trunk so I have to publish my local git branch to an svn branch.

I tried git-svn branch foo in the local git branch and it created a svn branch/foo for me but not from the current git branch but from the current master (remote/trunk). That’s of course not what I wanted, I wanted to push the current branch where I’m in and have it linked to the remote svn branch.

Neither the manpage of git-svn nor some documentation in the web helped me. I even found a pretty detailed document which describes each and every aspect of git-svn but unfortunately not mine.

Is this use case so unusual that no one else uses git-svn this way or is it my weak git-FU?

Gettext and QT4?

Sunday, September 14th, 2008

Dear Lazyweb,

do you know how to translate QT4 applications with gettext? Looks like QT4 now uses it’s own mechanism (lupdate -> .ts -> linguist -> .ts -> lrelease -> .qm) for translating strings, which makes things a bit complicated if the rest of your application (the non GUI part) still uses gettext.

The background is — as some of you may have noticed — that rng’s GUI isn’t properly translated anymore since the switch from QT3 to QT4. I don’t know if I just should adopt QT4’s translation mechanism, but for now it would be very nice if I just could use my .po files for the QT4 stuff.

Segfaults Everywhere

Monday, July 7th, 2008

Dear Lazyweb,

A few weeks ago rng started to show some segfaulty behavior. I’ve absolutely no idea what’s going on, since Python code usually doesn’t segfault. I guess the problem lies in the qt3-bindings rng uses — does someone know how to verify this?

There is a backtrace which seems to show that the problem lies somewhere in /usr/lib/python2.5/site-packages/qt.so but I’m not entirely sure how to interpret that.

Forcing win32-loader to use i386?

Tuesday, December 4th, 2007

Dear Lazyweb,

I’m happily using the win32-loader from goodbye-microsoft.com to install Debian/Etch on several Lenovo X61s subnotebooks which don’t have a DVD drive but a running XP preinstalled. The installer correctly detects a 64bit architecture and therefore installs AMD64. Unfortunately I want to run i386 on those machines. Is there a way to force a specific arch for the win32-loader?

Edit: Of course I already tried to install Debian from an USB stick on those machines, but the Debian installer refuses to work at the point where it’s unable to find the DVD/CD drive on the subnotebooks without one. I’ve tried netinst and businesscard, none of them worked from USB for me. Any hints?