Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ScKaSx

macrumors regular
Original poster
Feb 27, 2006
105
0
Hi All,

I've been trying to learn different aspects of terminal in osx and maybe oneday I'll be able to share my knowledge to someone else. Anyways, I can't seem to OPEN X11 APPLICATIONS from TERMINAL.

I was working on a tutorial that said I could use the "open-x11 command" to open x11 applications (which seems to be simple enough) but its not working.

I have Gimp on my hard drive and I tried the command:

open-x11 gimp

Is there more to this? Thanks.

Cheers,
ScKaSx
 

bousozoku

Moderator emeritus
Jun 25, 2002
16,120
2,397
Lard
You don't even get

: unknown application: gimp

when you try it?

That's what I'm getting.

It may seem a silly question but did you install the optional X11?
 

ScKaSx

macrumors regular
Original poster
Feb 27, 2006
105
0
Yup, have x11 and gimp installed
and
Yes, I get ": unknown application: gimp" also

Cheers,
ScKaSx
 

bousozoku

Moderator emeritus
Jun 25, 2002
16,120
2,397
Lard
I just opened xterm and xman with open-x11 so it's working for me.

Are you sure that The GIMP is registered as gimp in XWindows?
 

ChrisA

macrumors G5
Jan 5, 2006
12,911
2,158
Redondo Beach, California
Yup, have x11 and gimp installed
and
Yes, I get ": unknown application: gimp" also

Cheers,
ScKaSx

X11 was one of the first graphic systems. I remember using X11 and have windows and a mouse back when Apple made the Apple II and PC's ran DOS.

You really should know how this works if you are gong to use it.

When you type a commend into the shell, the shell searches a set of directories for a program with the same name as the commend. The set of directories is contained in the environment variable called "PATH" as a colon seporated list.

So what's happened is the directory that contains ginp is not one of those in "PATH". You can add it or you can type the full pach name to the gimp executable and then the shell will not have to search. Full path names always start wth a slash "/".

One gimp starts it will attempt to open a network connection to an X-server. If this fails gimp will quit and print a message. The X-Server that gimp tries to connect to is the one in the environment veriable "DISPLAY" which is normally set to "The First display on the first server running on the lacal machine" which is written most compactly as ":0.0". The neat thing about X11 is the xserver does not have to run on the same computer as the x-client.

"open-x11" is a litle script Apple wrote that makes al this easy. But you do't really need it. Next time start gimp from the xterm.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.