Results 1 to 2 of 2

Thread: X server

  1. #1
    X server

    I'm new to the mac os and I know that this is probably a really simple answer, but it's really bugging me now since I've been trying to fix it for two days!

    OK, I have a mac os 10.3.6. My whole goal is to open a terminal session (not go into apps/utils/x11), but a terminal session. Then I was to run X apps from within the terminal session. A great example is ssh'ing over to another machine and running a X interface from the machine I ssh'ed into on my mac.

    However, for now, I thought I would start simple and start local. I have installed xcode_tools from the apple web site, and it looks like it installed the X components because I can start the X11 program from apps/utils/x11. From within the X11 terminal, I can start xclock with no problems and it works just fine. However, when I open the terminal and run it from there, I get...

    $ xclock
    Error: Can't open display: :0.0

    It's really frustrating because I've read numerous FAQ's on how to fix this but really nothing works for me! I believe I'm running bash (the terminal window goes "text - bash". One faq said to add this to your rc file. I plopped it in /etc/bashrc

    # do display thing to open X
    if [ ${#DISPLAY} -eq 0 ]; then
    export DISPLAY=':0.0'

    However, this does not work. I also tried to "export display" and a bunch of different commands from :0.0 to the ip.0, but again, none of this works.

    Since nothing works in the terminal and everything works in the x11 session terminal, am I doing something wrong? Oh, also, if I have the X11 program running and then execute xclock from the terminal (not the x11 terminal but the bash one), it works fine. Is this just how it works?

    Thanks in advance!

  2. #2

    rman's Avatar
    Member Since
    Dec 24, 2002
    Los Angeles, California
    2 x 3.0GHz Quad-Core, 6GB OS X 10.6.8 | 15in MacBook Pro 2.2GHz OS X 10.6.8 | 64GB iPad 2 WiFi
    There is two things you need to do. First on your system you need to give permission for another system to display anything on your screen. issue the command xhost + will allow any other system to display any thing on your swcreen. You can limit access by using xhost ip address. Next you issue the command set DISPLAY ip address:0. I am not sure of the syntax in the bash shell.

    So the order is a follows:

    On your system issue either xhost + or xhost ip address of other system
    log on to other system
    on other system set the DISPLAY variable to your system (.i.e DISPLAY=your ip address:0)

    I tend to work with c-shell and korn shell most of the time.

    Just a side note DISPLAY=0.0 means the display is set to your local system.
    Life isn't about waiting for the storm to pass, It's about learning to dance in the rain!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 07-24-2015, 11:38 AM
  2. Replies: 2
    Last Post: 01-16-2015, 12:07 AM
  3. New Blog: OS X Lion Server Part 01 – What Type of Server
    By MF Blog Bot in forum Apple Rumors and Reports
    Replies: 0
    Last Post: 06-25-2012, 03:50 PM
  4. Using Mac Mini Server As a Local Web Server Only
    By DarkriderCJ in forum Internet, Networking, and Wireless
    Replies: 5
    Last Post: 01-07-2012, 10:31 AM
  5. Replies: 0
    Last Post: 08-23-2011, 01:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts