A simple way to open files in X11 applications

Sep 19, '07 07:30:00AM

Contributed by: LukeR

Here is the easiest way, to my knowledge, to associate file extensions with X11 applications: just use the open source X11 Extension program. On the disk image, you'll find a new ExtManager System Preferences panel. Install it, then open it in System Preferences. The next step is to define file extensions and commands associated with them (e.g. /sw/bin/gv for EPS files).

There might be a small problem if you're using applications from outside standard PATHs (e.g. from Fink); in that case, you have to pass the PATH environmental variable to the X11 window manager. For some reason, the Apple xterm fails to assign the proper values to PATH if they're included in the .xinitrc file, and it doesn't read the .bash_profile file either. As a workoround, I suggest creating a .bashrc file with a single line (assuming the paths are already defined in the .bash_profile file, which is a routine for Fink and MacPorts users):

source .bash_profile
You should also set up X11 to launch at login, and you can then assign X11 apps simply by right-clicking (luckily Apple people reinvented the wheel and found out that the mouse can have multiple buttons...) the file and choosing ExtManager as the application to use to open the file.

Another small hint: to get the mouse support in mc, add this line to .bash_profile:
export TERM=dtterm
[robg adds: I haven't tested this one.]

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070918173142162