views:

22

answers:

2

Hello,

as part of my eclipse plugin I try to start an external program by using process.exec. This works with some tools (I tested it with gedit, for example), but with the one I need it does not work: isimgui: cannot connect to X server.

This is part of the XILINX webpack, none of the included graphic tools can be started like this.

Any ideas how I met get it to work?

A: 

You probably need to pass the -display argument to the executable you are running, or better (more widely supported) set the environment variable DISPLAY to the right value (try ':0')

use for example: process.exec(String[] cmdarray, String[] envp)

envp should contain at least one string "DISPLAY=:0"

Marc van Kempen
A: 

You must inherit the DISPLAY variable from your shell (and possibly also the X11 authentication file information).

Thorbjørn Ravn Andersen