Home Blog Page 10720

Take console productivity to a new level with Screen

Author: JT Smith

Screen is an application that’s often underestimated. Screen is, simply put, a screen manager with VT100/ANSI terminal emulation. Think of it as a full screen, text-based window manager for your terminal or console. For what it is, it’s an incredibly feature-rich application. In this article, I will explain what it does and why it’s so useful.
According to the man page, Screen “multiplexes a physical terminal between several processes (typically interactive shells).” What this means to the rest of us is that you start up Screen and run something in it (typically with a shell), and do whatever you normally would in a terminal. This is all fine and dandy but in and of itself isn’t anything new.

Perhaps the most popular feature of Screen is something called detaching. Let’s start with an example. It’s 4 p.m. and you need to start compiling an application that takes around three hours to compile. After it compiles, you need to reboot the system. All this needs to be done by tomorrow morning. Typically that would mean spending the evening at the office, but not with Screen. With Screen you can start it up, start compiling the application, and then detach from the screen session altogether. Detaching will take you back to the command line from which you originally ran screen. At that point you can actually log out of the system and go home for dinner.

Before you panic, let me remind you that you did not suspend the compile job or forfeit your rights to the processor. It’s still compiling. You just don’t have to keep that specific terminal open in order to keep tabs on it. After you’ve enjoyed a nice dinner at home, you open up your laptop and SSH (Secure Shell) into the system, re-attach your Screen session and see what happened with the compilation. You’ll be at the same command prompt where you started the compilation, complete with a buffer of what happened. You then simply reboot the system remotely and you’re ready for the meeting in the morning — and it didn’t take all evening.

To start Screen, type: screen. That starts Screen and runs an instance of your interactive shell (usually Bash). You can do whatever you want in there, just as if it was just another one of your xterms. By default, each command to Screen begins with a C-a (Control-a), and is followed by at least one other keystroke. For example, when you’re ready to detach the session you hit C-a, followed by d. When you decide to re-attach the session, you will type something like screen -r with optional arguments including the sessionowner, pid, tty, and/or host.

Now that you’re convinced that Screen is useful, let’s talk about being productive with it. The Screen feature that as been the most useful to me is the windowing capability. Screen allows you to have multiple windows in one session. You can have one window that’s compiling something on one machine, another that’s SSHed into another server editing a configuration file, and yet another monitoring a log server. Already do this with just a group of xterms on your screen? Let’s go through an example where Screen really shines.

My name is Joe LinuxAdmin and I administer a cluster of six Linux servers doing various tasks, ranging from Web serving to file and printer sharing. What I need is a portable system administration environment. I’ve decided to use Screen. I start my session by typing screen. I now have something that I can remotely detach and re-attach, so that’s good. I’d like to have an open shell into each of the servers I administer, so I’ll create a window for each one and log in to each server. (To create a new window, I type C-a followed by n.) I can do this as many times as I want, so it’s easy to create the six windows I’ll need to access all of my servers at once.

After I’ve created my windows, I need to navigate them. To go to window number four, I’ll type C-a 4. Instantly I’m viewing window number four. If I want to switch to the next window, I type C-a n. Now that I’ve got a server with the hostname of zeus on window 5, how am I going to remember that zeus is on 5? I can always hit C-a A and type in zeus. After I name my windows, I don’t need to cycle through them. I can just as easily type C-a ‘, then type in the name of the machine I want — and there it is. If I’m especially conservative with my keystrokes, then C-a “ will show me a list of my windows along with their titles.

I now have, in one terminal, windows open to all of the servers I administer. Everything is right at my fingertips. I’ve got it all set up. It’s now 5 p.m. and time to go home. Around 8 p.m. I’m out for a walk with my date. Lo and behold, my pager goes off. As usual I look for the nearest computer to address the situation and end up in a cybercafe on a Windows machine. Having a free SSH client on the windows machine is easy thanks to PuTTY, but it’s going to take me forever to load up all of those terminals and login to all of the machines. It’s too bad I left my Screen session attached at the office.

