NetAnim error

998 views
Skip to first unread message

Masood Alam

unread,
Aug 25, 2012, 4:55:30 AM8/25/12
to ns-3-...@googlegroups.com

I am trying to run NetAnim in Ubuntu Server. when I do qmake NetAnim.pro it goes fine. When run make it says " make:nothing to be done for 'first'. When I do ./NetAnim I get the following response.

No protocol specified
No protocol specified
NetAnim: cannot connect to X server : 0.0

Somebody let me know the solution thanks

John Abraham

unread,
Aug 25, 2012, 9:47:12 AM8/25/12
to ns-3-...@googlegroups.com
If you are building NetAnim for the first time, then you should not be getting " make:nothing to be done for 'first'".  Have you tried downloading again? are you sure you are executing "qmake NetAnim.pro" under the netanim directory? Are you running the commands are sudo / root user ? If yes, can you try without sudo or a non-root user?

The second problem is more related to you login account perhaps
see



--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/TMUBk339dm0J.
To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

Masood Alam

unread,
Aug 26, 2012, 1:27:28 AM8/26/12
to ns-3-...@googlegroups.com
Hi John Abraham
 
Thanks for your reply. I have done the following now
 
1- downloaded  again .....status ok
2- make clean                status ok
3-  qmake NetAnim.pro    status ok
4- ./NetAnim  with root user  under /netanim        status:     NetAnim: cannot connect to X server : 0.0    
5- ./NetAnim  without root user  under /netanim        status:     NetAnim: cannot connect to X server : 0.0        
 
Please help what could be the possible solution.
 
Thanks for your time          

John Abraham

unread,
Aug 26, 2012, 1:29:51 AM8/26/12
to ns-3-...@googlegroups.com
after step 3 , did you try executing "make" to see if the executable "NetAnim" was created?
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/SWwDzc8UkmMJ.

John Abraham

unread,
Aug 26, 2012, 1:44:11 AM8/26/12
to ns-3-...@googlegroups.com
to be clear 
please try the following as a non-root user
1. Download again or do "make distclean"
2. cd netanim
3. qmake NetAnim.pro
4. make
5. check if the executable "./NetAnim" is created in the same directory using "ls -l"  

Masood Alam

unread,
Aug 26, 2012, 2:47:38 AM8/26/12
to ns-3-...@googlegroups.com
1.a:   Cannot Down load  it says " abort : destination 'netanim' is not empty "...I do not understand why? 
1.b:    make: *** No rule to make target 'disclean'.  stop.
2,3; Ok
4: make : nothing to be done for first........as I am running it second time right
5. I can see a file in green color named NetAnim with File permissions -rwxr-xr-x but when I ./NetAnim it says "NetAnim: cannot connect to X server "
 
I can give you ssh access for direct view into it if allowable as per group policies.
To unsubscribe from this group, send email to ns-3-users+unsubscribe@googlegroups.com.

John Abraham

unread,
Aug 26, 2012, 2:50:41 AM8/26/12
to ns-3-...@googlegroups.com
start as non-root user and can you paste the output of 

mkdir test-dir
cd test-dir
cd netanim
qmake NetAnim.pro
make
ls -l 


To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/5CpeM5ZUv4YJ.

Kamyar Mohajerani

unread,
Aug 26, 2012, 4:21:52 AM8/26/12
to ns-3-...@googlegroups.com
I suspect you might not have an X server running at all! 
What is the output of "xset -q"? What about "ps -e | grep Xorg"?

xset -q

ps -e | grep Xorg
If you actually see the Xorg process in "ps" output then you might need to set the DISPLAY environment variable to the terminal where X is running. For example if X is running on the first terminal (where usually does):
export DISPLAY=":0.0"
Now try "xset -q" again and check the output.
IIRC X server is not installed in Ubuntu server but default, so you need to install it like this:

apt-get install xserver-xorg xorg -y
and maybe install a desktop environment like gnome.
You can also try running X by running "startx"

Good Luck!

Masood Alam

unread,
Aug 26, 2012, 10:25:37 AM8/26/12
to ns-3-...@googlegroups.com
I have gone through all the steps you advised and the output is as attached. Please guide further
NetAnim Error 2.txt

John Abraham

unread,
Aug 26, 2012, 10:30:59 AM8/26/12
to ns-3-...@googlegroups.com
This is not related NetAnim, rather a generic issue related to xterm.
There are several threads related to it.

etc
usually the problem is related to building the executable as root or su, but not having access to xserver for that login.


--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/EuePkd8EjJkJ.

Masood Alam

unread,
Aug 26, 2012, 10:31:06 AM8/26/12
to ns-3-...@googlegroups.com
The output is attached for the steps recommended eralier. The result is yet hopeless "cannot connect to xserver"
NetAnim Error.txt

noussaiba mel

unread,
Sep 30, 2021, 3:58:54 AM9/30/21
to ns-3-users
Hello everyone; 

i've installed NS3, NetAnim in ubuntu under windows,
but when i run ./NetAnim , i got the following error: 
                 NetAnim: cannot connect to X server 0.0

please help

Gabriel

unread,
Sep 30, 2021, 11:01:11 PM9/30/21
to ns-3-users
To redirect GUI application to the X11 server on Windows (e.g. VcxSrv), add the following to the last line of ~/.bashrc:

For WSLv1: DISPLAY=:0
For WSLv2: DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0
 
Reply all
Reply to author
Forward
0 new messages