Recent downtime

Well, I’ve finally got my blog back up. It seems that there’s some kind of bug (impossible to trigger in the default configuration, I’d assume) in the newest version of PHP 5 which causes ./ and ../ includes to fail, and which doesn’t play nice with apache’s DirectoryIndex-based redirection. (the feature that lets www.foo.com load www.foo.com/index.html) WordPress makes use of such things in several important places.

I’ve managed to work around that by using symlinks for the ../ includes and by removing the ./ or ../ wherever I found it, but I don’t know what the security implications of such a change are and the post preview window doesn’t work correctly now.

Any input on the problem and what I did to work around it would be greatly appreciated. Also, if you find any features which are still broken, please let me know so I can add the workaround there too. Finally, if you know how to fix it properly, please let me know so I can forward your message to my webhost.

Posted in Site Updates | Leave a comment

udev and evdev: Permissions

As programs start to take advantage of the evdev interface for input devices, it’s only a matter of time before you trip over the default permissions. The big problem is that you can’t just edit the default udev rule for /dev/input/event*, because that would also allow any other user on the system to read your keystrokes. Your passwords, for example.

If you’re like me, you’re probably trying to alter the permissions for a device which can’t be used to input sensitive data anyway. For example, a joystick or gamepad. In such a case, the solution is to override the permissions for just that device. In such a case, letting any user read the permissions is actually a benefit, because you could run your media player as a different user than your normal login name (if you’re feeling paranoid) and still control it via whatever joystick-control module it offers. (XMMS, Audacious 1.3 alpha, and MPlayer all offer such an option)

Anyway, down to business. First, find some uniquely-identifying information for your device. If it’s a USB device, that would be your vendor and product IDs, which can be retrieved using lsusb:

ssokolow@darkstar ~ $ sudo lsusb
Password:
Bus 004 Device 002: ID 046d:08d7 Logitech, Inc.
Bus 004 Device 001: ID 0000:0000
Bus 002 Device 015: ID 045e:0026 Microsoft Corp. SideWinder GamePad Pro
Bus 002 Device 014: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
Bus 002 Device 005: ID 05e3:0604 Genesys Logic, Inc. USB 1.1 Hub
Bus 002 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
ssokolow@darkstar ~ $

Now, udev will normally stop parsing rules when it finds a match, but there is a nice little trick that can be used to alter only the permissions, without having to override the default settings. (thereby ensuring that any changes to the defaults will still apply) In my case, this is what I did…

ssokolow@darkstar ~ $ sudo echo >> /etc/udev/rules.d/10-local.rules << EOF
BUS=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0026", MODE:="0644"
EOF
ssokolow@darkstar ~ $

Important: Don’t copy and paste this. My blogging software “helps me” by taking a page out of Microsoft’s book and substituting typographical quotes. (even inside <code> blocks)

For those who don’t know, >> tells the shell to append rather than create if the file already exists and << specifies that we will be using a Here Document. The trick to this is the “:=” assignment operator used for MODE. It tells udev that this assignment should be final without stopping the rule processing. That is, the defaults will be used, but the permissions specified by them will be ignored.

If you need something a little different. For example, giving specialized names to device nodes, or working with a non-USB device, there are also tools to make that nice and easy. Give the following resources a try and you’ll see what I mean:

Happy hacking. 🙂

UPDATE: Newer example for G15Daemon hotplug now available.

Posted in Geek Stuff | Leave a comment

The Idiocy That Is MySpace

*sigh* I just spent the last two hours helping my brother customize the look of his MySpace page and my only conclusion is that the MySpace developers are either idiots, or coding with their hands tied behind their backs, metaphorically speaking.

For example:

  • MySpace has the worst site design, usability and intuitiveness-wise, of any site I’ve ever visited. Maybe that’s why teens like it so much. Their parents can’t understand a single thing about it.
  • MySpace pages aren’t valid HTML.
  • MySpace “HTML” is almost devoid of classes and IDs
  • You can’t put your styles into the page’s header. You have to stick a style block inside the “About Me” box, leading to what one site calls FOBUC: “Flash Of Butt-Ugly Content”.
  • The # symbol is stripped from all inputted text as an only half-effective block against using CSS to kill the adbox. The same purpose has also lead to an inability to attach CSS to IFrames. This prevents you from linking to an anchor and from styling by ID.
  • The preview box doesn’t correctly represent certain CSS-based changes to your page.
  • The image upload system checks by extension and refuses .jpeg files as “not PNG, JPEG, or GIF” because they don’t end in butchered .jpg extensions.
  • More atrocious behaviour that I know I’m sure forgotten about.

…and through all this, they trumpet the ability to customize your own page. Inconceivable. I could do better in my sleep!

Posted in Web Wandering & Opinion | Leave a comment

Some more geek humor

Two of my favorite list-form jokes: How to shoot yourself in the foot using various languages, and how different kinds of people in the computer industry go about hunting elephants. Enjoy.

Posted in Geek Stuff, Web Wandering & Opinion | 1 Comment

Wikipedia vs. Webcomics

For those who haven’t heard, it seems that Wikipedia has decided that webcomics aren’t an important enough part of culture to be in their encyclopedia.

As I strongly disagree, I have saved one article that hasn’t been deleted yet and I ask you to do the same. I’ve saved El Goonish Shive. (Gzip-compressed Konqueror WAR bundle)

UPDATE: Here are some posts on the Schlock Mercenary blog about the problem:

Posted in Web Wandering & Opinion | 2 Comments

Konqueror with Bookmarklets

Konqueror with Bookmarklets

If you’re a Konqueror user and a power user or geekier, then you’ve probably noticed, as have I, that bookmarklets (javascript bookmarks, for the buzzword-deficient) don’t work. You’ve probably also wondered “What the heck is that Minitools thing from konqueror-addons?”

The answer? Minitools is Konqueror’s term for bookmarklets. It’s a separate bookmarks tree where you put javascript bookmarks so that they can force-disable Javascript in the regular tree for improved security. Now the only problem is accessing them in a comfortable fashion. Here’s my solution:

  1. Enable Settings --> Toolbars --> Extra Toolbar (Konqueror)
  2. Go to Settings --> Configure Toolbar... and select which items you want to be in it. (Note: The toolbar will be listed in the dropdown once for each plugin that contributes to it. Don’t let that confuse you.)
  3. Remove “Animated Logo” from Main Toolbar and add it to bottom of the list in the top entry for Extra Toolbar.
  4. Drag the new toolbar around until you get it on the same line as the main toolbar. It should now look as if you added new buttons into the middle of the existing main toolbar.

Now that you have easy access to them, here are some of the bookmarklets I favor: (Links are to their home sites so you can get more info before you decide whether you want them)

Enjoy!

Posted in Geek Stuff, Web Wandering & Opinion | 1 Comment

Comic – Gold Digger

First, for those who got here through the category system, some people consider Gold Digger to be “American Manga” and I tend to agree. Now, on with the post.

It’s an epic. It’s a comedy. It’s silly. It’s awe-inspiring. It’s sad. It’s sweet…. It’s Gold Digger by Fred Perry.

Gold Digger is an amazing North American comic. It has a manga-like art style, it’s been full-color since it’s 51st issue, it’s still going strong, and it’s the most amazing epic you’ll ever read. I dare not elaborate, for it will spoil some of the surprise, but I can tell you that Fred Perry is either the world’s best plotter, or a master of retconning.

The story starts out as a fairly ordinary story about a female Indiana Jones-style adventurer who doubles as a mad scientist of sorts and has a were-cheetah for an adopted sister, an archmage for a father, and a master warrior for a mother.

In the beginning (the black-and-white series, and the first few issues of the color series), the story makes for a fun series of events involving amazingly addictive characters. However, once the color series revs up, the dominoes begin to fall. Dozens of threads (some you didn’t even realize were flowing until now) begin to weave together, and yet, through it all, the inherent humor never diminishes, nor does it feel out of place.

You can only stand in awe of the genius it takes to weave such a story. Forget Lord of the Rings. Forget Dune. Forget anime like Last Exile. Gold Digger is the ultimate epic, no… the ultimate story. I only wish I could say more without spoiling something.

Well, I can say one more thing. The battle scenes are like Dragonball Z done right. Instead of having the combatants constantly power up to ridiculous levels while driving many types of readers to boredom, the combatants in Gold Digger simply reveal new skills they’ve always had, a feature which Fred Perry uses to build in extra character development. Truly the work of a master storyteller, more like a game of chess than a tale.

…not to mention, the “Peebo Manga” sidestory collection is hilarious. (A Peebo is essentially a cute sentient bomb)

Relevant Links:

Posted in Manga | Leave a comment