Tag Archives: Helden der Technik

Fix HP Compaq 6910p Fan Noise under Linux

Although I prefer Macs as my primary work horses, I keep a trusty old HP Compaq 6910p around as a fallback. While generally nice the 6910p has one major flaw when being run with Linux: The fans will keep running constantly, emitting a high frequency whine that makes working unbearable in a couple of minutes. By chance I found a fix for the problem here. Open a terminal window and issue the following commands:

sudo -i
for i in 0 1 2 3 4; do echo "0" > /sys/class/thermal/cooling_device${i}/cur_state; done

While this will not completely eliminate the fans spinning up, it will at least make them spin down again when no more cooling is needed.

IPv6 bei Strato mit Debian “Jessie”

Nach dem Upgrade eines meiner Server bei Strato auf Debian “Jessie” funktionierte auf einmal das Routing von IPv6 nicht mehr. Schuld ist wohl, dass Strato den Eintrag fe80::1 als Default-Route verwendet, was unter Jessie anscheinend nicht mehr so einfach möglich ist. Funktionieren tut es bei mir jetzt wieder mit diesem Eintrag in /etc/network/interfaces:

iface eth0 inet6 static
    pre-up modprobe ipv6
    address 2a01:238:429c:2900:dead:beef:2bad:4dad
    netmask 128
    gateway fe80::1
    post-up ip -6 route add default via fe80::1 dev eth0

Wichtig ist dabei die letzte Zeile. Sie weist das Betriebssystem an, das Default-Gateway über das Interface eth0 anzusprechen und nicht – wie es das normalerweise tun würde – über lo.

Once more: How to really install Oracle Java on Mac OS X

After upgrading to Mac OS X 10.9 “Mavericks” you may notice that the upgrade also removed any versions of Java you may have had installed. If you’re just using Java Applets in the browser, you can simply go to the Java Download Page, install the offered version of the JRE and be done with it.
If, however, you also need to run local Java apps like for example Eclipse, you’ll get prompted to install Apple’s version of Java. If you do that, this will not only break the browser plugin but also install a version of Java that’s quite outdated and not well maintained by Apple.

The better solution is to download Oracle’s JDK (yup, the complete thing) and make OS X work happily with that. To do this, head over to Oracle’s Java SE download page, click the big button labeled “Java Download” and on the next page accept the License Agreement and select the jdk-7uXX-macosx-x64.dmg for download.
Install by double-clicking on the downloaded file and follow the on-screen instruction. Afterwards open a terminal window and issue

sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_XX.jdk /System/Library/Java/JavaVirtualMachines/

(That’s quite a long line above, so make sure to scroll to the right and select everything. Also make sure to replace the ‘XX’ in the version number with the correct version of the JDK you downloaded)

That’s it. From now on Mac OS X 10.9 (and 10.8, for that matter) will work happily with Oracle’s Java and no longer prompt for installing the Apple version.

Apple Maps: Close, But Still No Cigar

Apple_Maps_Off_by_One
Even with Apple’s Maps updated I still wouldn’t trust them for navigation. But to be fair: it also took Google Maps three years to fix that particular error.

Finally: A Fix for Python 2.7 Aborts on Import of ctypes

This has been bugging me for quite some time now: Every time I tried to import the ctypes module into Python 2.7, all I would get was the famous “Aborted” message. With some time to spare I could trace the problem down to the file closures.c of the libffi submodule. Most likely due to a compiler/optimization bug in older versions of gcc a double-free is happening there in line 151.
Since the surrounding function only checks for the presence of SELinux on the host and since the box I need to run Python 2.7 on doesn’t have SELinux installed, I opted for simply removing the whole thing:

--- a/Modules/_ctypes/libffi/src/closures.c 2012-04-10 01:07:33.000000000 +0200
+++ b/Modules/_ctpyes/libffi/src/closures.c 2012-06-20 17:35:40.277850045 +0200
@@ -119,52 +119,7 @@
 #define LACKS_SYS_MMAN_H 1
 
 #if FFI_MMAP_EXEC_SELINUX
-#include <sys/statfs.h>
-#include <stdlib.h>
-
-static int selinux_enabled = -1;
-
-static int
-selinux_enabled_check (void)
-{
-  struct statfs sfs;
-  FILE *f;
-  char *buf = NULL;
-  size_t len = 0;
-
-  if (statfs ("/selinux", &sfs) >= 0
-      && (unsigned int) sfs.f_type == 0xf97cff8cU)
-    return 1;
-  f = fopen ("/proc/mounts", "r");
-  if (f == NULL)
-    return 0;
-  while (getline (&buf, &len, f) >= 0)
-    {
-      char *p = strchr (buf, ' ');
-      if (p == NULL)
-        break;
-      p = strchr (p + 1, ' ');
-      if (p == NULL)
-        break;
-      if (strncmp (p + 1, "selinuxfs ", 10) != 0)
-        {
-          free (buf);
-          fclose (f);
-          return 1;
-        }
-    }
-  free (buf);
-  fclose (f);
-  return 0;
-}
-
-#define is_selinux_enabled() (selinux_enabled >= 0 ? selinux_enabled \
-                 : (selinux_enabled = selinux_enabled_check ()))
-
-#else
-
 #define is_selinux_enabled() 0
