PDA

View Full Version : open-x11 command




ScKaSx
Aug 11, 2007, 05:09 PM
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
Aug 11, 2007, 05:41 PM
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
Aug 11, 2007, 05:44 PM
Yup, have x11 and gimp installed
and
Yes, I get ": unknown application: gimp" also

Cheers,
ScKaSx

bousozoku
Aug 11, 2007, 06:25 PM
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?

antibact1
Aug 11, 2007, 06:31 PM
Add the location of gimp to your PATH environment variable

ChrisA
Aug 11, 2007, 08:33 PM
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.