PhpStorm Won’t Open on Linux

Recently PhpStorm suddenly failed to start under Debian Sid. Digging around in the log (~/.WebIde70/system/log/idea.log) I found this strange error:

java.lang.RuntimeException: java.lang.ClassCastException: com.intellij.openapi.wm.impl.TestWindowManager cannot be cast to com.intellij.openapi.wm.impl.WindowManagerImpl
        at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:158)
        at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:59)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:694)
        at java.awt.EventQueue$3.run(EventQueue.java:692)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.ClassCastException: com.intellij.openapi.wm.impl.TestWindowManager cannot be cast to com.intellij.openapi.wm.impl.WindowManagerImpl
        at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:229)
        at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:152)
        ... 15 more

Turns out that I had somehow lost my JDK installation. i.e.

> dpkg --get-selections | egrep "jdk|jre"
openjdk-7-jre:amd64				install
openjdk-7-jre-headless:amd64	install

The fix is easy!

sudo apt-get install openjdk-7-jdk

Even though OpenJDK isn’t officially supported by JetBrains, I’ve had no issues running it for years.

Creating a bootable USB stick on OS X →

Here’s a foolproof guide for creating a bootable USB drive from your Mac. No need for UNetbootin, and should work with any Linux distro.

African animal chess pieces →

Check out these totally-sweet animal chess pieces. With the long-necked queen, I might actually not forget about (and lose) her!

Animal chess pieces

150 Years of Misunderstanding the Civil War →

Battle of Cold Harbor, 1864

This article from The Atlantic offers a fascinating new perspective on the American Civil War. It questions whether or not the horrific bloodshed was worth the outcome.

… the war [did not] knit the nation back together. Instead, the South became a stagnant backwater, a resentful region that lagged and resisted the nation’s progress. It would take a century and the Civil Rights struggle for blacks to achieve legal equality, and for the South to emerge from poverty and isolation.

What we once enjoyed and deeply loved we can never lose, for all that we love deeply becomes part of us.

— Helen Keller, quoted in the Boulder, Colo., Daily Camera

Amazon's Best Reviews →

It’s not big enough to completely cover a horse’s head, and it doesn’t provide enough air flow for them, either.

Summer Fail Compilation

Melissa doesn’t understand why I enjoy these videos. And truthfully, I’m not sure why I enjoy these videos. But for some reason I am highly entertained by watching accidents…


Summer fail compilation || TNL by TwisterNederland

Disable Screen Lock in GNOME Shell / Cinnamon

I’ve recently switched all my Linux workstations to Linux Mint Debian Edition (LMDE) with Cinnamon as my desktop environment. Overall this has been a joy, and I feel free of the Ubuntu weight that I’d been carrying around for a few years. But since Cinnamon is a fork of GNOME Shell, I’ve also had a few instances where things weren’t quite working the way I wished they would.

One such case is the screen lock. Anytime the GNOME Shell “screensaver” (actually just a black screen) comes on, I was forced to type in my password. In a work or public environment this protection makes sense. But when I’m home step away for a few minutes, it’s a nuisance to have to repeatedly type my password just to get back to what I was doing.

Searching around the Internet didn’t immediately reveal a quick fix. I figured it must be something I could control with gsettings, but I had no idea what the key would be. So I decided to take a look at the source code for gnome-screensaver and stumbled upon the following snippet:

#define LOCKDOWN_SETTINGS_SCHEMA "org.gnome.desktop.lockdown"
#define KEY_LOCK_DISABLE "disable-lock-screen"

Ohhh, now that looks promising. Let’s see if the lock is enabled…

$> gsettings get org.gnome.desktop.lockdown disable-lock-screen
false

OK, let’s disable it!

$> gsettings set org.gnome.desktop.lockdown disable-lock-screen
true

Voila! No more screen lock. I certainly felt lucky to have found that code so quickly.

Now, there’s a caveat. This will entirely disable your screen lock. So you can’t hit Ctrl-Alt-L to lock your screen if you are working on something sensitive. Turns out someone filed a buge with GNOME, so at least the developers are aware of the problem.

Happy hacking!