WordPress moderate comments even if moderation off

Recently I came across a problem with comments moderation. I didn’t want to have comments on a blog moderated, so I have turned it off in a discussion settings in WordPress. But WordPress kept putting all new comments into the moderation queue.

The answer is an Akismet plugin, that was turned on but not initialized (no code generated). Apparently Akismet in that state treat all comments as suspicious and overrides WordPress by putting them to moderation queue.

Disabling Akismet plugin finally turned the moderation off.

Posted in Technology | Tagged | 1 Comment

Skype, Firefox 4 (or other 32-bit app) on 64-bit Fedora Linux

After setting up new Fedora 14 x86_64 system I have installed Skype for Fedora offered on the Skype web page. It turned out that it is i586 compilation and my system wasn’t configured to run 32-bit applications out of the box. The same problem showed up with brand new Firefox 4 that also by default came in i386 flavor.

Jump straight to solution

First error I got was:

bash: /usr/bin/skype: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

This is the sign of missing i386 version of glibc library.

After installing that, there were more errors, i.e.:

skype: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory
skype: error while loading shared libraries: libXv.so.1: cannot open shared object file: No such file or directory

and more of such.

Each one means missing i386 (i686) library that was not installed by default on x86_64 system.

To find out package that needs to be installed for a particular error, I first check if I do have x86_64 version, i.e.

$ locate libXv.so.1
/usr/lib64/libXv.so.1
/usr/lib64/libXv.so.1.0.0

Then I check what is the name of the package containing it:

$ rpm -qf /usr/lib64/libXv.so.1
libXv-1.0.5-1.fc13.x86_64

and I learn that I need to install libXv.i686 — the same package in i386/i686 flavor.


For Skype this is the command that will install all the requirements:

yum install glibc.i686 alsa-lib.i686 libXv.i686 libXScrnSaver.i686 libstdc++.i686 qt.i686 qt-x11.i686

Firefox 4 is more demanding and needs yet:

yum install gtk2.i686 dbus-glib.i686 libXt.i686
Posted in Linux | 1 Comment

Moving windows partition

This is an advanced topic, and the description below is very quick and raw. If you have any doubts you know what you are doing, just don’t risk and don’t experiment.

After moving a FAT32 (not sure about NTFS) partition within a disk (as a whole, without looking inside, just byte-to-byte copying), Windows stops to boot. It even starts to, but later fails with the error (blue screen) -  I don’t remember saying what right now (but will check).

Problem is that damn Windows keeps absolute offset of the partition data inside the boot sector of that partition!

These are 4 little-endian bytes at 1Ch offset from partition start.
Number in there should point do partition data start, that is (at least in case of extended partitions) partition offset (a sum of size of all the preceding partitions) + 63 bytes.

References: MS WIN4.1 boot record

Posted in Windows | Tagged , , | Leave a comment

KDE 4 grumbling

Recently I have upgraded my system to Fedora 9, and was generously forced to upgrade KDE 3 to KDE 4. I found it very annoying, and still cannot configure it in a way I’m used to work on my desktop.

