site  contact  subhomenews

430: 'man' fixed

October 09, 2009 — BarryK
Thanks to technosaurus for this clever fix:

I bashed together a fix for the broken man pages that restores 99% functionality
Code:

#! /bin/bash
defaulthtmlviewer "http://www.google.com/search?&q=man+"$1"+site:linux.die.net&btnI=Search"


I have put this into /usr/bin/man, specifically this at line 62:

exec defaulthtmlviewer "http://www.google.com/search?&q=man+\"${1}\"+site:linux.die.net&btnI=Search"

So, you can do something like:

# man e2image

...and yippee, it works!

We also need the same fix for /usr/share/doc/index.html, the main Help page. It has a Javascript function:

function search_site()

{
var url = "http://linux.die.net/man/1/"
// Append the text box input to the search url for the selected site
url = url + document.search_form.u_search.value;
// Change the the browser location to the new url
window.location.href = url;
}


...anyone know Javascript, can figure out how to put technosaurus's fix into that function?

Comments

fix to index
Username: technosaurus
Maybe this? <form action="http://www.google.com/search" name=f> <input name=hl type=hidden value=en> <input name=source type=hidden value=hp> <input name=q class=lst type=hidden title="Google Search" value="man site:linux.die.net"> <input autocomplete="off" maxlength=2048 name=q size=55 class=lst title="Google Search" value=""> <input name=btnI type=submit value="Man Page" class=lsb> </form>

better fix
Username: technosaurus
"delete the javascript and replace the form with this <form action="http://www.google.com/search" name=f> <input name=q class=lst type=hidden value="man"> <input autocomplete="off" maxlength=2048 name=q size=55 class=lst title="Man Page Search" value=""> <input name=q class=lst type=hidden value="site:linux.die.net"> <input name=btnI type=submit value="Man Page" class=lsb> </form>

man page
Username: BarryK
"technosaurus, brilliant!


Tags: woof