Linux Tips #15



---------------------------------------------------------------

If you like Tip of the Day please share it with friends and 
co-workers, and encourage them to sign up! It's free. You can
unsubscribe or change your e-mail address at any time.

To subscribe to or unsubscribe from this newsletter:
* Use your browser to visit our Newsletter Subscription Center:
  http://www.winmag.com/subscribe/
* Scroll down to the Tip of the Day section.
* Click "Choose an option," and select Subscribe or Unsubscribe.
* Scroll to the top of the page, and type your e-mail address 
  in the "E-mail" field.
* Click the Submit button below your e-mail address.

Copyright 2000 CMP Media Inc. A service of Winmag.com.
http://www.winmag.com/

Distributed by MessageMedia Inc. - http://www.messagemedia.com

---------------------------------------------------------------


*1. THE MIDGARD PROJECT                 
        
The Midgard Project is responsible for the development of an open
 source application--the Midgard Application Server. The product
 consists of Midgard core libraries, a PHP-based Web Application
 Server for Apache platform, and Web-based administration tools.
 For further information and software download, visit the
 Midgard Web site at 

http://www.midgard-project.org/


*2. THE COMMON UNIX PRINTING SYSTEM                 
        
The Common UNIX Printing System (CUPS) provides a portable
 printing layer for various UNIX operating systems and Linux
 distributions. CUPS supports both the System V and Berkeley
 command-line interfaces. CUPS also includes a customized version
 of GNU GhostScript and an image file RIP that can be used to
 support non-PostScript printers. CUPS can be downloaded from 

http://www.cups.org


*3. WINMODEM ON LINUX?                 
        
Although many Linux users balk at the idea of using Winmodem, it
 still has many useful applications on Linux: it can serve as an
 answering machine, pager interface, phone emulation, etc. The
 following Web site is dedicated to Winmodems on Linux. You can
 download related software, view a list of Winmodem chipsets,
 and find related links: 

http://linmodems.org/


*4. RESUMPTIVE AND NONRESUMPTIVE EXCEPTION HANDLING                 
        
In a resumptive exception handling model, after an exception has
 been handled, the program continues execution at the point where
 the exception was thrown. This is how Structured Exception
 Handling (SEH) works in C (note that SEH is a no-standard
 extension to ANSI C). On the other hand, the C++ standard
 exception handling model is nonresumptive. This means that
 program execution resumes at the next statement following the
 catch-block. The C++ program does not return to the point where
 the exception was thrown after that exception has been handled.
 This is a source of confusion among C++ novices, who mistakenly
 assume that the program automatically returns to the point from
 which an exception was thrown, but it doesn't.


*5. THE PHP SCRIPTING LANGUAGE                 
        
PHP is an open source server-side, cross-platform, HTML-embedded
 scripting language. It enables you to create dynamic Web pages
 that are treated just like regular HTML pages. PHP's syntax is
 reminiscent of C. However, it is much simpler than C and it is
 free from the hassles of memory management and pointers. For
 more information, visit the PHP Web site at 

http://www.php.net/


*6. Linux window manager

Tyler from Athens, GA wanted to know how shareware programs know
 when to time out and how to get around it. Every author does it
 differently, usually by hiding a counter somewhere on the hard
 drive. I've never been able to find these counters. Uninstalling
 or resetting the date usually doesn't work either. We don't
 advocate defeating these protections anyway, since shareware
 authors deserve to get paid for their work. On the other hand,
 if you want to pay for the software but can't get it running to
 register it, email the author. He or she is certain to
 want to help!

Taylor from Cookville, TN wants to know how to switch from FVWM
 to Gnome in Linux. Actually, Gnome isn't a window manager like
 FVWM, it's a set of utilities that work with any window manager,
 but are most often paired with E, the Enlightenment desktop. So
 we'll show you three ways to switch to E.

The easiest is to simply run Enlightenment from your current
 window manager (type enlightenment in a terminal window). E will
 modify the appropriate startup files so that it's the default
 window manager. Ta da!

If you have the Gnome tools installed, you can also change the
 default window manager by using the Gnome Window Manager Capplet.

The generalized way to get any window manager to be the default
 upon X startup is to edit the .xsession or .Xclients file in
 your home directory (you can do it system wide by changing files
 in the /etc/X11/xinit directory, but we don't recommend it). Use
 .Xclients if you use the startx command to enter X. Use
 .xsession if you automatically boot right into X window when you
 start up. Comment out the line(s) that refers to other window
 managers by putting a # character at the beginnign of the line
 and add a line that says, simply

enlightenment

That should do it.


*7. THE VIM EDITOR                 
        
VIM is an open source and enhanced version of vi, one of the
 standard text editors on UNIX. VIM features include unlimited
 undo, syntax coloring, split windows, visual selection, GUI
 support, and more. Besides Linux and Unix, VIM runs on many
 other operating systems, including BeOS, DOS, MacOS, OS/2,
 RiscOS, VMS, and Windows32. You can obtain further information
 about the VIM editor and download it from 

http://www.vim.org/


*8. THE WINE COMPATIBILITY LAYER                 
        
Wine is a Windows compatibility layer that facilitates porting of
 Windows sources to Unix and Linux. Wine also includes a program
 loader that enables unmodified Windows 3.1/95/NT binaries to
 execute under Intel Unix and Linux systems. Wine does not
 require Microsoft Windows, since it consists of 100 percent free
 code. It supports many Windows features, including multimedia
 and OLE DLLs reorganization, Clipboard, and support for Win16
 and Win32 function calls. You can find more information about
 Wine and download it from 

http://www.winehq.com


*9. PROJECT LINUX                 
        
Project Linux is aimed at Linux users and the Open Source
 community in general. Starting November 8, the organization will
 present the following two Web sites: Get Linux and Open Talk.
 Get Linux provides information for people new to Linux. It will
 include a list of available distributions, reviews, and
 articles. The Open Talk section will host forums of discussion
 about all things relating to open source technologies. You can
 find the Project Linux Web site at 

http://www.projectlinux.org


*10. REENTRANT AND NONREENTRANT SIGNALS                 
        
What happens when a signal is sent to a process that is already
 handling that signal? In theory, the kernel can interrupt the
 process and invoke the signal handler again. This approach
 requires that the signal handler can function properly if it is
 invoked while it is already executing. Such a handler is said to
 be reentrant. Writing reliable and efficient reentrant handlers
 is not a trivial task. Imagine what would happen if the signal
 handler locks a file, and at that point, the kernel interrupts
 it and invokes that handler once more. The second invocation
 will result in a deadlock because the handler infinitely waits
 for the lock to be released. The lock, however, cannot be
 released because the first handler call was suspended. 

In Linux, this situation doesn't occur, because the kernel
 withholds the signal until the process to which it is sent has
 finished handling the previous signal (the second signal is said
 to be pending). Only then is the pending signal sent to that
 process. This approach was chosen to avoid the complexities of
 reentrant signal handlers.
