# [solved] sudo doesn't work with X

## scoazera

After the last "emerge world", sudo stop working with X.

Few days ago I was able to run "sudo xeyes" (provided that xeyes was in /etc/sudoers).

Now I get the following error message:

  Error: Can't open display:

Note that I can still use "su" to run xeyes (e.g.) 

I tried with "xhost" and ".Xauthority", with no luck.

SuSe, Debian and Mandrake work fine!

What happened to sudo in Gentoo?Last edited by scoazera on Sat Oct 01, 2005 9:56 am; edited 1 time in total

----------

## Esel Theo

I don't use sudo together with X, so I'm not an expert here. But maybe it is

```

# Reset environment by default

Defaults        env_reset

```

that bites you. (Your environment with information about your X server is reset when you sudo.)

----------

## scoazera

You were right! Thanks a lot.

----------

