Links for 2008-07-21

O2 Leaking Customer Photos (updated) the JBoss/Tomcat install leaks the “secret” URLs through it’s default status page. this is the 3rd helping of FAIL for O2’s web team; 2 previous occasions in the last year exposed customer data through “secret” URL manipulation

Avant Window Navigator “a ‘dock-like’ (cough) navigator bar for the Linux desktop” (via Danny, again!)

trickle ‘user-space bandwidth shaper’, ie. like nice(1) for network bandwidth (via Danny)

RFC 5218 – What Makes For a Successful Protocol? ‘Based on case studies, this document identifies some of the factors influencing success and failure of protocol designs.’ (via spicylinks)

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Comments

Script: knewtab

Here’s a handy script for konsole users like myself:

knewtab — create a new tab in a konsole window, from the commandline

usage: knewtab {tabname} {command line …}

Creates a new tab in a “konsole” window (the current window, or a new one if the command is not run from a konsole).

Requires that the konsole app be run with the “–script” switch.

Download ‘knewtab.txt’

Tags: , , , ,

Comments

Running Dapper

I took the plunge over the weekend, and live-upgraded the new ‘Dapper Drake’ Ubuntu release — ouch. Here’s the two key lessons I learned:

  • Don’t run “grub-install” in a misremembered attempt to update the current GRUB boot menu ‘menu.lst’ file with the new kernel; sadly, this will quietly remove important details from your old menu.lst, such as “initrd” lines, rendering those kernels unbootable. Moral: ensure brain is in gear before meddling with MBRs!

  • If you’re a Kubuntu user, watch out. Ensure you run apt-get install ubuntu-base ubuntu-desktop — bringing the entirety of GNOME up to date — as well as apt-get install kubuntu-desktop after the upgrade; it appears that some part of a new hotplugging subsystem is not included as a dependency of kubuntu-desktop. Failure to do this results in an inability to use USB/hotpluggable devices, including internal devices like the Synaptics touchpad. No pointer devices (mice or touchpads) means no X server at boot, which is always a little annoying.

Some day I’ll just do things the right way, and do a fresh-from-CD install instead. Ah well. The good stuff: the new kernel, or possibly Xorg, is proving to be a lot speedier — window updates are noticeably smoother; and the new Ubuntu GNOME theme is similarly tasty.

Tags: , , , , , , , ,

Comments (11)

‘Life Hacking’ and Metacity

The NY Times story on “life hacking” is a pretty good one, and an excellent intro for anyone who hasn’t been religiously reading the changing transcripts of Danny O’Brien’s talk and so on.

This line:

Mann has embarked on a 12-step-like triage: he canceled his Netflix account, trimmed his instant-messaging “buddy list” so only close friends can contact him and set his e-mail program to bother him only once an hour.

Reminded me of something I ran into recently.

Last month, I switched from Sawfish, the venerable UNIX window manager, to GNOME’s Metacity, which is the new(ish) GNOME standard window manager. (I was tired of some long-standing Sawfish crashes, and didn’t want to be the last Sawfish user on the planet, which was seeming increasingly likely.)

One interesting UI change is that application windows no longer ‘pop up’ — if an app wants to notify you of some important change, it instead can only cause its taskbar button to subtly pulse in the corner of your screen.

Initially, this threw me for a loop, and I rudely (albeit accidentally) ignored my friends on IM and suchlike. But I quickly got the hang of glancing at the taskbar once in a while when I wasn’t concentrating on a task; it’s now second nature, and has significantly reduced the number of interruptions I find myself experiencing in a typical day.

BTW, in passing: switching WMs is a big deal, user interface-wise. One of the key gating factors, for me, was a feature I use to control windows without laying hands on the dreaded rodent — namely, a ‘move window to screen corner’ keyboard shortcut. This patch implements it for Metacity.

I implemented this last year for KWin, too, to resounding disapproval and bitchy comments about how I’m using the mouse all wrong. Meh. I fully expect the Metacity maintainers to throw it out, likewise, leaving me hand-patching WMs for a while yet ;)

Update, Nov 2006: they applied it! yay.

Tags: , , , , , , , , ,

Comments (5)

Getting JuK to output sound via ALSA

Linux: Linux sound is still a mess. Due to the ever-changing ’sound server of the week’ system used to decide how an app should output sound, it’s perfectly possible to have 3 apps on your desktop happily making noise at the same time, while another app complains about requiring exclusive access to /dev/dsp — or worse, hangs silently while it attempts to grab an exclusive lock on the device.

This page gives a reasonably good guide to getting software mixing working across (virtually) all apps, using ALSA software mixing and esd.

However, some cases are still very kludgy — in particular, JuK, the excellent KDE mp3 jukebox app, has a tendency to play poorly with others, requiring playback via no less than two sound servers — artsd and esd — to work correctly in the above setup. In addition, the support for mp3 files in artsd is buggy — it’s frequently unable to open certain mp3s, depending on how they were encoded.

Well, good news — the current release of JuK now supports direct playback from GStreamer via ALSA. Here’s how. By adding these lines:

[GStreamerPlayer]
SinkName=alsasink

to ~/.kde/share/config/jukrc, you can skip sending JuK mp3 playback via 2 sound servers, and just play directly to the hardware from the mp3 player. An improvement! Not quite optimal, and certainly not user-friendly — but getting there…

Tags: , , , , , , , , ,

Comments

An Open Letter to Sound System Developers

Linux: after about 3 months of tweaking and twisting, performed by someone who’s been using UNIX for over a decade, I’ve finally got sound working the way I want it on my Linux desktop. In other words, I can hear sounds made by Flash applets, and I don’t have to shut down the best music player on the platform every time another app wants to make a sound.

This is pretty clearly absurd.

So here’s my open letter to the developers of the various systems (GStreamer, aRts, ALSA, EsounD polypaudio, et al):

  • Please DO do some testing with crappy sound hardware. I don’t care if your sound system works great with a SoundBlasterLive 2006 with the kryptonite connectors, I have a laptop, for god’s sake. That means software mixing is essential, because cheapo hardware doesn’t do hardware mixing.
  • As an extension: please DO include software mixing by default. ALSA’s pretty good in general, but having to hack out 55 lines of hand-tweaked config file before software mixing works, is insane. (Especially when the Wiki documenting that is full of notes that some of the magic numbers may not work on your hardware.)
  • Please DO use existing APIs if possible. That means esd. I’m looking at you, aRts. At least the latest sound project, polypaudio, looks like it’s getting this right.
  • I DON’T care about network transparency, realtime response, or having a wah-wah pedal effect built into my sound server. That’s just silly. Use a modular architecture to allow that in future, but concentrate on getting the basic stuff working first!
  • Please DON’T hardcode output device or output ’sink’ names into the source. Looking at the kgst component of KDE here.

Meh.

Anyway, here’s the scoop on what I had to do to get software mixing working in both GNOME, KDE, and Firefox, on my Thinkpad T40 running Debian unstable. Once I figured out the magic incantations, it now seems to be working without stutters or hangs.

Sometime in the next few months, of course, I plan to upgrade to Ubuntu Linux, and all bets will once again be off ;)

Tags: , , , , , , , , ,

Comments

kgst output to ALSA/Artsd/ESD instead of just OSS

Linux: Here’s a patch that adds support for ALSA/Artsd/ESD output from kgst, the KDE gstreamer middleware used by JuK.

Background: JuK is a great music player app for KDE. However, it hogs
the sound device while running, which means that nothing else gets access to play sound until the app is shut down. This is suboptimal.

The reason it does this is because it plays sound via this chain of components: juk -> kgst -> gstreamer -> sink. Unfortunately, the
kgst component doesn’t allow control over what output sink to use, instead hard-coding the string 'osssink' — the OSS drivers, for traditional Linux /dev/dsp sound. My laptop doesn’t support mixing in the sound hardware, which means I need to use a software mixer. 'osssink' doesn’t support software mixing, instead giving the caller exclusive access to the sound card, and other apps will just have to wait for it to finish.

(As to why JuK doesn’t just play mp3s by running ‘mpg321 name-of-file.mp3′, and let us specify the ‘-o’ switch to use, I wish I knew. (ObOldbieGripe: component-based architectures are full of this kind of needless over-complexity ;)

Anyway, the patch in the bug above lets the user provide an environment variable for a string for kgst to use instead of 'osssink'.

Tags: , , , , , , , , , ,

Comments

Great SSH tip, and how to fix a KDE glitch

Unix: via Ted Leung, Adam Rosi-Kessel’s Linux Tips page has some very useful tips, and this one’s great — to avoid
getting SSH connection resets, add the following to your .ssh/config:

    serveraliveinterval 300
    serveralivecountmax 10 

This will insure (jm: sic) that ssh will occasional send an ACK type request every 300 seconds so that the connection doesn’t die.

As a similar tip that took a while to track down — KDE users who’ve upgraded between KDE releases, will probably by now have seen lots of messages like this:

  nameofapp (KIconLoader): WARNING: Icon directory /usr/share/icons/hicolor/
  group 48x48/stock/text not valid.

It took a bit of googling about to find the cure:

  • run in a shell (I cannot find this on any menu): kdebugdialog –fullmode
  • select: debug area: 264 kdecore (KIconLoader)
  • Change the Warning Output to ‘None’
  • select: OK

Tags: , , , , , , , , , ,

Comments

Getting into KDE 3.2

Linux: I’m really getting into KDE 3.2. I’ve been looking for a music player that is better at handling large collections of MP3s better than the venerable XMMS, without much luck:

iTunes is, of course, the ‘gold standard’, but is Mac/Windows only, so that’s not going to work on my Linux machine.

Rhythmbox is getting there as an iTunes clone, but right now is woefully incomplete. It fails to play lots of my music, has serious interface shortcomings — you can rate songs, but then there’s no way to use those ratings, and you cannot edit any of the tag metadata in the released version.

JuK is the new KDE music player app. Initially, I wrote it off — it uses the clunky interface of ‘one big list’, at first glance.

But after Rhythmbox managed to confuse itself sufficiently so that it would only open as a 3-pixel-high window (seriously!), I gave JuK another try. Summary: it kicks ass.

It turns out that the multi-pane ‘artists, albums, and tracks’ mode of iTunes and Rhythmbox isn’t actually necessary, since JuK improves on it using a very nifty dynamic ‘Tree View’ mode.

Another nice feature is the MusicBrainz integration; it has built-in support for querying MB’s servers to get correct tag data for your music. In fact, its tagging support is fantastic — this is unsurprising, as it looks like it started off as a tagging app.

Being a well-written KDE app, it exposes some nifty scripting support via DCOP, and a quick look-over with KDCOP reveals a nice set of APIs — for example, running dcop juk Player playingString tells me the name of the track and artist playing right now. I’m not sure if there’s a way to register for callbacks on events like ‘track change’ just yet, here’s hoping…

No sign of rating support just yet, though; my dream player would allow me to rate my tracks, and then make a dynamic playlist which selects tracks by rating, playing the top-rated ones more often and never playing the bottom-rated ones. Here’s hoping it’s in the pipeline ;)

All in all, though, it looks like I’ll be giving JuK a try.

Tags: , , , , , , , , , ,

Comments

Dodgy computer games studies

Science: A lab rat writes up a report on his participation in two psychology studies on ‘Video Game Violence’ and ‘Violence In the Media.’

Sadly, it seems clear that the video-game violence study will return biased results due to flawed test conditions.

Of the three games played, the most violent — a first-person shooter – was modified, either through incompetence or deliberate tweaking, to use frustrating control settings and a high level of difficulty; whereas the least violent — a sim game — was set up with all the defaults and automatic help enabled.

In my experience, frustration, in any task, has a direct correlation with anger levels. So a frustrating game, violent or not, will probably give more aggressive responses in a violence measurement — hence the FPS game above will almost definitely be cited as ‘inciting violent emotions’.

Bad scientists! No doctorate!

PS: hmm, I wonder if the paper will document the exact configuration
of the games?

Linux: Happy birthday, KDE! I love it. Most recent discovery: the excellent support for printing in KDE 3.1 using the kprinter GUI.

Tags: , , , , , , , , , ,

Comments

KDE patch, and my cat

Linux: So, I like being able to move windows around using the keyboard very quickly. In particular, one nifty feature of Sawfish was corner.jl, a Sawfish lisp snippet which ‘provides functions to move a window into a screen corner.’

Some background: my desktop layout is essentially divided into 4 corners (e.g. 4 xterms in a ‘one in each corner’ layout), or 2 sides (e.g. mail reader on the left, web browser on the right), depending on the size of the windows.

Using corner.jl, one could just throw the mouse into any part of a window’s area, hit a key, and the window would move where you wanted it.

I’ve since moved to KDE, and missed that functionality. So a while back, I reimplemented it as a patch to kwin. Here it is, and bug 65338 is the KDE bug entry tracking it as a feature request.

Not much traction in persuading the KDE folks to apply it, but hey, that’s open source for ya. The patch will always be around anyway ;)

Pets: My cat brings me presents.

Specifically, today he brought me a mouse’s liver and left it on the doorstep. At least I think it’s a mouse’s liver; the scale seems right. No sign of the rest of the mouse, though…

This is with no less than 3 bells on his collar; I don’t know how he does it, unless it’s simply that the rodents round here are just not used to the concept of predation.

BTW, the mouse’s liver wound up flushed down the toilet.

Tags: , , , , , , , , , ,

Comments

(Untitled)

I’ve just turned on sub-pixel rendered anti-aliasing on my desktop, using gdkxft and KDE 2.2.1. It’s amazing the difference it makes. Previously, anti-aliasing was pretty similar to just taking my glasses off; but with a TFT laptop screen, you can enable the ClearType-style sub-pixel rendering, and it becomes very smooth.

Dunno if rxvt has it yet, though, so I’m still using blocky ol’ text in my terminal windows.

Tags: , , , , , , , , ,

Comments