New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

X server

Post Reply New Thread Subscribe

Thread Tools
Posts: n/a


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!
QUOTE Thanks

rman's Avatar
Member Since: Dec 24, 2002
Location: Los Angeles, California
Posts: 12,584
rman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud ofrman has much to be proud of
Mac Specs: 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

rman is offline
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!
QUOTE Thanks

Post Reply New Thread Subscribe

« Changing the login message in Darwin | Linux Games »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
eMac as a Server? lokerd Other Hardware and Peripherals 11 09-13-2004 10:53 PM
Mac changes permissions on Windows server? dziner OS X - Operating System 2 07-27-2004 12:32 AM
Mac OS X Server as Domain Member jcarr OS X - Operating System 0 04-05-2004 11:18 AM
OS 10 test station for server? lokerd OS X - Operating System 0 02-05-2004 07:01 PM
Upgrading hard drive...Boot IDE or SCSI? lokerd Apple Desktops 5 10-19-2003 07:02 PM

All times are GMT -4. The time now is 01:18 PM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?