So here you have – my problems, workarounds, and solutions (if I ever get to that point).

  • Upgraded KDE 3 to KDE 4 + doing some configuration tweaking resulted in
    crash of KDE on every startup
    . Well, I didn’t have time to debug it, so
    just removed ~/.kde directory and did new config from scratch. Painful, lost
    all settings from kde apps too (have a backup), but worked.

    Ah, it happened again. I wasn’t going to scratch the config again, so tried to find out.
    Crash seems to be related with adding some scripts (anything?) to
    ~/.kde/Autostart. If I find out something more, I’ll be submitting a bug
    report probably.

    Update: Problem turned out to be my default settings of umask 0077, that disallowed any access to /usr/share/mime/ every time it got updated. That made kde to crash.

  • Panel (or how they call the main menu bar) on the left (vertically)
    setting is unusable
    Applications (widgets) embed in it, just does not
    support (does not fit) that mode. No solution as of now.
    Update (KDE 4.2): This is partially fixed, but some apps/widgets still behave poorly.
  • No ‘Manual’ mode for window placement Any automatic (even Smart) option
    on a large (virtual/multi-monitor) display just does not work for me. I want
    manual control, period. For KDE 3 I wrote a small, and quite imperfect patch
    to add that mode to kwin. Will have to do the same for KDE 4.
    Anyway, ok, that’s just a feature request, with apparently minimal interest among users.

    Update (KDE 4.2): I have implememnted that feature for myself. Maybe after more testing I will make the patch public.

  • gnome-terminal just got mad, shows a lot of trash instead of ASCII
    text on a +- half of the screen. Didn’t debug. Highlighting the text, or
    moving the window out of the screen and back helps until contents changes.
    gnome-termial window with broken contents

    Tried switching to konsole, but…

    Update (KDE 4.1): this started to work ok at some point. Not sure when/why. No more konsole. Hurray!

  • konsole knows better(!) what shortcuts I want to use, so redefines
    Ctrl+Insert to ‘Paste’ the clipboard (aka Ctrl+V), instead paste the current selection (X
    default), and disallow to change it.
  • konsole starts in geometry of last closed konsole (sic!), and no way
    to change, set up on
    command line or in
    any other way (tried dcop/dbus too!)
  • konsole tabs cannot be set up upon command line startup, i.e. what
    tabs are opened, how to name them, and what command to run
  • Where do I configure mouse wheel to change desktops?

    Answer: Option is gone in KDE4 (using compositing, but apparently, in my case, without compositing too), but planned.

    Update (KDE 4.2): Fixed

  • New kickoff menu very hard to navigate when you want to scan through menus. Fortunately old one is available.

  • How do I setup middle click on the desktop = window list?

  • And forced predefined shortcuts again!. I’m used to have Alt+Up
    combination bound to Window Rise action. Who made the developers into the
    position to decide it will be irrevocably bound to some ‘Up’ action?! If you
    wish, you can warn, that redefining the standard action is a bad idea
    and user does it on his responsibility. But force?! You are apparently going
    Windows!
    Dialog showing error window

    Window says: The ‘Alt+Up’ key combination has already been allocated to the standard action “Up” that many application use. You cannot use it for global shortcuts for this reason.


  • Fixed both forced shortcuts problem with a kdelibs-remove-shortcuts.patch. For now on, it disables only shortcuts: Alt+Up & Shift+Insert, so both can redefined. This unfortunately does not fix Ctrl+Insert being bound to ‘Paste’ (although it can be now redefined to something else).
  • It means rebuilding whole KDE rpms every KDE update. Eh…

Post Scriptum: this is an import of information that I wrote a while ago. Things might have changed since then.

Posted in Linux | 1 Comment

IOGear GWU513 wireless card – Windows 64-bit drivers

I’ve been trying to find x64 drivers for my USB 802.11g WiFi adapter (actually to use them under Linux x86_64, but that doesn’t matter). I couldn’t find Vista nor XP 64-bit drivers for it, neither for any other device with Prism54 chip GWU513 has.
So finally I went into a Live Chart with IOGEAR support and here is an answer I got:

You are now chatting with: ‘Iogear3′
Iogear3: Thank you for using IOGEAR Customer Advocacy Technical Support Live Chat. Please tell me your model number, operating system, and short description of the problem.
You: Hello, I own GWU513 802.11g network card, and just upgraded my computer to 64 bit. Where can I find drivers that would work with 64-bit OS?
Iogear3: That unit is only supported on 32 bit OSs, we unfortunately do not offer support for it under 64 bit systems.
You: Are there any plans to release 64-bit drivers?
Iogear3: No as that product is discontinued we have no plans to offer 64 bit support.
You: Hmm, I must say I’m quite disappointed.
You: Hmm, I must say I’m quite disappointed.Thanks anyway
Iogear3: Take care.

Well, that would be it… Any new info is appreciated.

PS. Actually, GWU513 works under Linux (x86 and x86_64) after minor tweaking.
Isn’t it funny that for once Linux has better WiFi drivers than Windows?

Posted in Windows | Tagged , | Leave a comment

Matshita UJDA745 CD-RW/DVD combo drive failure

UJDA745 drive

Matshita UJDA745 (Panasonic/Matsushita) is an ultraslim 9.5mm (regular is 12.7mm high) cdrw/dvd drive build into some light laptops, ie. Sony Vaio PCG-V505BX (and probably other from 505 series), IBM T40.

DVD reading problems

Unfortunately it seems that it is build on weak parts, or something else bad happens to the hardware as after some period of time for unspecified reason drive stops reading/playing DVDs. Some DVD still can be recognized, but later a lot of read errors shows up. Same DVDs are read without any problem in another drive.
This happened to drive I bought (new) in a laptop and another I’ve bought on eBay as a replacement.

