background preloader

Unix

Facebook Twitter

Security

Emacs. Launchd. MacPorts. How to map your apple keyboard to be more GNU-like. Under Construction This is a small guide to setup a development environment in Mac OS X (10.4) for doing GNU or other open-source software not specifically written for the Mac, but more for linux and other *nix's.

Get your Terminal.app ready I would really suggest getting your terminal to behave properly, so swap some keys in 'Terminal', 'Window Settings...', 'Keyboard', namely the 'end' and 'shift end', 'home' and 'shift home', 'page down' and 'shift page down' and 'page up' and 'shift page up'. Then edit the home key: delete all that is there and type the following keys: ctrl + [, [, 1, ~ it should now say: \033[1~ Do the same for the end key, it should say: \033[4~ Then setup those keys to have, linux like, sane behaviour in bash and other readline aware programs, as root edit /etc/inputrc or as user ~/.inputrc: X11 and Mac OS X gcc From your Mac OS X install cd's or DVD, install the extra package X11 for the X-server.

Next, install XCode (from Darwin Ports Hints. Defaultapp. Defaultapp Where Keith finds the default app In this tweet yesterday, John Gruber of Daring Fireball fame asked: Anyone have a shell or AppleScript command that tells you what the current default web browser is? I had written code to do this for my upcoming app, so i spent a few minutes packaging it up as a command line tool. . $ . The tool uses LaunchServices to determine url of default app for the given document extension and then LaunchServices again to find the application name. Posted by kalperin at 17:07 | Comments (7) CFBundle is CoreFoundation, not Carbon. The default web browser isn't necessarily the default opener of .html files, though. Nice. IC-Switch not only tells you what the default application is selected, it allows you to change quickly and easily your default emailer, FTP client, news and RSS readers and Web browser.

To be able to change this from the command line: Nice. Ok, thanks a lot for your post. Qpfstmo: HDR Tone Mapping GUI for Linux. I have written a GUI interface to Rafał Mantiuk and Grzegorz Krawczyk's collection of tone mapping operators, pfstmo. They in turn extend the resources in pfstools. My previous post, High Dynamic Range Photography with Linux, outlines methods I use for generating HDRI.

Why Tone Mapping The first two photos below are the shortest and longest exposures used for constructing the final HDRI. In the upper left image, to capture the sunlit details, the back fence and red chair are underexposed. The upper right image captures faithfully the color information for the chair and fence, along with the displayed image on the computer. The reason for Tone Mapping arises when we want to display the resulting HDR image.

The lower left image tries to linearly map to the 8bits/channel availible in the standard JPG format. The bottom right on the other hand uses a logarithmic mapping, which does a fine job of maintaining the shadow detail. Qpfstmo Overview of using qpfstmo , button. The "Viewer" window. Mplayer dump uncompressed rgb data. Welcome to TextDrive. TIP Using screen. GNU Screen: an introduction and beginner's tutorial. Shell (sh,ksh,bash) scripting in 20 pages. OS X Tips. Project details for Wyrd. Remind. Remind is a sophisticated calendar and alarm program. It includes the following features: A sophisticated scripting language and intelligent handling of exceptions and holidays. Plain-text, PostScript and HTML output. Timed reminders and pop-up alarms. A friendly graphical front-end for people who don't want to learn the scripting language.

Facilities for both the Gregorian and Hebrew calendars. Support for 12 different languages. Download Remind Remind-related Sites and Mailing List We run a mailing list for fans of Remind. We have a Remind Wiki. David Skoll wrote an article about Remind for Linux Journal. Remind Helpers Remind ships with three back-ends: rem2ps generates PostScript calendars; rem2html generates HTML ones, and tkremind provides an X Window GUI for Remind. If you've written a program designed to work with Remind and would like it linked from this page, please email me. Microsoft Policy Remind can be made to run under Windows if you compile it with the Cygwin tools. Apple Policy. Remind Widget.

What It Is This is a widget for Apple's Dashboard system that displays the output from the Remind program. Remind is a powerful calendar and alarm program that includes a sophisticated scripting language. More information on Remind can be found at the Remind home page. Recent Changes Compact date banner: The date banner can be turned into a smaller one-line version to give you more room for reminders.Font themes: We now provide you with a selection of fonts for your date banner.Updated artwork: A more elegant main display, a more interesting preferences panel, and a much-improved icon comprise a trifecta of visual improvements. Future Enhancements Internationalization: The date strings should be correct now, but there's also the about text and preferences to translate.

Known Issues Extraneous banner in reminders: If your date banner does not begin with the text "Reminders for", it will be displayed in the reminders area along with the rest of your events. Installation Source Code Author. DevTodo. Synopsis DevTodo is a small command line application for maintaining lists of tasks. It stores tasks hierarchically, with each task given one of five priority levels. Data is stored as JSON. The task list is stored in a file named .todo2 in the current directory. Whenever a list is modified a backup is first copied to .todo2~. DevTodo1 still compiles and installs, but is now unmaintained. Screenshot Usage Add a task, like so: $ todo2 -a I should really update my homepage.

Add a task as a child of an existing one: $ todo2 -g 2 -a This is a child of task 2. List open tasks: $ todo2 List all tasks, including closed: $ todo -A Mark a task as complete: $ todo2 -d 1.2 If you find that your todo list is overwhelming your screen, turn on summary mode. . $ todo2 -s Get a full list of command line options with: $ todo2 --help Installing DevTodo is written in the Go programming language. Installation is quite simple: The binary and man page will be installed under /usr/local. DevTodo 1? Yes, this is version 2. Tiger's Improved Firewall (and How to Use It) Pages: 1 , There are Bugs Best to get this over with. . These are new bugs in the new features, and I'm sure that someone is beavering away to get them fixed (some people get all the fun jobs). They affect how we can use the firewall but, at least with the ones that I have found, they do not compromise the firewall.

First, the bug when enabling a set. . $ sudo ipfw set disable 12 enable 4 On my computer, set 12 has no rules in it, so I can disable it all I want. If you read the man page for the firewall ( man ipfw ), you'll notice that you should be able to delete sets of rules and move rules in and out of different sets. . $ sudo ipfw delete set 4 ipfw: rule 4: setsockopt(IP_FW_DEL): Invalid argument Obviously someone has yet to get round to coding that up, so you can't delete sets.

However this move is one to avoid: $ sudo ipfw set move rule 60000 to 13 This should move rule 60000 from its existing set into set 13. Logging Firewall Usage to ipfw.log Final Thoughts Return to the Mac DevCenter. Aquamacs: Emacs for Mac OS X. Getting Mac OS X 10.3 to Behave Almost Like My Linux Boxes.

(and other tweaks) Warning! Much has changed since 10.3, so don't expect these to work (or be the best way to do things) on 10.4 (Tiger). Here are some notes on how I set up a few Apples running OS X 10.3. I do not claim that this is the best way to go about doing anything and some of this is very specific to my needs, but it seems to work. If you have any comments, corrections, or suggestions on better ways to do any of this, please let me know! Some of these things are trivial to do and the way to do them is fairly obvious, i.e., there's absolutely no trick to them. Cluster-related topics: Swapping Control and Caps Lock After getting on the net, the next most important thing is getting the control and caps-lock right (at least for those of us who refuse to stretch our pinkies and think the prominent caps lock key is pure evil).

You want to do this as root, so you'll probably have to do this first: sudo su Now use vi or emacs or whatever editor you have and open the file: GNU Compiler . Porting Programs from unix to windows. Unix client documentation. Smb: \> help ls dir du lcd cd pwd get mget put mput rename more mask del open rm mkdir md rmdir rd prompt recurse translate lowercase print printmode queue cancel quit q exit newer archive tar blocksize tarmode setmode help ? History ! Some commands in the previous list are synonyms for other commands.

For example, the ? Command is a synonym for help. Smb: \> ? The term <mask> refers to a file-matching pattern as commonly found in Unix shells and utilities. Smb: \> ls *doc ms-ProfPol-wp.doc A 131 Tue Dec 18 09:12:34 2002 smbclient.doc A 33969 Mon Dec 10 20:22:24 2002 smbmount.doc A 7759 Mon Dec 10 20:20:00 2002 48590 blocks of size 524288. 40443 blocks available lists all files ending in "doc" in the current directory on the remote system. As with any other Unix utility, smbclient has a working directory on the local host. Smb: \> cd trans smb: \trans\> Notice how the prompt changes to reflect the new current working directory. Smb: \trans\> lcd /u/snd the local directory is now /u/snd. Raw Digital Photo Decoding in Linux. Back to Dave Coffin's Home Page en Esperantoem Portuguêsauf Deutschна русскомпа-беларуску Welcome!

If you are wondering how to connect your digital camera and download images to a Linux PC, go to the gPhoto homepage. My software is for processing those images after downloading them. If you're downloading JPEG files, you don't need my software at all. Well, despite the convenience and ubiquity of JPEG, there are some disadvantages. Of course this software is for Windows and Macintosh only, with no source code. So here is my mission: Write and maintain an ANSI C program that decodes any raw image from any digital camera on any computer running any operating system. That program is called dcraw (pronounced "dee-see-raw"), and it's become a standard tool within and without the Open Source world. Here's my resume.

I can be reached by sending e-mail to cybercom dot net with the username "dcoffin". News and Interviews My Code Internationalization When in doubt, translate everything. Use this program. Digital Camera Support for UN*X. Digital camera support on UNIX system is not a simple matter. Most if not all of the manufacturers don't give any attention to non-Windows (and MacOS) systems. Most of them don't even provide the needed documentation to write proper support for their camera.

And with the increasing number of models, it begins to be a real tower of babel. Luckily, these days, there seems to be two trends with major camera vendors when it comes to communication protocols: PTP and USB Mass Storage. USB Cameras Nowadays USB cameras are the most common. For the protocol, there are 2 USB standardized protocols that digital camera uses: USB Mass Storage and PTP (aka Still Image Device). USB Mass Storage USB Mass Storage is the protocol used by hard drives and removable disks devices over USB.

If you wish to use this kind of camera with Digikam from KDE, read the Digikam Documentation. In 2001, Olympus, Nikon, Minolta, Sony, Casio and many others started to use that protocol for their cameras. Canon extensions.