Dec 12 2002


                    LINUX NEWS
            http://www.Cramsession.com
          December 12, 2002 - Issue #111


TABLE OF CONTENTS

1) Sean’s Notes

2) Linux News

More On Largo
Moore's Law Coming to an End?
Last Chance to Appease Your Geek
Where Did SAIR Go?

3) Linux Resources

Capturing Screens
Interview With Source Forge Creator
NVIDIA Linux Forums
Move Over, Citrix
PostgreSQL - A Better Way To Manage Data

4) App o’ the Week

~~~~~~~~~~~~~~~~~~~~~~~~ ADVERTISEMENT ~~~~~~~~~~~~~~~~~~~~~~~~~

Better Practice Tests at a Better Price! PrepLogic is raising the bar. You deserve the highest quality practice tests but you shouldn’t have to pay the highest price. Our practice tests are written by experienced Certified IT Professionals and designed to help you pass the first time. PrepLogic gives you superb, affordable quality. Still not convinced? Download a FREE demo or buy it and try it!

http://ad.brainbuzz.com/?RC153&AIX56

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For information on how to advertise in this newsletter please contact mailto:adsales@CramSession.com or visit http://cramsession.com/marketing/default.asp


1) Sean’s Notes

If you’re like me, you spend a lot of your time in the shell. Given that, there is no reason we shouldn’t make it a comfortable place. Login scripts let you run commands on every login, be they changing your path, setting a printer, or running various tasks. The unfortunate part is that since there are many shells available, each has its own files that it touches, so customizing one shell may be different from another.

In case you weren’t aware, there are two main families of shells. One is the C shell, which includes csh and tcsh. The other is the Bourne shell, which includes the original sh, and the GNU bash (Bourne Again SHell). Then, there are derivatives such as the Korn shell (ksh), which borrows heavily from the Bourne family, and zsh, which is somewhere between the two. My preference is bash, since that’s what root’s shell should be, though tcsh doesn’t bother me at all. Since I do all my shell programming in bash, I find it works well.

Regardless of your shell, they each go through a series of files, executing their contents, which set up the shell. Some are stored in /etc, meaning they are global; others are written by the user, allowing them to override or augment root’s wishes. This is further complicated by some shells being considered “login shells”, and others “non-login shells”. Basically, if you came in through telnet, ssh, or logged in through the console, it’s a login shell. If you came in through X, or are running as part of a cron job, it’s a non-login shell. There are, of course, options that override this, and exceptions, so we’ll try to go with safe assumptions here.

For bash users, the global file is /etc/profile. The best file to override this stuff is ~/.bashrc. For csh, the global file is /etc/csh.cshrc and ~/.cshrc for your personal additions. Read the man page for your shell to get the gory details. I’ve got to be honest and say that even after years of using them, I still have to refer to the man page to find out what supersedes what, and when a certain file gets run. (Some shells will look for a set of, say, three files, and execute any that exist. Others will execute the first one they see, and skip over the rest.)

But what useful stuff can be done? The first thing that comes to mind is setting the prompt. In Bourne derivatives, the PS1 environment variable is where it’s at. For csh, the much simpler “prompt” is what you’re looking for:

export PS1=”Your wish, master> ” # bash set prompt=”Your wish, master> ” # csh

Your prompt can do more than cater to your ego, though. By embedding special sequences, you can have the date and time, your user/host, or current directory in your prompt. Bash users, check the bash man page under the PROMPTING section. csh, it’s in the tcsh man page under “Special Shell Variables”, within the “prompt” heading. I like the default “[\u@\h \W]\$”, which gives something like:

[sean@bob tmp]

This lets me know who I’m logged in as, what host (always double check before you do anything like a shutdown!), and where I am.

Another task is to set your path. This is one where you want to augment your system-wide settings, not override them!

I often create a subdirectory underneath my home directory called “bin”, where I store various shell scripts. As such, I’d like $HOME/bin to be in my path.

export PATH=$PATH:$HOME/bin # bash set path=($path $HOME/bin) # csh

As you can see, we’re setting variables the same way as before, except that reference is made to the old value. Thus, the commands above append to the path, rather than replacing them.

Another helpful thing to put in your login script is aliases. Aliases let you shorten a command, or to force the command to always be run with certain arguments. Some shells support them, some don’t. You can get a list of what’s aliased by typing “alias”. You’ll see how you get color directory listings, because “ls” is aliased to “ls –color=tty”, meaning that the parameter to turn on color is always given behind the scenes.

I find that I run “ps -x” often to see all my own processes. Therefore, I can run the following alias to make “px” run “ps -x”:

alias px=”ps -x” # bash alias ps ps -x # csh

Throwing any of these commands in the appropriate file ensures that the functionality is available every time you log in. The kind systems administrator makes use of the global files to add functionality to his user’s environments, such as the proper path, or some helpful aliases/options. Remember that the user has (and should have) ultimate control over their environment, so trying to implement login controls and other security measures is difficult or impossible.

Long live the Penguin,

Sean swalberg@cramsession.com


2) Linux News


More On Largo

Largo, Florida has been saving buckets of cash by moving to a thin client model using Linux and KDE. This latest look at Largo shows some new developments, including how they come across their thin client devices. It’s no shock that eBay is a big source, but the price they paid blew me away.

http://newsforge.com/newsforge/02/12/04/2346215.shtml?tid


Moore’s Law Coming to an End?

Moore’s law states that the number of transistors on a chip will double approximately every 18 months, and it’s held true since the late 1960’s. Intel’s chairman paints a bleak outlook, saying that due to power leakage, the law may be hitting some limitations.

http://www.theinquirer.net/?articlef77


Last Chance to Appease Your Geek

If you’re looking for that perfect gift for your Linux geek, ThinkGeek has lots of cool gizmos and clothing. Here’s their ordering deadlines, in case you want to have it shipped before the 25th. (You’d think with a ringing endorsement like that, I’d get free stuff, but noooooooo…)

http://www.thinkgeek.com/help/#holiday


Where Did SAIR Go?

Remember the SAIR certification program? What ever happened to it? Newsforge made a few inquiries, and it turns out the body is still twitching, but there’s an odd smell…

http://newsforge.com/newsforge/02/12/07/1834215.shtml?tidF


3) Linux Resources


Capturing Screens

While I can think of a couple of easier ways to get an X-Window screen capture, this technique shows off some of the lesser known utilities in the Unix world that may come in handy at times.

http://www.tomomi256.freeserve.co.uk/linux/l_capture.html


Interview With Source Forge Creator

Tim Perdue was one of the driving forces behind Source Forge, a site for the hosting of Open Source projects, and PHP Builder, a site for PHP developers. This interview talks about what happened behind the scenes on the project, and what’s coming up now that the original product was battered by VA Software, and resurfaced as Open Source, again.

http://osdir.com/modules.php?op=modload&name=News&file=article&sid 2


NVIDIA Linux Forums

I’ve been very happy with my NVIDIA graphics card, especially since the company has developed accelerated Linux drivers. This link is to their Linux forum, where you can get information about the recent updates to the Linux code, and get a hand with any problems you might have with your card and Linux.

http://www.nvnews.net/vbulletin/forumdisplay.php?s=&forumid


Move Over, Citrix

“CrossOver Server Edition is designed to help the corporate marketplace bridge to Linux,” said Jeremy White, CEO of CodeWeavers. “With Server Edition we offer corporate workgroups the ability to control costs by consolidating on a lower-cost desktop, while still running the applications their users have grown accustomed to. But whereas Citrix and Microsoft Terminal Server licenses typically cost hundreds of dollars per user, we can provide outstanding productivity for much less. The result is cost savings with real convenience.”

http://www.codeweavers.com/about/press_releases/?id 021210


PostgreSQL, A Better Way To Manage Data

I’m starting to get a large collection of PostgreSQL books! It’s a database with features approaching the level of Oracle, but with the freedom of Open Source (because it is!). Here, I review Premier Press’ “PostgreSQL: A Better Way To Manage Data”

http://infocenter.cramsession.com/techlibrary/GetHtml.asp?ID17&Get Des=&CatID’0


4) App o’ the Week

Ever since the days of DOS, I’ve had an interest in the inner workings of operating systems. As I got into Linux, the multitasking components such as the scheduler were particularly fascinating. Here is a set of utilities that let you peek and poke at the various settings associated with processes and priority. Some of the utilities require a 2.5 kernel.

http://tech9.net/rml/schedutils/


(C) 2002 BrainBuzz.com, Inc. All Rights Reserved.


      This message is from CramSession

You are currently subscribed to the following list Hottest Linux News and Resources as: sean@ertw.com

To un-subscribe from this newsletter by e-mail, send a blank email message to: mailto:leave-linuxnews-3825955Y@list.cramsession.com

To subscribe to this newsletter and many others visit our site at: http://newsletters.cramsession.com/signup/default.asp