more info

  • CD and CD-writing is not affected.
  • both data DVD and video DVD does not work (neither DVD-R/RW nor pressed)
  • not an OS issue (doesn’t work in Linux nor in WinXP)
  • uploading newest firmware 1.05 doesn’t help
  • software or hardware were not abused in any way (ie. no unofficial firmwares, no disassembling)
  • BTW, drive ‘by design’ doesn’t read DVD+R (but firmware 1.05 states to add support for Double Layer DVD+R)

devices that failed

  • manufactured: June 2003, serial no: 3FBEB127xxx
  • manufactured: March 2003, serial no: 3CAEB037xxx

finally…, replace with compatible drive

After unsuccessful tries to rescue or replace broken UJDA745 drive, with new one. I have finally decided to buy compatible DVD+-RW drive MATSHITA UJ-822Da. I’ve paid about $130 on eBay. Replacing the drive is easy, and the drive seems to work without any problems so far (a few months now).

Resources

Here I’m trying to collect web resources on that issue, for others that are hit by that issue, and to show that it is not single issue, but rather common problem with this hardware…

various complains on the issue

Compatible models

Some says that UJDA755, Panasonic UJ-812B DVD-R or Panasonic UJ-822B DVD+-R can replace UJDA745

Other resources

Comments

Any solution to the problem is really appreciated…
Any additional info of course, too…
By then, I would recommend to avoid buying laptop with an UJDA745.

Posted in Hardware | Tagged , | Leave a comment

Debug memory errors with valgrind

For debugging memory errors valgrind is very useful tool.

broken program would show

$ ./program
*** glibc detected *** double free or corruption (out): 0x08138a80 ***
Aborted

valgrind shows where the problem occurs

$ valgrind ./program</div>
<div>==31784== Invalid free() / delete / delete[]
==31784==    at 0x1B90579D: free (vg_replace_malloc.c:152)
==31784==    by 0x1BB2E6CD: xfree (xmalloc.c:200)
==31784==    by 0x1BB25095: _xFreePtr (mem.c:613)

For debugging with valgrind I use following configuration:

~/.valgrindrc file

--tool=memcheck
--memcheck:leak-check=yes
--memcheck:show-reachable=yes
--num-callers=16
--memcheck:db-attach=no

To disable glibc memory errors detection you need to set MALLOC_CHECK_ environment variable to 0 (note the ending underscore).

export MALLOC_CHECK_=0
Posted in Programming | Tagged , , | Leave a comment

WindowMaker DockApp fix

WindowMaker DockApp does not show, or show in regular window

Normally DockApps should be displayed in special mode, so they can be docked in one of the screen corners. They also does not have titlebar, and does not require to be placed manually (if this is set up in Window Maker).

Some old DockApp applications are somehow incompatible with recent WindowMaker (tested on 0.91+), and either does not display at all, or display in regular “window”.

I didn’t see confirmation of that behavior, so maybe this is only my issue (but on a few machines) but solution I found is to fix the source code bye  changing one line of it. Search for res_class string in the source and change right side of the expression to the "DockApp". Recompile.

Old code

something.res_class = "anything";

New code

something.res_class = "DockApp";

Post Scriptum: this is an import of information that I wrote a while ago. Things might have changed since then.
Posted in Linux | Tagged , | Leave a comment

Playing DVD movie stored in an image on a disk

mplayer dvd:// -dvd-device /tmp/movie-image.iso
Posted in Linux | Tagged , , | Leave a comment

Forward email as an attachment in pine

By default pine attaches forwarded messages inline.
Here is trick to forward email as an attachment.
It is sometimes important that you preserve original headers when forwarding email. Eg., if you want to report spam.
Forwarding as attachment do preserve email headers, attachment inline does not.

Instruction:

  1. Open (or put cursor on) message you want to forward
  2. Enter Full Headers mode¹ (press h)
  3. Forward the mail (press f)
  4. Accept ‘Forward message as an attachment?’ (press y)

Tested on pine 4.62. Is there any simple method? What displaying full headers has to do?

¹To be able to enter Full Headers mode, you may need to enable it in configuration:
On main screen enter Setup (press s), Config (c), and check (x) enable-full-header-cmd in Advanced Command Preferences. Exit and save (e, y).

Post Scriptum: this is an import of information that I wrote a while ago. Things might have changed since then.

Posted in Linux | Tagged , | Leave a comment