Mailinglist Archive: opensuse (4631 mails)

< Previous Next >
Re: [opensuse] Getting error "cannot connect to X server" when using sudo to run a program
  • From: Graham Smith <gqs@xxxxxxxxxxxxx>
  • Date: Fri, 19 Jan 2007 09:28:51 +1100
  • Message-id: <200701190928.51156.gqs@xxxxxxxxxxxxx>
On Friday 19 January 2007 08:18, Patrick Shanahan wrote:
> for sudo, compare the entries in /etc/sudoers and /etc/pam.d/sudo for
> both computers.
> know that su has X privileges since 10.0, iirc. You can use su instead
> of sudo.

Both /etc/sudoers and /etc/pam.d/sudo have the same entries.

su -c <command> is not the same as sudo <command> as su is the same as kdesu
in operation requiring the user to enter the root password each time you run
the program whereas sudo can be configured to run the command without the
need to enter the password.

The problem is when running the command with sudo I get "cannot connect to X
server" error. I can run the command using kdesu or su without any problem
(except being prompted for the password)

xauth info on both systems are the same.
The output of xhost is the same.

Have you any other ideas?


Graham Smith
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups