This just... rickrolls!

Also checkout this one-liner using SystemTap.

I didn't compile the original, so I re-compiled my kernel to add required flags, just get my computer rickrolling! I did slight modification:

sudo stap -g -e 'probe kernel.function("do_filp_open") { p = kernel_string($pathname); l = strlen(p); ext = substr(p, l - 4, l) ; if ( ext == ".mp3" || ext == ".ogg" || ext == ".mp4" ) { $pathname = %{ (long)"/tmp/RickRoll.flv" %}; } }'

sudo stap    -e 'probe kernel.function("do_filp_open") { p = kernel_string($pathname); l = strlen(p); ext = substr(p, l - 4, l) ; if ( ext == ".mp3" || ext == ".ogg" || ext == ".mp4" ) { system("mplayer -fs /tmp/RickRoll.flv") ; } }'

To tell the truth, I don't know where to get the MP3, so I use YouTube video and it gets even better. Video player sure has no problems, MPD has no problem as well.

If you have an empty audio file for the media player and supply -loop 0 to mplayer... full screen + looping, FTW!

I didn't try these: Hijacking normal files like txt when editor opening (Don't really know SystemTap, but I think execname() is right way to check, right?) and replace with lyrics. Images, mehhay! I think this would replace all images you view on web when browser loads from cache.

All my playlists are rickroll'd.

Never gonna say good bye, well sang.