# Gnu/Linux Miscellaneous Here are some rarely used tasks that I do not want to forget. See more sections on Gnu/Linux . ** Firefox Extensions ** Firefox is now my preferred browser. Google for "Firefox extensions" and look for handy items. Extensions I always use are -- o Adblock: block ads by URL with wildcards. Get a listing of all blockable elements and edit. o Nuke Anything: delete any visible element of a page o GoogleBar: All sorts of google searches on a separate menu bar. o WebDeveloper: Examine exactly how a webpage is put together and change it. o Gmail Notifier: Click on the M at the right-bottom to set preferences for automatic login. Or just click on the M to log in manually. o SessionSaver: Browser reopens exactly the way you left it, even after a crash. o Go To: right click on a link and see alternate versions of the same link. o Stumble Upon: random cool links for your area of interest, recommended by others like yourself. _ Less essential: __ o TargetAlert: put icons after links to special file types. o Dictionary search: highlight a word, then right click to access dictionary search. o Linky: Specify where links open, after highlighting. o Tabbrowser Preferences: Get many more options for tabs, such as switching when the mouse is over a tab. o Digger: right click on Go button to see alternate versions of the current URL. o Go To: right click -> Go To submenu, to see alternate versions of the current URL. o Open Long URL: Adds option to File menu to paste mult-line URLs. o Sage: RSS news feeds. Enable View -> Sidebar -> Sage. When you go to a news page or blog, hit the magnifying glass for "discover feeds." Select shortcuts for the sidebar. Click one to see the latest stories. Hit alt-s to make the sidebar appear and disappear. _ Here's how I install the java plugin => cd $HOME/.mozilla/plugins ln -s $JAVA_HOME/jre/plugin/i386/ns7/libjavaplugin_oji.so . <= ** fvwm2: a parsimonious window manager ** The best way to save memory is to use a frugal window manager and desktop environment, rather than Gnome or KDE. I found that fvwm2 uses less than 20% of the memory of either Gnome or KDE. But if you haven't anything better to do with your memory, then waste it on a pretty desktop. fvmw2 is much more easily customized from config files rather than the mouse. In fact, you cannot really configure fvmw2 with the mouse. Once you have the config files, you can copy them onto any new installation and immediately have the environment you want. KDE and Gnome on the other hand force you to remember and repeat GUI manipulation. Since fvwm2 is just a window manager like Enlightenment or Sawmill, you can also run Gnome or KDE on top of it. But they don't look very good together in the default configuration. Gnome and KDE are just a set of standard desktop utilities. The other window managers do not allow the same degree of customization. fvwm2 is so configurable that you can easily lay out your own desktop and toolbars with standard utilities. The extended desktop is arbitrarily large, and dragging across virtual windows works better than KDE or Gnome. To switch from an existing Gnome or KDE installation, simply put a ``.Xclients'' file in your home directory, with something like the following: => xterm -iconic +cn -aw -sb -si -rw -sk -ls -b 4 -vb -sl 800 -fg white -bg black & xterm -iconic +cn -aw -sb -si -rw -sk -ls -b 4 -vb -sl 800 -fg white -bg black & fvwm2 & xterm -title login -iconic <= Note that all processes but the last login xterm are in the background. Stop your X desktop, and restart with ``startx''. You should pop straight into the new desktop. Stop the window manager by typing ``exit'' into the login xterm. Copy ``/etc/X11/fvwm2/system.fvwm2rc'' to ``~/.fvwm2rc'' in your home directory and edit to change your default configuration. "Linux in a Nutshell" has a good short introduction. ** ``ls'' ** Here's my favorite alias for ``ls'' => $ alias ls='ls -AxFqsh --color' <= You can set default colors with the variable ``LS_COLORS'' by putting the command ``eval `dircolors`'' in a login file. To see more about defaults type ``dircolors --print-database''. I don't like dark blue for directories, so I set them to cyan with => $ export LS_COLORS="no=00:fi=00:di=01;36:ln=01;34:pi=40;33:so=01;35:\ bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:\ *.tar=01;31:*.tgz=01;31:*.jar=01;31:*.zip=01;31:\ *.z=01;31:*.Z=01;31:*.gz=01;31:" <= Attribute codes are ``00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed'', text color codes are ``30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white'', and background color codes are ``40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white''. Here are the some useful types: => no: normal, global default, although everything should be something. fi: normal file di: directory ln: symbolic link pi: FIFO, pipe so: socket bd: block device driver cd: character device driver or: orphan, symlink to nonexistent file ex: files with execute permission <= ** Play or save a Real audio stream ** First download the *ram file: => wget http://www.foobar.com/episode.ram <= Look inside to get the rtsp url. => $ cat hitchhikers_episode1.ram rtsp://rmv8.foobar.com/episode.rm <= Play the stream directly with => mplayer rtsp://rmv8.foobar.com/episode.rm <= Or download it first, and play later => mplayer -dumpstream rtsp://rmv8.foobar.com/episode.rm mplayer stream.dump <= ** Running on a network without NIS/DHCP ** Here is a deprecated way to attach to an office network without using NIS or DHCP. All steps are performed as root. -- o Add the host with your home directory to ``/etc/hosts'' in case the DNS server fails to respond. o Edit ``/etc/fstab'' to mount NFS directories. For example: => na:/home/harlan /lair/harlan nfs defaults spitfire:/export/d04/SunOS /pub/dev nfs defaults spitfire:/export/d13 /network/spitfire/export/d13 nfs defaults <= Create the directories and mount with ``mkdir -p /pub/dev ; mount /pub/dev''. o Add your group name and group ID to ``/etc/group'' with a line like ``develop:x:202:harlan''. o Change the group and user ID of an existing user, or create a new user. To discover your group and user ID's, type ``id -a''. Edit ``/etc/passwd'' to change the group and user ID of an existing user. For example: => harlan:x:225:202:harlan:/lair/harlan:/bin/bash <= (User ID is first.) Alternately, add a new user with the following command: => $ user=harlan $ useradd -u 225 -g 202 -G develop -d /lair/$user -s /bin/bash \ -c "$user" -p yeq89W.HCdjmY $user <= (The ``-G'' flag can specify other groups, separated by commas.) The encrypted password can be generated by the following perl command: => perl -e 'print crypt("your_password_here","xx"),"\n";' <= Replace the salt ``"xx"'' by two other characters of mixed case. _ Bill Harlan, 2002-2006