Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install a software which comes with a shell script to install, and I need to run this in su because of some drivers it installs.

When I try to run this shell script with sudo:

➜  lab  sudo ./xsetup 
_xsetup: cannot connect to X server

And this is the error message I get in a dialog window when I try to run it with kdesu:

Cannot execute command ' ./xsetup'.


Btw, if anyone's interested, the software I'm trying to install is Xilinx.

share|improve this question
up vote 2 down vote accepted

It seems that kdesu can't properly locate your script, use full path instaed of relative and check if script is executable. sudo can't find proper X Dispaly, may be because DISPLAY variable is not correctly set. Can you run gui applications from console, that you use, without sudo?

share|improve this answer
thanks, when I give kdesu the full path, it worked. – bs0d1 Sep 20 '11 at 18:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.