x11 and terminal.

Discussion in 'General Mac Discussion' started by mmmdreg, Feb 25, 2005.

  1. mmmdreg macrumors 65816

    mmmdreg

    Joined:
    Apr 14, 2002
    Location:
    Sydney, Australia
    #1
    What are the obstacles that must be overcome to make X11 and terminal one and the same?
     
  2. alex_ant macrumors 68020

    alex_ant

    Joined:
    Feb 5, 2002
    Location:
    All up in your bidness
  3. daveL macrumors 68020

    daveL

    Joined:
    Jun 18, 2003
    Location:
    Montana
    #3
    Terminal(.app) is not an X11 application, it's an Aqua/Cocoa application, so the answer is the obstacles are insurmountable. In X11, you'd use xterm or one of its many variants. I'm assuming you're asking how you can use Terminal to access X11 applications, and the answer is there's no fricking way. It's kinda like asking if a taxi drivers in Paris will understand your English, sorta.
     
  4. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #4
    If it's the latter, well, it isn't totally impossible, depending on how you access the app. For instance, I have GIMP on my computer (the GIMP.app version), which is an X11 app. I can launch it from Terminal using 'open gimp.app' just like any other app.....

    As for laynching xapps that are direct executable files, and not .app containers, this is also possible, although you need to do a couple of extra things:

    1) Set the display variable:

    DISPLAY = :0.0
    export DISPLAY

    2) Add the bin directories to your path (optional)

    3) You can then run xapps such as xcalc and xeyes, which are found in /usr/X11R6/bin/ from the Terminal just as you would from an xterm.
     
  5. daveL macrumors 68020

    daveL

    Joined:
    Jun 18, 2003
    Location:
    Montana
    #5
    All you are doing is indirectly starting up the X11 environment from Terminal. I don't think that was the question, but I could be wrong (where's the original poster?)
     
  6. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #6
    Hehe, yeah, we scared 'em off! :eek:

    Well, really, yes, it's indirectly running the X11 environment, but X apps running in OS X run as operating system processes like anything else. The only difference is that they send their graphical content to the X wm instead of to the normal Aqua one. But since Xterms and Terminals run on the same operating system, I'm not sure I see that it's anymore indirect or direct to launch an X app from one or the other....

    But that's all semantics. :D
     
  7. yippy macrumors 68020

    yippy

    Joined:
    Mar 14, 2004
    Location:
    Chicago, IL
    #7
    I think what he was saying is that having two different command lines is annoying. Can't you just do all of your terminal commands from the X11 command prompt?
     
  8. mkrishnan Moderator emeritus

    mkrishnan

    Joined:
    Jan 9, 2004
    Location:
    Grand Rapids, MI, USA
    #8
    And the answer, AFAIK, is yes, you can. I just tried it, and first, it opens the same bash implementation, with the same rc files. Second, all the usual tricks in Terminal, such as "open isync.app" work -- note both the use of the wrong case and the open command. :)

    But I guess I should shut up if the OP isn't even bothering to read any of this. ;)
     
  9. mmmdreg thread starter macrumors 65816

    mmmdreg

    Joined:
    Apr 14, 2002
    Location:
    Sydney, Australia
    #9
    haha nah I'm here and reading =) Just not writing. Thanks for all the replies! And yes, I was pretty much asking X11 could be incorporated into the terminal.. but yes =)
     

Share This Page