But wait! This is where Screen excels. I log in to my machine and type screen -dr. It remotely detaches my session and re-attaches it where I am. I now have my Screen session with all of my windows, all of my servers, and my entire administration environment right in the cafe. None of it is dependent on the client I’m using. I could be on a Linux machine, a Windows machine, or a Mac OS X machine.

Having windows for different servers you’re logged into is just one example of the uses for multiple windows within Screen. It works equally well for a development environment. You can have one window for a text editor, another for compiling, another for debugging, and yet another running your application. It’s a mobile environment that can be accessed from anywhere.

Screen has many powerful features that go beyond attaching and detaching. For example, you can have more than one person at a time attached to a screen session. Real-time editing by two people on one file — how’s that for collaboration? You can also password-protected Screen sessions to add a level of security. In addition, you can have more than one Screen session per user. The possibilities are endless.

Next time you’re looking for a level of flexibility at the command line that you feel just isn’t possible, I recommend reading up on Screen. It’s a powerful utility that will enhance your productivity — and at the same time it will make your life easier.

OpenSSH with Public Key Cryptography Tutorial

Author: a_thing

libervisco writes “OpenSSH, an OpenBSD project, is an incredibly secure implementation of the SSH protocol, a way of logging into a remote machine. For users of outdated protocols such as RSH, rlogin, and Telnet, it’s an updated, secure replacement. For those who have never used anything like it, SSH can become a very valuable tool.”

Selenium project using Ruby on Rails and Ajax

Anonymous Reader writes “Selenium is a useful and important addition to the toolbox of software engineers, designers, and testers. Together with a continuous integration tool, it allows teams to automate acceptance tests and build better software as they find bugs easier, earlier, and more often. This article provides an example of how to apply Selenium in a real-world project using Ruby on Rails and Ajax.”

Link: ibm.com/developerworks

Category:

  • News

librivox – distributed public domain audio lit

Hugh McGuire writes “I thought you might be interested in the LibriVox project, a distributed open source audio literature project, started in August of this year, and moving along pretty well:

http://librivox.org/
LibriVox volunteers record chapters of books in the public domain, and we release the audio files (catalog and podcast) back into the public domain. Our objective is to make all books in the public domain available, for free, in audio format on the internet. We are a totally volunteer, open source, free content, public domain project.

Brewster Kahle invited us to attend the http://www.openlibrary.org/ launch, where we produced a recorded version of one of the openlibrary books … you can hear what happened when brewster demonstrated here:
http://librivox.org/index.php?p=58

We’ve got 100+ volunteers at the moment, 10 books completed, and expect 25 books by end 2005, and target a minimum 100 books by end of 2006. We’re always looking for new volunteers, both to read and to help with the various technical projects to keep this growing project running smoothly.

thanks,

Hugh McGuire.
http://librivox.org/

Link: librivox.org

Lawyers in love with open source

Author: Marco Fioretti

Most of the time, open source supporters think of lawyers as a crowd of hungry vultures, throwing patents and cease-and-desist letters at innocent hackers. However, in the province of Foggia, Southern Italy, two small groups of lawyers have turned themselves into open source evangelists.

What? Did hell just freeze over? No, it’s just common sense. The long-term availability and privacy of all legal documents deserve the highest possible guarantees. Only non-proprietary file formats like OpenDocument, the default format in OpenOffice.org 2.0, will always be legally accessible with any software program. Proprietary software, if loaded with DRM functionality, may silently track file modification and exchanges and automatically report it to third parties. So much for attorney/client privilege.

For several months, two Gruppo di Lavoro – Open Source (GL-OS) — that is, Open Source Workgroups — one right in Foggia and another in the nearby town of
Lucera, have been promoting the free sharing of IT knowledge among lawyers of the province, the philosophy of free and open source software (FOSS), and the diffusion of GNU/Linux systems. Practically speaking, they organize meetings and classes and distribute free software and related documentation. Their base is the Lawyers’ Hall in the Palazzo di Giustizia (Tribunal) of Foggia, where a couple of computers were set up to showcase the potential of FOSS. Free support, especially for OpenOffice.org, is always available, and newbies can ask for a personal tutor. Last May the groups held a well-attended workshop on these issues. Satisfied participants received a CD-ROM with FOSS programs for a Windows desktop.

The GL-OS lawyers told me that many of their Microsoft-only colleagues would like the greater security and transparency guaranteed by open source. But as in other parts of the world it turns out to be hard to get lawyers to use FOSS. A lot of legal software and forms can be used only in a Microsoft environment. A project member said, “The discovery of open source makes you realize that the first great obstacle is the information technology subculture that is inoculated into people.” In other words, non-technical obstacles remain the hardest to overcome.

GL-OS volunteers understand that lawyers, like almost everybody else in the world, see computers just as fancy typewriters: tools that have to solve job-related problems, not create new ones. In a law office, only 2-3% of what Linux can do is actually needed — or, quoting again GL-OS lawyers, “You don’t need a Ferrari because you must move at only 5 Km/H anyway.” Consequently, GL-OS makes a point to work in a gradual and as painless as possible way. The computers in the Lawyers’ Hall can boot either Windows XP or Mandrake 10.1. The Windows partition hosts only FOSS programs that a lawyer really needs and can use without problems: OpenOffice.org, Firefox, and Thunderbird. The first IT help many GL-OS visitors need is learning how folders and file managers can help to keep files organized, and that documents can be protected with cryptography. Only later does GL-OS introduce the FOSS philosophy.

Future plans

GL-OS is preparing to release Italian legal forms in OpenDocument format, and plans to offer custom CD-ROMs. The group is studying how to become official OOo Community Distributors. The to-do list also includes training classes (especially for OpenOffice.org) and conferences about FOSS and the forensic world. The longest-term goal is the utilization of FOSS to access both legal databases and the Processo Civile Telematico, the Italian project that is attempting to reduce as much as possible the amount of paper circulating in any given trial. Once it is implemented, all requests to the court and other documents will be written and directly filed in encrypted XML format, signed with smart cards.

When I asked what support GL-OS needs most urgently from the FOSS community, the answer came fast: please give us more simple manuals to install and configure applications! GL-OS would also like to hear from other lawyers and FOSS programmers to cooperate and exchange experiences.

Similar projects in Italy

GL-OS wasn’t my first encounter with pro-open source Italian lawyers. During the Linux
World Expo 2004 in Milan
, Stefano Sutti, managing partner of the law firm Studio Legale Sutti explained how his company has been using open source software for years.

In addition, the Linux-Lex portal provides lots of information for lawyers interested in migrating to Linux. The Studio Legale Sutti commissioned and subsequently released under the GPL license its Web-based law office management application, called Knomos. Another project in the same space is eLawOffice, which has recently set up an online community to get feedback from end users. The basic functions of eLawOffice are usable, and most of the code could be reused by lawyers of other nations. The project’s Links page points to more resources than I could list here.

Given the cross-border nature of the legal hassles surrounding FOSS today, building a network of lawyers interested in promoting it would be great, wouldn’t it? Within the E.U., hackers and lawyers could cooperate to make sure FOSS plays the greatest possible role in a digitally interoperable Europe, and these (for now) isolated groups worldwide could explore how to work together through the Software Freedom Law Center.

Category:

  • Legal

Eclipse method for pairwise testing

Anonymous Reader writes “This Eclipse based technology is for generation and manipulation of test input data or configurations. It uses sophisticated combinatorial algorithms to construct test suites with given coverage properties over large parameter spaces. The use of combinatorial covering configurations, also known as pairwise testing, is a well-known technique for covering large input spaces. Here is a tutorial that explains how to use the Eclipse environment.”

Link: alphaworks.ibm.com

Category:

  • Java

OSS on OS X

Author: Mitchell Cohen

Apple recently released Mac OS X 10.4 Tiger, the latest update to the flagship operating system. Featuring developer-oriented features such as Core Data under the hood, the Unix-based Tiger and the introduction of powerful yet increasingly cost-effective Mac hardware is enticing many a curious Linux enthusiast to prowl over to the nearest Apple Store and get their paws on a Mac. And while the Mac OS opens up a world of elegant interface design and commercial software unseen on the Linux desktop, lacking out of the box is the plethora of open source software to which we are so accustomed. Luckily, a growing community of open source developers and advocates has been working since the birth of the platform to bring free software to Mac OS X.

