Slashdot Mirror


User: johngotti

johngotti's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. the article on Top Ten Mac OS X Tips for Unix Geeks · · Score: -1, Redundant

    Mac OS X for Unix Geeks
    Top Ten Mac OS X Tips for Unix Geeks
    by Brian Jepson, coauthor of Mac OS X for Unix Geeks
    10/22/2002

    I recently got a copy of my new book, Mac OS X for Unix Geeks, and as I anxiously await its arrival in bookstores, I have a little time to reflect. So, I'm offering the top ten tips that I gathered while working on the book. These tips will show you the differences between Mac OS X and other flavors of Unix; help you find the bits that resemble the Unix you are used to; and even feather your nest with XFree86 and ports of popular open source applications.
    1. Where's My Shell?

    A Unix Geek won't get too far without a shell, right? You can find the Terminal application by navigating to /Applications/Utilities in the Finder. Drag the Terminal application to your dock so you can access it quickly.

    Advertisement
    When you start up the Terminal, you'll be greeted with the default user shell, tcsh. You can customize the Terminal's appearance and settings by selecting Window Settings from the Terminal menu. You can set the startup shell by selecting Preferences from the Terminal menu.
    2. Sudo, Not Su

    By default, the root user is disabled on Mac OS X. If you need to do something as root, use the sudo command. To use this command, pass in the command and arguments you want to execute, as in: sudo vi /etc/hostconfig. You'll need to be a user with Administrative privileges. The main user has this capability by default.

    If you need a root shell, you can always use sudo tcsh or sudo bash. If you want to enable the root user, it's as simple as giving root a password with sudo passwd root. You'll also want to open System Preferences, choose Accounts, then Login Options and change Display Login Windows as: to Name and password. Then you can log out and log in as the root user.
    3. Startup

    Mac OS X startup is nothing like other Unix systems. Most significantly, Mac OS X has nothing like the /etc/init.d directory. Instead, it finds its startup items in either /System/Library/StartupItems (for system startup items) or /Library/StartupItems (for locally-installed startup items).

    To get compilers and many other development tools, you'll need the Mac OS X Developer tools. If you bought the boxed version of Mac OS X 10.2 (Jaguar), the Developer Tools should be included on a separate CD-ROM. If you bought a new Macintosh that came with Mac OS X preinstalled, the Developer Tools installer will probably be in /Applications/Installers. Failing either of those, or if you'd like to get the latest version of the tools, they are available to Apple Developer Connection (ADC) members.

    You can use existing startup items as a template, or check out Mac OS X for Unix Geeks for detailed instructions. At a minimum, you need to:

    1.

    Create a subdirectory under /Library/StartupItems. For example, if you are setting up a startup item for MySQL, you might create the directory /Library/StartupItems/MySQL.
    2.

    Put a startup file in that subdirectory. It should have the same name as its parent folder, as in /Library/StartupItems/MySQL/MySQL. For an example, you can look at Mac OS X's startup item for Apache, /System/Library/StartupItems/Apache/Apache.
    3.

    At a minimum, add a StartupParameters.plist file to that subdirectory. Again, see an existing startup item for a template.
    4.

    If you used a control variable to determine whether your daemon starts at boot (Apache uses WEBSERVER), set that variable to -YES- or -NO- in /etc/hostconfig.

    After you've done these steps, you can start the service with SystemStarter, as in sudo SystemStarter start MySQL.
    4. Filesystem Layout

    If you open up a Finder window to the top-level of your hard drive, you'll see that familiar friends like /var and /usr are missing. They are actually hidden (more on that later). If you open up a Terminal shell and do an ls /, you'll see the missing folders, as well as a few others, such as /Library and /Developer.

    The following table lists some of these folders that you'll see (Appendix A of Mac OS X for Unix Geeks contains a more comprehensive list):

    File or Directory

    Description .DS_Store

    This file contains Finder settings. .vol/

    This directory contains files that have been dragged to the Trash.

    This directory contains files that have been dragged to the Trash.

    This directory maps HFS+ file IDs to files.

    Applications/

    This directory holds all your Mac OS X applications. Check out its Utilities/ subdirectory for lots of fun stuff!

    Desktop DB, Desktop DF

    The Classic Mac OS desktop database.

    Desktop Folder/

    The Mac OS 9 desktop folder.

    Developer/

    Apple's Developer Tools and documentation. Only available if you have installed the Developer Tools.

    Library/

    Support files for locally installed applications, among other things.

    Network/

    Network-mounted Application, Library, and Users directories, as well as a Servers directory.

    Shared Items/

    Use by Mac OS 9 to share items between users.

    System Folder/

    The Mac OS 9 System Folder.

    System/

    Contains support files for the system and system applications, among other things.

    Temporary Items/

    Temporary files used by Mac OS 9.

    TheVolumeSettingsFolder/

    This directory keeps track of details such as open windows and desktop printers.

    Trash/

    Mac OS 9 trash folder.

    Users/

    Home directories.

    VM Storage

    Mac OS 9 virtual memory file.

    Volumes/

    Contains all mounted filesystems.

    automount/

    This directory handles static NFS mounts.

    bin/

    Contains essential system binaries.

    cores/

    If core dumps are enabled (with tcsh's limit and bash/sh's ulimit commands), they will be created in this directory as core.pid.

    dev/

    This directory contains files that represent various devices.

    etc/

    This directory contains system configuration files.

    lost+found

    This directory stores orphaned files discovered by fsck.

    mach

    This is a symbolic link to the /mach.sym file.

    mach.sym

    Kernel symbols.

    mach_kernel

    The Darwin kernel.

    private/

    Contains the tmp, var, etc, and cores directories.

    sbin/

    Executables for system administration and configuration.

    tmp/

    Temporary files.

    usr/

    This directory contains BSD Unix applications and support files.

    var/

    This directory contains frequently modified files such as log files.
    5. Different Kinds of Hidden Files

    As with other Unix flavors, you can make a file invisible by prefixing its name with a ., as in /.vol. This has the effect of making it invisible in the Finder, as well as when you issue an ls without the -a option.

    Mac OS X also uses a file in the root directory (.hidden) to maintain a list of files that should be hidden from the Finder.

    Also, HFS+ (the filesystem used by Mac OS) files and directories can have a hidden attribute set using the SetFile command (the SetFile command is available in /Developer/Tools after you install the Mac OS X Developer Tools package described in the sidebar). This setting won't take effect until you relaunch the Finder. You can log out and log in again or use the Force Quit option from the Apple menu. You can turn off the invisible bit with SetFile -a v SomeFile. See the manpage for SetFile for more details. (Note that invisible files are only invisible from the Finder; you can still see them with ls.)
    6. Aliases and Links

    There are two ways to create links to files. The first is to select the file in the Finder, and drag it to a new location while holding down the Option and Command keys (or select Make Alias from the File menu). This creates a Mac OS alias that Cocoa, Carbon, and Classic applications can follow. However, Unix applications will ignore those links, seeing them as zero-byte files.

    You can also create a link with ln or ln -s. If you use this kind of link, Unix, Cocoa, Carbon, and Classic applications will happily follow it.
    7. X11

    Mac OS X does not come with the X Window System. Instead, it uses an advanced graphics system called Aqua. But if you want to run X11 applications, you're in luck: XFree86 has been ported to Mac OS X. You should first download and install XDarwin, which provides the X Server and essential tools. The next step is optional. OroborOSX is an X11 Window manager with an Aqua look and feel. You'll be able to run X11 applications side-by-side with Mac OS X applications, and they'll look great.
    8. Fink

    Are there some Unix or Linux applications that you're missing? Check out the Fink project, which modifies open source applications so they'll compile and run on Mac OS X. Fink already includes an impressive array of applications, and more are on the way.

    Other porting projects that you should explore include DarwinPorts and GNU-Darwin.
    Mac OS X for Unix Geeks

    Related Reading

    Mac OS X for Unix Geeks
    By Brian Jepson, Ernest E. Rothman
    Table of Contents
    Index
    Sample Chapter
    Read Online--Safari
    9. /etc is Not Always in Charge

    If you've come to Mac OS X from another Unix, you may expect that you can add users and groups to the /etc/passwd and /etc/group files. By default, Mac OS X only uses these file in single-user mode. If you want to add a user or group, it will need to go into the NetInfo database, a repository of local directory information.

    The quick way to add a user or a group is to feed a record in either the passwd or the group format into niload (commands you type are shown in bold; the ? is used by the here-document syntax that starts with EOF and ends with EOF):

    % sudo niload passwd . EOF
    ? rothman:*:701:20::0:0:Ernest Rothman:/Users/rothman:/bin/tcsh
    ? EOF

    After you've created the new user, you need to set the password, use the ditto command (a copy command that preserves HFS+ resource forks) to create the home directory, and set permissions correctly:

    % sudo passwd rothman
    Changing password for rothman.
    New password: ********
    Retype new password: ********

    % sudo ditto \ /System/Library/User\ Template/English.lproj \ /Users/rothman

    % sudo chown -R rothman:staff /Users/rothman

    10. Shutdown Doesn't Really

    At the time Mac OS X for Unix Geeks was written, we had indications that Jaguar (Mac OS X 10.2) would execute the Shutdown actions in the scripts contained in /System/Library/StartupItems and /Library/StartupItems. As it turns out, it doesn't. So, if you are running a sensitive application such as a database server, be sure to shut it down manually before you shut down your computer. It's disappointing that Mac OS X does not include the facility to gracefully shut own daemons when the system is powered down. However, the infrastructure is present, and we hope it's switched on in a future update.

  2. the article on Cable Industry Taking Control of the Net · · Score: -1, Redundant

    The Death Of The Internet
    How Industry Intends To Kill The 'Net As We Know It
    Jeff Chester is executive director of the Center for Digital Democracy.

    The Internet's promise as a new medium -- where text, audio, video and data can be freely exchanged -- is under attack by the corporations that control the public's access to the 'Net, as they see opportunities to monitor and charge for the content people seek and send. The industry's vision is the online equivalent of seizing the taxpayer-owned airways, as radio and television conglomerates did over the course of the 20th century.

    To achieve this, the cable industry, which sells Internet access to most Americans, is pursuing multiple strategies to closely monitor and tightly control subscribers and their use of the net. One element can be seen in industry lobbying for new use-based pricing schemes, which has been widely reported in trade press. Related to this is the industry's new public relations campaign, which seeks to introduce a new "menace" into the pricing debate and boost their case, the so-called "bandwidth hog."

    But beyond political and press circles are another equally important development: new technologies being developed and embraced that can, in practice, transform today's open Internet into a new industry-regulated system that will prevent or discourage people from using the net for file-sharing, internet radio and video, and peer-to-peer communications. These are not merely the most popular cutting-edge applications used by young people; they also are the tools for fundamental new ways of conducting business and politics.

    These goals and objectives are visible to anyone who cares to look at the arcane world of telecommunications policy and planning, either in the industry trade press or government documents. The bottom line is the industry want to kill the Internet as we know it.

    Take a minute and wade through this bit of arcana -- and ponder its implications.

    "The IP Service Control System from Ellacoya Networks gives the Broadband Operator 'Total Service Control' to closely monitor and tightly control its subscribers, network and offerings." So reads the Web site of Ellacoya.com, a relatively new firm, describing the business-to-business service that it is selling to large Internet service providers.

    Ellacoya is backed by Wall Street investment powerhouse, Goldman Sachs, which sees a major opportunity to turn around the red ink-plagued broadband sector. Continuing, the website explains, "Establishing Total Service control enables operators to better manage traffic on the network, [and] easily introduce a range of tiered and usage based service plans... Talkative applications, especially peer-to-peer programs like KaZaA and Morpheus, tend to fill all of the available bandwidth... The IP Service Control System allows operators to identify, limit and report on these aggressive applications."

    The fundamental character of the Internet today is that it lacks precisely these kinds of tolls, barriers and gatekeepers. But technology like Ellacoya's hardware and software is not just an enticing idea; it's more of a silver bullet for beleaguered telecom executives. It's being tested in industry trials and points to the kind of Internet the industry would like to develop over the next few years. The way telecom corporations get from today's open-access Internet to their version of the future starts by changing how people pay for the net.

    Industry's New Business Plan
    Most people now pay a flat fee for online access. But the big media companies offering Internet service; Comcast, ATT, AOL -- would like to change that, and already have in a few test locations.

    The broadband industry's plans to institute tiered pricing have been widely reported in its trade press. There are numerous articles about replacing today's open 'Net environment with industry-self-described versions of "walled gardens" or "Internet Lite." (See "Cable Operators Seek to Corral Bandwidth Hogs", Cable Datacom News, 10/01/02) The central feature of these proposals is much like telephone companies; there's a price plan for everyone.

    To make the case to regulators that such pricing is fair and overdue, cable operators have begun a PR effort, spinning that a small percent of users account for a disproportionately large amount of bandwidth used on broadband networks. They've created and embraced the pejorative term, "bandwidth hog," to describe those -- such as music-obsessed college students -- who find robust uses for high-speed connections. Already major news sources, such as the BBC, and technology journalists are using the term in their reports.

    To deal with this "problem," the companies are considering a variety of approaches to ensure they remain in full control of their bandwidth -- unless consumers can afford to pay the hefty access fees. Under a typical plan, a user would be allotted a limited amount of bandwidth per month, and would be charged extra fees for going over this amount. This approach isn't very different from the software industry, where the free versions of an application are intended to frustrate and prompt people to buy the 'better' version.

    Bandwidth caps have already been implemented in Canada by major Internet service provider Sympatico, Inc., and observers have been quick to note that the limit -- 5 GB per month -- would effectively restrict regular use of emerging applications such as Internet radio, streaming media and video-on-demand.

    Consider this excerpt from an article about Sympatico's bandwidth caps in the May 6 edition of Toronto Globe and Mail by reporter Jack Kapica.

    A classic conflict has arisen over streaming media, especially of radio. In a recent letter to globetechnology.com, Andrew Cole, manager of media relations for Bell Sympatico, defended the 5GB bit cap, saying that "In my experience, Internet radio stations usually transmit at approximately 20 Kbps. This equates to 1.2MB per minute, or 72MB per hour. At this rate, a HSE customer could enjoy 70 hours of Internet Radio per month and remain within the bandwidth usage plan."

    But a 20-Kbps stream is considered poor quality by many people who tune into Internet-based radio stations for such things as classical music concerts. For these people, audio quality streamed at 20 Kbps has been described as "pathetic at best, somewhat akin to AM radio" by Tony Petrilli of Level Platforms Inc. of Ottawa.

    "Decent audio quality starts at 56 Kbps to 64 Kbps, and really gets acceptable only around 100 Kbps," he said. This alone, continued Mr. Petrilli, "will blow the cap, let alone any other form of surfing, such as looking at movie trailers or even reading Web-based news. Heaven forbid that someone listens to 90 minutes a day of quality Internet radio. That way we'd blow the cap in 20 days.

    When you consider the fact that the largest American telecommunications firms are often part of the same mega-corporation with music, video or movie-producing entertainment divisions -- such as AOL-Time Warner -- you can see how an industry-regulated Internet would handily end music and movie industry worries about Napster-like file swapping by people who don't want to pay industry-monopolized retail prices for content.

    Thus, the strategic and technically feasible solutions embodied by companies such as Ellacoya is obviously why Goldman-Sachs was keen to invest in the firm -- as it offers the actual means to monetize the net and turn around the revenue-poor broadband sector.

    According to Ellacoya's technical datasheet, operators can create "up to 51,000 unique policies that can be combined to generate limitless numbers of subscriber policies." Such rules, they explain, can either permit, deny, priority queues, address lock, rate limit or redirect access. The same technology also poses new concerns over privacy, since Ellacoya's technology "collects usage statistics for subscribers and applications, capturing service events, session details, and byte counts.... Operators can 'stamp' the subscribers identity on all records."

    The Industry Spin
    The cable industry will argue that such ubiquitous control systems and restrictive pricing structures are necessary to resolve bandwidth backups. But the fact is, this cannot be the case, because cable systems are constructed to avoid bandwidth shortages. But don't take my word for it.

    Mike LaJoie, vice president for advanced technology at AOL-Time Warner told MultiChannel News, "The way that the HFC (hybrid fiber coaxial) architecture works, we never run out of bandwidth," LaJoie said. "We can always split or do other things that will give us the bandwidth that we want, so it really ends up being a desire to provide the best and highest experience for our customers." (See "HD on VOD Searches for Resolution", Multichannel News, 09/30/02) What these statements make clear is that the cable industry's goal for broadband is to monetize bandwidth. By charging a toll for every bit, the industry can simultaneously extract great profits from the new applications that it allows on its networks, as well as restrict access to those that it finds problematic, i.e. those that compete with its own content offerings. In short, the industry finally sees a way to make money online.

    Of course, these calculations are utterly self-serving, ignoring the fact that the net was developed with tax dollars and has been an incubator for an array of innovations that extend far beyond creating new profit centers for big media companies. The envisioned control structures will inhibit robust Internet use by early broadband adopters, and discourage development of new high-speed applications such as Internet-based telephone and video-on-demand, thus slowing overall broadband growth.

    Worse, this business model will erect high economic and technical barriers to entry for non-commercial and public interest uses of the high-speed Internet, threatening civic discourse, artistic expression and non-profit communications. In moving to implement this highly centralized vision for broadband, the cable industry does not simply ignore the democratic and competitive history of the Internet -- it is actively hostile to it.

    Consumption-based pricing and other restrictive access controls contradict the spirit of openness and innovation that built the Internet in the first place, and will do irreparable harm to its future as a medium for small business initiatives, non-commercial users and democratic discourse. New threats to privacy are also clear, given the intrusive nature of the technology to closely monitor all online use. If you think spam is bad now...

    And Where Is The FCC?
    This new threat to online communications is a direct consequence of recent Federal Communications Commission policies by Chairman Michael Powell that permit cable companies to operate their broadband platforms in a "discriminatory, non-open access" manner. This legalese means the FCC, the historic guardian of the public interest in the communications field, has abdicated its founding charge: to serve the public interest before private interests.

    In sum, the Internet as we now know it -- and its revolutionary promise -- may soon pass into the history books. In the absence of public policy safeguards, the emerging pricing and control structures will fundamentally change the kinds of information -- and way it's delivered -- on the Internet. The ramifications extend far beyond the quarterly reports and shareholder earnings for the nation's telecommunications corporations.

    The consequences are cultural and will affect the pace and character of progress in the early 21st century. If the communications companies impose tolls, roadblocks and dead ends on the information 'superhighway,' they will be robbing public trust resources in much the same way 19th century mining companies pilfered public lands and 20th century radio and television networks privatized the public's airwaves.