2

Using ubuntu 11.10. When I run jvisualvm from the command line, the output is : "No protocol specified". Then the program exits.

user24601
  • 71
  • 1
  • 4

2 Answers2

1

Jayan is right about this looking like a DISPLAY error, which can happen when you're trying to run commands on the same machine as a different user or on a remote machine. Here's a quick way to fix it if you're not worried about security.

  • Type xhost + on your local machine as the main user (the user who can start programs that bring up windows, such as xterm).

  • If you're running a command as another user on the same machine, you'll probably be able to do it now. If not, try export DISPLAY=localhost:0.0 as that user.

  • If you're running a command on a remote machine, but want it to show up on your local machine, try export DISPLAY=YOUR_IP_ADDRESS:0.0 on the remote machine.

I encountered it when trying to run JVisualVM on my local machine as user mapred to analyze some Hadoop jobs. I could imagine having to log into a remote machine to do it when Hadoop is running across a cluster (instead of on my local machine in pseudodistributed mode).

(The comment about security: xhost + will allow anyone on the Internet to pop up windows on your computer if they know your IP address. The effect of xhost resets when you reboot, so it's usually not an issue on a personal computer.)

Jim Pivarski
  • 5,568
  • 2
  • 35
  • 47
0

Did you try running any other application with GUI? If they too fail with similar error, it related to display setting.

One way to get this error is not having correct DISPLAY defined. (Please post the full exception. )

Jayan
  • 18,003
  • 15
  • 89
  • 143