430: 'man' fixed

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?


Posted on 9 Oct 2009, 9:13


Comments:

Posted on 9 Oct 2009, 12:02 by technosaurus
fix to index
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>


Posted on 9 Oct 2009, 12:39 by technosaurus
better fix
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>


Posted on 9 Oct 2009, 14:17 by BarryK
man page
technosaurus,
brilliant!



Posted on 9 Oct 2009, 19:29 by pstef
man in defaultbrowser
And what if I have problems with starting X, and I need to read some man page without it?