This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.
From: Joe Brenner <doom@kzsu.stanford.edu> Subject: babbling about my lynx set-up Date: Sep 14, 2000 And as long as I'm on the subject of lynx: I use a shell wrapper script to run lynx that I call "xlynx": #!/bin/sh nxterm -fn "9x15" -bg black -fg violet -g 80x45+100+0 -T $1 -e lynx -nocolor $1 This way, I can do things in an emacs sub-shell like this: xlynx http://faernynsgrove.com/corsets.htm & And it will open a new terminal window running lynx, with the URL in the title bar. The rest of the options here just let me completely take control of the color scheme, and throw away the syntax coloring that's enabled by default. Unfortunately, the "-nocolor" flag is the only method I've found thus far that lets me do this, and it has the draw back that italic text is displayed as underlined (very bad for large blocks of italics). (This xlynx script also makes it easy to use emacs macros that spin off an xlynx window that displays the html file on the current line of a dired window, or that displays the latest location in my lynx bookmarks file, etc.) I've also got some bash aliases like alias slash="xlynx http://slashdot.org" === From: Joe Brenner <doom@kzsu.stanford.edu> Subject: babbling about my lynx set-up Date: Sep 14, 2002 I've gotten passed the "-nocolor" problem mentioned above... Here's the current state of my "xlynx" kludge -- I mean, script: #!/usr/bin/perl -w # /home/doom/bin/xlynx.pl # Fri Oct 19 13:43:55 2001 # Opens a terminal window and runs lynx on it, using # the URL passed in as a command line argument (if # any). # Advantage over xlynx.sh: does not crash on no-arguments. # Bonus: shows my "home" screen by default. # And now, optional -w to set width of display. use strict; use Getopt::Std; use vars qw/ $opt_w/; getopts("w:"); use constant DEBUG => 0; use constant VERBOSE => 1; my ($home, $cookie_file, $lynx, $url, $cmd, $ret); $home = 'file:/home/httpd/docs/index.html'; $cookie_file = '/home/doom/.lynx_cookies'; # Why did I stick the path in here? $lynx = "/usr/local/bin/lynx -cookie_file=$cookie_file -cookie_save_file=$cookie_file"; # Adding cookie parameters in hopes of working around some odd buggy behavior # (these aren't supposed to be necessary). if ( defined($ARGV[0]) ) { $url = $ARGV[0]; } else { $url = $home; }; my $width; unless ($width = $opt_w) { $width = 80 }; (DEBUG) && print STDERR "width: $width\n"; # Switching to xiterm now, because nxterm is NG with lynx 2.8.4 it seems # (note the +sb, needed to zap an annoying gray scroll bar on the left): $cmd = "xiterm +sb -fn 10x20 -bg black -fg violet -g " . $width . "x50+100+0 -T \'$url\' -e $lynx \'$url\'"; ((VERBOSE)|(DEBUG)) && print STDERR "cmd: $cmd\n"; exec "$cmd"; __END__ #SNIPPETS # Old style of command string: # $cmd = "nxterm -fn 10x20 -bg black -fg violet -g 80x50+100+0 -T \'$url\' -e $lynx \'$url\'"; Note that somewhere along the way I also begain using the color setting features in this file: ~/lynx.cfg # Note: using 'default' here allows foreground and # background to be taken from the command line. # Increases range of allowed colors. See ~/bin/xlynx COLOR:0:default:default COLOR:1:default:black COLOR:5:green:black COLOR:2:red:black COLOR:3:lightgray:black COLOR:4:brightmagenta:black COLOR:6:brightgreen:black COLOR:7:magenta:black # An earlier try #COLOR:0:brightmagenta:black #COLOR:1:brightgreen:black #COLOR:5:brightgreen:black #COLOR:2:red:black #COLOR:3:green:black #COLOR:4:green:black #COLOR:6:lightgray:black #COLOR:7:magenta:black Oh, and if you've read this far... Here's the listing of bash aliases I use to play with this stuff: alias menu="alias | egrep xlynx | grep -v menu | perl -pe 's/^alias //'" # alias alta="xlynx http://www.altavista.com/cgi-bin/query?pg=aq&what=web&text=yes" alias alta="xlynx http://www.altavista.com/sites/search/sites/search/textadv" alias goog="xlynx http://www.google.com/" alias slash="cd /home/doom/Stuff/Slash;xlynx http://slashdot.org/" alias slashme="cd /home/doom/Stuff/Slashcandy;xlynx http://slashdot.org/users.pl" alias kuro="xlynx http://kuro5hin.org/" alias crat="xlynx http://technocrat.net/" alias advo="xlynx http://www.advogato.org/" alias fresh="xlynx http://freshmeat.net/" alias news="xlynx http://www.abc.net.au/ra/newsdaily/" alias yahoo="xlynx http://news.yahoo.com/" alias reuters="xlynx http://dailynews.yahoo.com/h/ts/nm/?u" alias econ="xlynx http://www.economist.com/" alias gate="xlynx http://www.sfgate.com" alias indymed="xlynx http://www.indymedia.org" alias mojo="xlynx http://www.motherjones.com" alias nyt="xlynx http://www.nytimes.com" alias reason="xlynx http://www.reason.com/" alias sal="xlynx http://www.salonmagazine.com" alias scinews="xlynx http://www.sciencenews.org/" alias sciam="xlynx http://www.sciam.com/" alias mit="xlynx http://www.techreview.com/" alias newsci="xlynx http://www.newscientist.com/" alias apacheweek="xlynx http://www.apacheweek.com/" alias take23="xlynx http://modperl.sergeant.org/" alias useit="xlynx http://www.useit.com" alias apachedoc="xlynx /home/httpd/html/manual/index.html" alias modperldoc="xlynx /home/httpd/html/manual/mod_perl_guide/index.html" alias oracledoc="xlynx http://technet.oracle.com/docs/products/oracle8i/doc_index.htm" alias bookworms="xlynx http://www.students.yorku.ca/~yu248922/agbooklist.html" ===