How do I get open-source software to work?
May 7, 2006 4:32 AM   Subscribe

Using DarwinPorts 1.2.1, how can I get a copy of Gnumeric to run on OS X 10.4.6?

Okay...I'm at the end of my rope...

I've installed Gnumeric five or six times through DarwinPorts 1.2.1 over the last two days on Mac OS 10.4.6 and receive the same error no matter what I do:

(gnumeric:753): Gtk-WARNING **: cannot open display:

Please note: the number in bold always changes.

This happens when I type the word 'gnumeric' into the Terminal application. I don't understand this error.

Is all GNU/Linux open-source software like this? Hours upon hours of downloading, patching and compiling numerous dependencies only to walk away from the computer frustrated and confused? I'm ready to throw my hands up in frustration and go buy a version of Quicken 2006.

Thanks in advance.
posted by Colloquial Collision to Computers & Internet (12 answers total)
 
Many of the ports from other UNIX operating systems use a graphical environment called X11 rather than Apple's Carbon or Cocoa. Apple includes X11 as an optional install on the OS X distribution DVD. Install X11, run it, then try running gnumeric.
posted by KirkJobSluder at 5:25 AM on May 7, 2006


Gnumeric uses X Windows, not the native Mac OS X windowing system. Make sure you're running X11.app and you've set the X11 DISPLAY environment variable before launching Gnumeric. If you're using the Bash shell, the easiest way to take care of the later is to include the following lines in your .bash_profile :

# set X11 display
export DISPLAY=:0.0

You can find the file ".bash_profile" in your home directory (because it begins with a period it is invisible).

If you don't have a copy of X11.app in your Utilities directory, you can install it using the Mac OS X install disk (go to the Optional Installs section, then Applications, and check X11).
posted by RichardP at 5:29 AM on May 7, 2006


Best answer: Also, you can enter the following at the command line in Terminal, to automatically start the X11.app, set the DISPLAY environment variable, and start Gnumeric:

open-x11 gnumeric

It makes use of an Apple provided script, open-x11, which is located in the /usr/bin directory.
posted by RichardP at 5:38 AM on May 7, 2006


Is all GNU/Linux open-source software like this? Hours upon hours of downloading, patching and compiling numerous dependencies only to walk away from the computer frustrated and confused?

Pretty much. Try actually installing Linux sometime.
posted by reklaw at 6:05 AM on May 7, 2006


Best answer: I would advise using the open-x11 method over the one which sets DISPLAY to 0.0 as DISPLAY isn't always supposed to be 0.0.
posted by edd at 6:30 AM on May 7, 2006


This sounds like a pretty terrible experience—Linux circa 1998, maybe.

On a modern Linux system (Ubuntu for instance), you would just choose "Spreadsheet" from the application menu. If you didn't like that spreadsheet, you would choose "Package Manager" from the menu, then choose "Search" and type in "Spreadsheet". Choose "Gnumeric" and then "Mark for Installation". Then there are several more clicks: "Mark", "Apply", "Apply".

If you'd preferred to use a terminal it would have been even easier: "sudo apt-get install gnumeric', and then a single "yes" answer at a prompt.

Now, Gnumeric will appear somewhere in the menu, or you can exeute it from the terminal window by typing "gnumeric".

I know this does nothing to address the problem you're having, but don't let this experience make you believe that modern Linux distributions are like this, just because gnumeric has its origins as Linux software.
posted by jepler at 6:32 AM on May 7, 2006


Open source software certainly can be frustrating in this way. However, there are two really useful resources:

1. If you cut and paste your error message into Google, someone will often have had the same problem before. E.g in your case, googling "Gtk-WARNING **: cannot open display:" brings up this link in the top few results, with the solution to your problem.

2. You can ask questions on mailing lists, in this case here. If you find the right list, you'll often get helpful replies. Now I look there, I can see you've received a correct (if obscure) answer there too.

Re the hours upon hours of installation time, this is not common at all in the Linux world. Usually, software is provided in ready-to-run (compiled) form. Darwinports and Fink mainly just provide recipes for building the software, and you have to build (compile) it yourself. This is annoying, but the projects don't have the resources to compile and distribute all the software they provide.
posted by beniamino at 7:47 AM on May 7, 2006


Most of the stuff I get from fink is pre-compiled packages. But it sometimes lags behind the bleeding-edge linux versions.
posted by KirkJobSluder at 7:49 AM on May 7, 2006


KirkJobSluder: Good point, I didn't mean to slander Fink. I'd forgotten about the 'stable' pre-compiled distribution because, for my purposes, it's too old to be useful (e.g. the version of Gnumeric is from 2004). But it does save a lot of time.
posted by beniamino at 8:02 AM on May 7, 2006


Response by poster: Well, the problem just got worse.

When I open my X11 application, and a new Xterm window appears, the only response I get when typing 'gnumeric' or 'port' is:

bash: port: command not found
bash: gnumeric: command not found

This always happened in the X11 application, even yesterday after I had DarwinPorts working in the Terminal shell.

But now, when I open the Terminal I get the same error:

-bash: port: command not found
-bash: gnumeric: command not found

I went through all the setup commands outlined in the DarwinPorts (and Fink) documentation. (I just tried to pull Gnumeric from DarwinPorts because they had the latest version.)

For instance: In my .bash_login I have the lines:

export PATH=$PATH:/opt/local/bin
test -r /sw/bin/init.sh && . /sw/bin/init.sh

Well, it still works if I navigate to the command through the directories /opt/local/bin/port.

UPDATE

open-x11 /opt/local/bin/gnumeric

That command works. And so does Gnumeric. I just can't type 'port,' 'gnumeric,' or 'fink,' into the bash shell anymore as commands. Oh well.

Thanks for your help, everyone!
posted by Colloquial Collision at 2:39 PM on May 7, 2006


Response by poster: Also, reklaw:

Before I bought a Mac, I ran Suse GNU/Linux and Windows. When I first installed Suse the update took about 2 hours, but everything worked after that. But I'm not a multiple OS type of guy. I like use one computing environment that can meet all of my needs. But if I have to, I'll switch to another OS (Windows) at work or school.

As for DarwinPorts, the instructions state 'sudo port install nameofprogram' should install a port and the port should run. That isn't always the case it would seem.
posted by Colloquial Collision at 2:48 PM on May 7, 2006


Response by poster: I know this does nothing to address the problem you're having, but don't let this experience make you believe that modern Linux distributions are like this, just because gnumeric has its origins as Linux software - jepler

Yeah, I know. Some acquaintances of mine are running Unbuntu and swear by it.

The problem is not the software, the problem is me not understanding the software. (Specifically: the intricacies of DarwinPorts and Terminal.)
posted by Colloquial Collision at 2:54 PM on May 7, 2006


« Older Stream video to XBOX 360 without huge hassle and...   |   Interesting fact about Spain? Newer »
This thread is closed to new comments.