-
 #endif /* !FFI_MMAP_EXEC_SELINUX */
 
 #elif defined (__CYGWIN__)

Compile, install – works. Now on to some other stuff that needs Python 2.7 to run properly ;)

Kleine Erfolgserlebnisse

Vorher

Check name    Uptime    Downtime    Outages   Response time
#######       58.54%    9h 57m 02s    189      9649ms

Nachher

Check name    Uptime    Downtime    Outages   Response time
#######       100.00%   0h 00m 00s     0        647ms

Best Summing-up of Google’s new Search App for iPad

Yep its great and now they can move on to a decent Google+ app for iPad.
–Carlos Rodrigues

[ More ]

So nutzt man Facebook richtig

Sehr geehrter Herr Xxxxxx,

sind Sie der Michael Xxxxxx aus der Xxxxxxxxxxstr. 46, in XXXXX Xxxxxxxx-
Wenn ja, ich bin der Allianz-Fachmann von Ihrem Nachbar Gunter Xxxxxxx. Der hat Ihren autositz beschädigt.
Damit ich den Schaden begleichen kann, benötige ich Ihre Bankverbindung.

Mit freundlichen Grüßen
Mathias Xxxxxxx
Allianz Agentur Xxxxxx-Xxxxxxx

Wozu einen Brief schreiben, wenn man doch über Facebook wahllos (die falschen) Leute anschreiben kann?

The Day The Routers Died

Can’t believe I missed that.

I especially like the part about “those who stay silent”.

Connect a Mac to a Minolta 2490MF

This isn’t a very common problem but since the solution is simple, it may come in handy. Konica-Minolta is one of the rare companies that doesn’t provide Mac drivers for at least some of their printers. Luckily enough not all of their printers are manufactured by Konica-Minolta either. So to print on a MagiColor 2490MF simply install the printer drivers for the Xerox 6115MFP. Works great via both, USB and network connection.

Google Maps: Almost Off By One (street) Error

Almost Off By One

To be fair: Google is not alone there. All major navigation systems try to send visitors through the gardens of my neighbors because of this small glitch.

Neuer Rekord für “Skype for Mac (beta)”

Gerade eben hat die neue Skype for Mac (beta) einen neuen Rekord in der Kategorie “kürzeste Verweildauer auf meinem Mac” aufgestellt. Installieren, Starten, Gruseln, Runterschmeissen – das war alles in weniger als 60 Sekunden durch. Die neue “Schaltzentrale” ist für mich total unbrauchbar. Skype for Mac beta - Main Screen
Es interessiert mich nicht, wann ich zuletzt mit wem aus meiner Kontaktliste gechattet habe – was übrigens neben “ich schick’ mal schnell die Datei” meine Hauptanwendung von Skype ist -, aber ich muss alle meine wichtigen Kontakte im Schnellzugriff haben. Naja. Die alte 2.8.0.863 wird ja hoffentlich noch ‘ne Weile funktionieren.

P.S.: Ich bin da nicht allein

Ausgelaufen

Es hat sich ausgelaufen

Ausgelaufen


Ein bisschen über 160.000 km hat sie gehalten – jetzt hat sie sich ausgelaufen und ich muss mir eine neue Antriebsratte suchen. Mist. Aber bei der Gelegenheit kann ich dann gleich die Kugellager am Laufrad wechseln.

What I Really Hate About Windows

I don’t run Windows regularly. I use Mac OS X. I use Ubuntu. I use Solaris. But when I need to run Windows it will never, ever fail to remind me why I don’t run Windows. It’s as simple as that. If updates are available, Mac OS X will inform me. Ubuntu will inform me. And if I told it to do so, Solaris will inform me. But all of these systems will never fucking ever *reboot* my machine just because they *thought* it’d be necessary. And even if they did have a function like that, they’d sure as hell be intelligent enough to find out that there are tasks running and stop or at least postpone the reboot. Oh well, after all it’s Windows I’m ranting about here ;)
Continue reading

Bash: Dynamic Variables

Every once in a while I need to use dynamic variables in shell scripts for doing things like

echo ${{$foo}_bar}

but unfortunately it won’t work like shown in the example above.
What will work however is this:
Continue reading

Hard Typing Ahead

This camera module is known to be mounted upside-down in some notebooks. Applications that use the libv4l library should display the video correctly, as libv4l detects upside-down cameras and rotates the image automatically. See Hans de Goede’s post on the linux-uvc-devel mailing list for more information. For applications that don’t use libv4l, try holding your computer upside-down.

From the Linux-UVC wiki.
Continue reading

Weltfrieden

Vorhin rief ‘ne Kundin an, ob ich Passwort weiß.
Ich merke mir Passwörter eigentlich nie.
Aber an weltfrieden konnte ich mich in der Tat erinnern.

Wäre mir wohl ähnlich gegangen.