Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

xterm: Xt error: Can't open display: xterm: DISPLAY is not set

Hello, I am completely new to networking/systems. I have been asked to complete an open flow tutorial ( http://www.openflow.org/wk/index.php/OpenFlow_Tutorial ) I have fininshed a part of the tutorial and when i used "ssh -X mininet@192.168.**.*", I was able to log in successfully but when i type in Xterm, it says "xterm: Xt error: Can't open display: xterm: DISPLAY is not set". I have downloaded virtual box, XQuartz and an ovf file as given in teh tutorial. I don't know what the problem is. Can someone please guide me through this? Thank you so much!

MacBook Pro, OS X Mountain Lion (10.8.2)

Posted on May 17, 2013 10:23 AM

Reply
Question marked as Best reply

Posted on May 17, 2013 10:27 AM

Did you logout and login after installing XQuartz? Or reboot?


Otherwise the DISPLAY environment variable will not be in your environment.

32 replies

May 17, 2013 2:24 PM in response to BobHarris

I was reading other discussions and they suggested that i should change the config settings. when i typed "/etc/sshd_config" this is what happened:


mobile-172-16-103-167:~ mininet$ xterm

xterm Xt error: Can't open display:

xterm: DISPLAY is not set

mobile-172-16-103-167:~ mininet$ /etc/sshd_config

-bash: /etc/sshd_config: Permission denied

mobile-172-16-103-167:~ mininet$

May 17, 2013 4:04 PM in response to Nils C. Anderson

mobile-172-16-103-167:~ mininet$ ssh -X mininet@192.168.56.1

Password:

Last login: Fri May 17 17:56:20 2013 from 192.168.56.1

mobile-172-16-103-167:~ mininet$ /Users/SHREYA20 echo $DISPLAY

-bash: /Users/SHREYA20: is a directory

mobile-172-16-103-167:~ mininet$


On many forums, they suggested doing something with sshd_config but I don't know how to do that. I need to finish this tutorial as soon as possible. Thank you!

May 18, 2013 12:12 PM in response to shja

That means your DISPLAY variable is properly setup on take local Mac.


If you ssh -X or ssh -Y into a remote Unix/Linux system, then at that end your DISPLAY environment variable should look something like: localhost:10, which will indicate that the remote system is ready to send X11 display output over the ssh tunnel established by the -X or -Y option.

May 18, 2013 7:02 PM in response to shja

I didn't quite understand what you were saying but when i typed "ssh -Y ..." this is what happened:


mobile-172-16-103-167:~ mininet$ ssh -Y mininet@192.168.56.1

Password:

Last login: Sat May 18 20:25:50 2013 from 192.168.56.1

mobile-172-16-103-167:~ mininet$


ssh -X and ssh -Y do essentially the same thing. -Y is just less restrictive on X11 return traffic authority (basically it tells the local X11 display server that you trust the remote system sending X11 traffic to it).


Now what you are display seems strange. You prompt implies that your current system's IP address is 172.16.103.167 and you are ssh'ing to 192.168.56.1. You get a password prompt as expected, but then the "Last Login" messages says you are coming from 192.168.56.1, which is should be where you are coming, but that it the address you are trying to ssh to. And then to top it off, you command line prompt has not changed.


So I'm wondering if 192.168.56.1 is the same system you are currently using, but just a different account on that system?

Is this true?


Also your prompt implies you were logged into the 'mininet' account when you issued the ssh -Y command to login to the 'mininet' account on 192.168.56.1.


Or is it possible that you are loosing track of which system and account you are current remotely logged into?

May 18, 2013 8:09 PM in response to BobHarris

I am completely new to this and i am just following what the tutorial says. I created a new user called mininet on my laptop and also 192.168.56.1 is the ip address of my host only adapter. I don't know what this is all supposed to do. I was asked to finish the tutorial by a professor to get the switch working. Maybe it would help if you have a look at the tutorial? http://www.openflow.org/wk/index.php/OpenFlow_Tutorial

Also, I have two users on my computer. shreya20 and mininet. I created mininet for this tutorial. I honestly don't know why i did that. I posted on a discussion and someone asked me to do that. I am using shreya20 on my laptop but trying to use ssh -Y mininet@192.168.56.1 I don't know if that is even right

Thank you!

May 18, 2013 9:05 PM in response to shja

OK, the IP address info makes sense if you are logging into the same system.


In another post (since blocked), you mentioned not having permissions to use the 'sudo' command. That tells me when you created the account, you did not make it and 'Admin', so the 'sudo' command was complaining.


If you have not already gone back to System Perferences -> Users & Groups and add 'Admin' to 'mininet', then you need to do that, then start over with new ssh into 'mininet'. At which point the 'sudo' command should work.


Note: when prompted for a password when working via a terminal/xterm command line session, you will not see any password characters displayed. You just have to take it on faith that the computer saw the password, and as soon as you type the return or enter key, the password you didn't see will be accepted.

May 18, 2013 9:15 PM in response to shja

I believe that you are expected to have installed VirtualBox and gotten the virtual machine running at this point. That VM, running on a virtual IP address, is what you should be connecting to. Are you in fact running VirtualBox and that download virtual machine image? As the tutorial suggests, you should ping that IP address to make sure it is working.


The idea is that you will ssh into the virtual machine and have it display windows in your Mac environment. From those windows (running from the virtual machine), you run the mininet program.

xterm: Xt error: Can't open display: xterm: DISPLAY is not set

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.