There are multiple ways to install and use free software on the Mac. Each method offers varying degrees of convenience and integration with the system:

  1. Developers can take advantage of OS X technologies by using the Cocoa GUI toolkit to create native Aqua user interfaces, which are then rendered through Quartz. These programs look and feel like native OS X applications.
  2. Many more applications, particularly Linux ports, run in the the OS X Terminal application or, graphically, in Apple’s free implementation of the X Window System. While such applications can generally be ported faster than native Aqua programs, they aren’t integrated into the OS X user interface. Most of these apps can be installed with Fink, discussed below.

Native applications

When OpenOffice.org canceled development of its 2.0 Aqua port in March, Mac users were left searching for a native cross-platform open source office suite for OS X. Fortunately, the NeoOffice/J project was developing a version of OpenOffice.org 1.1.x using Java to provide users with a native Aqua interface. Along with all of the features present in OpenOffice.org 1.1.4, some of NeoOffice/J’s OS X-specific features include:

  • No X11 requirement
  • Native drag-and-drop support
  • Native copy-paste support
  • Aqua menus
  • Integration with Finder and Mail
  • Support for system fonts

NeoOffice is not a complete Aqua port of OpenOffice.org; at this point, its biggest advantage over OpenOffice.org is that it does not require X11 to run. As of v1.1 Release Candidate 1, many interface elements, such as the toolbars, do not use the Aqua theme or follow OS X interface design guidelines. Still, each NeoOffice release promises to improve Aqua integration and overall speed and stability, bringing NeoOffice/J closer to becoming a viable alternative to Microsoft Office on the Mac.

For now, if you do not need the full feature set of NeoOffice/J or want to have a lightweight, free, and fully native word processor for your Mac, AbiWord‘s OS X port takes about four seconds to load on a Mac Mini and takes up only 25MB of disk space. AbiWord’s interface, built entirely in Cocoa, is clean and user-friendly. In addition to standard text formatting, AbiWord has basic support for tables, images, mail merge, and Word import/export. Both AbiWord and NeoOffice/J have extensive internationalization support for non-English-speakers.

Mac OS X is bundled with the Safari Web browser, which renders HTML with an engine based on KDE’s KHTML. Safari renders pages quickly and accurately, but the browser interface is not customizable nor is it open source. One well-known alternative is Mozilla Firefox. The OS X port features a special default theme and minimal Cocoa support (an example is the native Preferences dialog.) However, like NeoOffice, Firefox is not a true Aqua program. The OS X version is buggier than the Windows and Linux versions.

Until some of the issues in Firefox are fixed for v1.5, Mac users should look instead to Mozilla’s Camino for a real Cocoa, Gecko-based browser. Designed from the ground up for the Mac, Camino blends into the OS X interface, using Keychain passwords, address book contacts, and other OS X settings. It also supports advanced browser features such as tabs, find-as-you-type search, and a search engine toolbar. One interesting feature in Camino’s dual-pane bookmark manager, modeled after that of Safari, is the ability to create “tab folders” that open all bookmarks located in a folder in separate tabs when you click on the folder. Camino is well-integrated and attractive; its one major drawback is that it doesn’t support the XUL extensions that make Firefox so useful, so you may want to use both browsers.

MPlayer OS X is an Aqua port of MPlayer, the open source world’s most compatible media player. MPlayer OS X sports a lightweight Cocoa interface that includes buttons to control playback and a simple playlist manager. Users can add video files quickly to the playlist queue by dragging and dropping them from a Finder window. MPlayer OS X is compiled to support the G4/G5’s AltiVec and outputs video through Quartz by default to provide smooth playback. As in the Linux version, MPlayer OS X is able to output through a variety of alternate video and audio devices, such as OpenGL, or even right onto the Desktop layer. And MPlayer OS X, just like its Linux equivalent, is bundled with enough codecs to play any media file you can throw at it. To play video in Apple’s X11 and have access to more fine-tunable command line options, you can install MPlayer with Fink, as described below.

Open source the Fink way

Fink is a project that aims to provide Mac OS X users with ports of common Linux open source applications. The Fink package manager facilitates installing programs from the OS X command line by downloading application source code from a database of more than 5,000 packages, compiling it, and installing it using a port of Debian’s APT. Fink’s feature set includes full dependency support and the ability to bypass installing certain packages (like X) if you have already installed them through other methods. Fink installs all packages to its own /sw directory so that they will not interfere with the rest of the system, making it safe and easy to uninstall Fink by removing /sw.

To use Fink, you need to install Apple’s Developer Tools and X Window System from the Mac OS X installation DVD. (There are binary and install it onto your system. Once Fink is installed, open Terminal.app (found in /Applications/Utilities) and type fink configure to set options such as which mirrors Fink should use and the verbosity level of its output. Next, run fink selfupdate to upgrade Fink to the latest release. This step is especially important for Tiger users since versions of Fink later than 0.24.5 use the newer 10.4-transitional tree to install software that is compatible with the new OS. Finally, run fink scanpackages to make sure the list of available packages is up-to-date.

Installing software with Fink is relatively simple. The command fink list keyword displays all packages in Fink’s database matching the keyword you are searching for. Type fink install packagename to make Fink download, compile, and install your requested application. For example, to install the metapackage containing all of the applications in KDE 3.3.2, type fink install bundle-kde. Applications installed with Fink do not show up in the Finder, but they can be run from Terminal.app provided that /sw/bin is in your $PATH, which should be taken care of automatically after installing Fink. Typical console applications, such as the Pine mail reader (installable with Fink), require no further setup to use. Graphical applications requiring X, such as the GIMP or Bluefish (both installable with Fink!), can be run from an xterm window in X11.app or by using the command open-x11 applicationname in Terminal. Apple’s X11 honors the contents of your ~/.xinitrc file and launches all commands found within it every time you start X. To make launching X applications a more transparent process, I add aliases to my ~/.bashrc file, such as: alias konq='open-x11 konqueror'.

Fink has many more commands and uses, including ports of the excellent apt-get and dselect programs from Debian. These are covered in the detailed documentation and FAQ on the Fink site. You can browse the Fink mailing lists for additional support. One community site that deserves special mention is Sao’s Place, an essential resource for anything and everything about Fink and X11 on Mac OS X. For another method of installing open source software similar to Fink in purpose but different in implementation, check out DarwinPorts.

Category:

  • Open Source

OSS on OS X

Author: Mitchell Cohen

Apple recently released Mac OS X 10.4 Tiger, the latest update to the flagship operating system. Featuring developer-oriented features such as Core Data under the hood, the Unix-based Tiger and the introduction of powerful yet increasingly cost-effective Mac hardware is enticing many a curious Linux enthusiast to prowl over to the nearest Apple Store and get their paws on a Mac. And while the Mac OS opens up a world of elegant interface design and commercial software unseen on the Linux desktop, lacking out of the box is the plethora of open source software to which we are so accustomed. Luckily, a growing community of open source developers and advocates has been working since the birth of the platform to bring free software to Mac OS X.

There are multiple ways to install and use free software on the Mac. Each method offers varying degrees of convenience and integration with the system:

  1. Developers can take advantage of OS X technologies by using the Cocoa GUI toolkit to create native Aqua user interfaces, which are then rendered through Quartz. These programs look and feel like native OS X applications.
  2. Many more applications, particularly Linux ports, run in the the OS X Terminal application or, graphically, in Apple’s free implementation of the X Window System. While such applications can generally be ported faster than native Aqua programs, they aren’t integrated into the OS X user interface. Most of these apps can be installed with Fink, discussed below.

Native applications

When OpenOffice.org canceled development of its 2.0 Aqua port in March, Mac users were left searching for a native cross-platform open source office suite for OS X. Fortunately, the NeoOffice/J project was developing a version of OpenOffice.org 1.1.x using Java to provide users with a native Aqua interface. Along with all of the features present in OpenOffice.org 1.1.4, some of NeoOffice/J’s OS X-specific features include:

  • No X11 requirement
  • Native drag-and-drop support
  • Native copy-paste support
  • Aqua menus
  • Integration with Finder and Mail
  • Support for system fonts

NeoOffice is not a complete Aqua port of OpenOffice.org; at this point, its biggest advantage over OpenOffice.org is that it does not require X11 to run. As of v1.1 Release Candidate 1, many interface elements, such as the toolbars, do not use the Aqua theme or follow OS X interface design guidelines. Still, each NeoOffice release promises to improve Aqua integration and overall speed and stability, bringing NeoOffice/J closer to becoming a viable alternative to Microsoft Office on the Mac.

For now, if you do not need the full feature set of NeoOffice/J or want to have a lightweight, free, and fully native word processor for your Mac, AbiWord‘s OS X port takes about four seconds to load on a Mac Mini and takes up only 25MB of disk space. AbiWord’s interface, built entirely in Cocoa, is clean and user-friendly. In addition to standard text formatting, AbiWord has basic support for tables, images, mail merge, and Word import/export. Both AbiWord and NeoOffice/J have extensive internationalization support for non-English-speakers.

Mac OS X is bundled with the Safari Web browser, which renders HTML with an engine based on KDE’s KHTML. Safari renders pages quickly and accurately, but the browser interface is not customizable nor is it open source. One well-known alternative is Mozilla Firefox. The OS X port features a special default theme and minimal Cocoa support (an example is the native Preferences dialog.) However, like NeoOffice, Firefox is not a true Aqua program. The OS X version is buggier than the Windows and Linux versions.

Until some of the issues in Firefox are fixed for v1.5, Mac users should look instead to Mozilla’s Camino for a real Cocoa, Gecko-based browser. Designed from the ground up for the Mac, Camino blends into the OS X interface, using Keychain passwords, address book contacts, and other OS X settings. It also supports advanced browser features such as tabs, find-as-you-type search, and a search engine toolbar. One interesting feature in Camino’s dual-pane bookmark manager, modeled after that of Safari, is the ability to create “tab folders” that open all bookmarks located in a folder in separate tabs when you click on the folder. Camino is well-integrated and attractive; its one major drawback is that it doesn’t support the XUL extensions that make Firefox so useful, so you may want to use both browsers.

MPlayer OS X is an Aqua port of MPlayer, the open source world’s most compatible media player. MPlayer OS X sports a lightweight Cocoa interface that includes buttons to control playback and a simple playlist manager. Users can add video files quickly to the playlist queue by dragging and dropping them from a Finder window. MPlayer OS X is compiled to support the G4/G5’s AltiVec and outputs video through Quartz by default to provide smooth playback. As in the Linux version, MPlayer OS X is able to output through a variety of alternate video and audio devices, such as OpenGL, or even right onto the Desktop layer. And MPlayer OS X, just like its Linux equivalent, is bundled with enough codecs to play any media file you can throw at it. To play video in Apple’s X11 and have access to more fine-tunable command line options, you can install MPlayer with Fink, as described below.

Open source the Fink way

Fink is a project that aims to provide Mac OS X users with ports of common Linux open source applications. The Fink package manager facilitates installing programs from the OS X command line by downloading application source code from a database of more than 5,000 packages, compiling it, and installing it using a port of Debian’s APT. Fink’s feature set includes full dependency support and the ability to bypass installing certain packages (like X) if you have already installed them through other methods. Fink installs all packages to its own /sw directory so that they will not interfere with the rest of the system, making it safe and easy to uninstall Fink by removing /sw.

To use Fink, you need to install Apple’s Developer Tools and X Window System from the Mac OS X installation DVD. (There are binary and install it onto your system. Once Fink is installed, open Terminal.app (found in /Applications/Utilities) and type fink configure to set options such as which mirrors Fink should use and the verbosity level of its output. Next, run fink selfupdate to upgrade Fink to the latest release. This step is especially important for Tiger users since versions of Fink later than 0.24.5 use the newer 10.4-transitional tree to install software that is compatible with the new OS. Finally, run fink scanpackages to make sure the list of available packages is up-to-date.

Installing software with Fink is relatively simple. The command fink list keyword displays all packages in Fink’s database matching the keyword you are searching for. Type fink install packagename to make Fink download, compile, and install your requested application. For example, to install the metapackage containing all of the applications in KDE 3.3.2, type fink install bundle-kde. Applications installed with Fink do not show up in the Finder, but they can be run from Terminal.app provided that /sw/bin is in your $PATH, which should be taken care of automatically after installing Fink. Typical console applications, such as the Pine mail reader (installable with Fink), require no further setup to use. Graphical applications requiring X, such as the GIMP or Bluefish (both installable with Fink!), can be run from an xterm window in X11.app or by using the command open-x11 applicationname in Terminal. Apple’s X11 honors the contents of your ~/.xinitrc file and launches all commands found within it every time you start X. To make launching X applications a more transparent process, I add aliases to my ~/.bashrc file, such as: alias konq='open-x11 konqueror'.

Fink has many more commands and uses, including ports of the excellent apt-get and dselect programs from Debian. These are covered in the detailed documentation and FAQ on the Fink site. You can browse the Fink mailing lists for additional support. One community site that deserves special mention is Sao’s Place, an essential resource for anything and everything about Fink and X11 on Mac OS X. For another method of installing open source software similar to Fink in purpose but different in implementation, check out DarwinPorts.

OSS on OS X

Author: Mitchell Cohen

Apple recently released Mac OS X 10.4 Tiger, the latest update to the flagship operating system. Featuring developer-oriented features such as Core Data under the hood, the Unix-based Tiger and the introduction of powerful yet increasingly cost-effective Mac hardware is enticing many a curious Linux enthusiast to prowl over to the nearest Apple Store and get their paws on a Mac. And while the Mac OS opens up a world of elegant interface design and commercial software unseen on the Linux desktop, lacking out of the box is the plethora of open source software to which we are so accustomed. Luckily, a growing community of open source developers and advocates has been working since the birth of the platform to bring free software to Mac OS X.

There are multiple ways to install and use free software on the Mac. Each method offers varying degrees of convenience and integration with the system:

  1. Developers can take advantage of OS X technologies by using the Cocoa GUI toolkit to create native Aqua user interfaces, which are then rendered through Quartz. These programs look and feel like native OS X applications.
  2. Many more applications, particularly Linux ports, run in the the OS X Terminal application or, graphically, in Apple’s free implementation of the X Window System. While such applications can generally be ported faster than native Aqua programs, they aren’t integrated into the OS X user interface. Most of these apps can be installed with Fink, discussed below.

Native applications

When OpenOffice.org canceled development of its 2.0 Aqua port in March, Mac users were left searching for a native cross-platform open source office suite for OS X. Fortunately, the NeoOffice/J project was developing a version of OpenOffice.org 1.1.x using Java to provide users with a native Aqua interface. Along with all of the features present in OpenOffice.org 1.1.4, some of NeoOffice/J’s OS X-specific features include:

  • No X11 requirement
  • Native drag-and-drop support
  • Native copy-paste support
  • Aqua menus
  • Integration with Finder and Mail
  • Support for system fonts

NeoOffice is not a complete Aqua port of OpenOffice.org; at this point, its biggest advantage over OpenOffice.org is that it does not require X11 to run. As of v1.1 Release Candidate 1, many interface elements, such as the toolbars, do not use the Aqua theme or follow OS X interface design guidelines. Still, each NeoOffice release promises to improve Aqua integration and overall speed and stability, bringing NeoOffice/J closer to becoming a viable alternative to Microsoft Office on the Mac.

For now, if you do not need the full feature set of NeoOffice/J or want to have a lightweight, free, and fully native word processor for your Mac, AbiWord‘s OS X port takes about four seconds to load on a Mac Mini and takes up only 25MB of disk space. AbiWord’s interface, built entirely in Cocoa, is clean and user-friendly. In addition to standard text formatting, AbiWord has basic support for tables, images, mail merge, and Word import/export. Both AbiWord and NeoOffice/J have extensive internationalization support for non-English-speakers.

Mac OS X is bundled with the Safari Web browser, which renders HTML with an engine based on KDE’s KHTML. Safari renders pages quickly and accurately, but the browser interface is not customizable nor is it open source. One well-known alternative is Mozilla Firefox. The OS X port features a special default theme and minimal Cocoa support (an example is the native Preferences dialog.) However, like NeoOffice, Firefox is not a true Aqua program. The OS X version is buggier than the Windows and Linux versions.

Until some of the issues in Firefox are fixed for v1.5, Mac users should look instead to Mozilla’s Camino for a real Cocoa, Gecko-based browser. Designed from the ground up for the Mac, Camino blends into the OS X interface, using Keychain passwords, address book contacts, and other OS X settings. It also supports advanced browser features such as tabs, find-as-you-type search, and a search engine toolbar. One interesting feature in Camino’s dual-pane bookmark manager, modeled after that of Safari, is the ability to create “tab folders” that open all bookmarks located in a folder in separate tabs when you click on the folder. Camino is well-integrated and attractive; its one major drawback is that it doesn’t support the XUL extensions that make Firefox so useful, so you may want to use both browsers.

MPlayer OS X is an Aqua port of MPlayer, the open source world’s most compatible media player. MPlayer OS X sports a lightweight Cocoa interface that includes buttons to control playback and a simple playlist manager. Users can add video files quickly to the playlist queue by dragging and dropping them from a Finder window. MPlayer OS X is compiled to support the G4/G5’s AltiVec and outputs video through Quartz by default to provide smooth playback. As in the Linux version, MPlayer OS X is able to output through a variety of alternate video and audio devices, such as OpenGL, or even right onto the Desktop layer. And MPlayer OS X, just like its Linux equivalent, is bundled with enough codecs to play any media file you can throw at it. To play video in Apple’s X11 and have access to more fine-tunable command line options, you can install MPlayer with Fink, as described below.

Open source the Fink way

Fink is a project that aims to provide Mac OS X users with ports of common Linux open source applications. The Fink package manager facilitates installing programs from the OS X command line by downloading application source code from a database of more than 5,000 packages, compiling it, and installing it using a port of Debian’s APT. Fink’s feature set includes full dependency support and the ability to bypass installing certain packages (like X) if you have already installed them through other methods. Fink installs all packages to its own /sw directory so that they will not interfere with the rest of the system, making it safe and easy to uninstall Fink by removing /sw.

To use Fink, you need to install Apple’s Developer Tools and X Window System from the Mac OS X installation DVD. (There are binary and install it onto your system. Once Fink is installed, open Terminal.app (found in /Applications/Utilities) and type fink configure to set options such as which mirrors Fink should use and the verbosity level of its output. Next, run fink selfupdate to upgrade Fink to the latest release. This step is especially important for Tiger users since versions of Fink later than 0.24.5 use the newer 10.4-transitional tree to install software that is compatible with the new OS. Finally, run fink scanpackages to make sure the list of available packages is up-to-date.

Installing software with Fink is relatively simple. The command fink list keyword displays all packages in Fink’s database matching the keyword you are searching for. Type fink install packagename to make Fink download, compile, and install your requested application. For example, to install the metapackage containing all of the applications in KDE 3.3.2, type fink install bundle-kde. Applications installed with Fink do not show up in the Finder, but they can be run from Terminal.app provided that /sw/bin is in your $PATH, which should be taken care of automatically after installing Fink. Typical console applications, such as the Pine mail reader (installable with Fink), require no further setup to use. Graphical applications requiring X, such as the GIMP or Bluefish (both installable with Fink!), can be run from an xterm window in X11.app or by using the command open-x11 applicationname in Terminal. Apple’s X11 honors the contents of your ~/.xinitrc file and launches all commands found within it every time you start X. To make launching X applications a more transparent process, I add aliases to my ~/.bashrc file, such as: alias konq='open-x11 konqueror'.

Fink has many more commands and uses, including ports of the excellent apt-get and dselect programs from Debian. These are covered in the detailed documentation and FAQ on the Fink site. You can browse the Fink mailing lists for additional support. One community site that deserves special mention is Sao’s Place, an essential resource for anything and everything about Fink and X11 on Mac OS X. For another method of installing open source software similar to Fink in purpose but different in implementation, check out DarwinPorts.

IssueBridge project management software released

Author: James Hurff

IssueBridge is a project management tool that improves the productivity of your project team by allowing project management staff and team members to access and delegate all of the issues within a project. This user friendly and web based software product serves as an issue tracking and defect tracking system. It enables your team to make clear each step needed to meet the overall goal of the project. Please take a look at this exciting new deployment model for a reoccurring project management problem.”