29 July 2012

Simple Search Plugin for Firefox

This tutorial will show you a very simple Firefox hack that allows you to search any blog straight from the Firefox search bar without having to visit the actual blog.

1. go to http://www.scriptsocket.com/cgi-bin/firefoxplugins/generate.cgi
2. updated fields with values given in the pic below
3. generate an install search plugin

plugin will get installed in
%APPDATA%\Mozilla\Firefox\Profiles\xxxxxxxx.default\searchplugins
where xxxx is a random string

sample search plugin can be found here humbles-blog.xml
Install 'Humble's Blog' Firefox Search Plugin



Reference:
http://labnol.blogspot.in/2006/09/learn-to-create-firefox-search-plugin.html
http://fahdshariff.blogspot.in/2008/07/write-search-plugin-for-firefox-howto.html
https://developer.mozilla.org/en/Creating_OpenSearch_plugins_for_Firefox
http://ss64.com/nt/syntax-variables.html
http://www.scriptsocket.com/cgi-bin/firefoxplugins/generate.cgi
https://developer.mozilla.org/en/Adding_search_engines_from_web_pages

09 July 2012

Redirecting console output to a pseudotty

Using the TIOCCONS ioctl one can redirect console output to a pseudotty.
This is what xterm -C and xconsole do.

get latest pseudocons.c
# gcc -Wall -o pseudocons pseudocons.c -lutil
# ./pseudocons
[pseudocons]got master
[pseudocons]got slave console
[cons]Hoera..
[cons][pseudocons]Got Ctrl+C; Exiting...

execute the below command from another window to get the above output
# echo Hoera.. > /dev/console

Reference:
http://www.win.tue.nl/~aeb/linux/lk/lk-2.html