LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   gksu not working (http://www.linuxquestions.org/questions/linux-desktop-74/gksu-not-working-528315/)

semtex 02-12-2007 08:36 PM

gksu not working
 
Hi! I have some problems by running programs with the gksu command. The problem is that after gksu prompts for password, I enter the pass, and after I confirm nothing happens. I mean the program that should be started with root privileges just doesn't start. I've already configured the sudoers file and also checked the $DISPLAY variable, it is set to :0.0 . I also tried to run the desired program with the sudo command and I get the following error: "Gtk-WARNING **: cannot open display:". I also tried to run xhost +localhost, it didn't help.
I would appreciate any help I can get. Thanks!

anomie 02-12-2007 10:47 PM

Try:
  • Opening your Gnome terminal program.
  • Entering su -m and entering your root password.
  • Launching your program from that terminal session.

The -m option for su preserves env variables (including DISPLAY).

P.S. In general don't run X apps as root. :) Why are you doing this?

semtex 02-13-2007 04:56 AM

I've tried with the su -m option, nothing changes: the program just doesn't start from the root console. Without any error message.
PS: I need to start tools like gdmsetup, and everything from the control panel that automatically needs root privileges and asks for root pass. It is really annoying, because I often don't know where the config files are, so that I need these progs.

semtex 02-16-2007 05:42 AM

Hi! As I recently checked the X logfile I found several of the following error messages. They all happened exactly as I tried to get sudo to work with X applications.
Code:


AUDIT: Wed Feb 14 14:48:51 2007: 6988 X: client 22 rejected from local host (uid 1000)

Does anyone have an idea what is wrong with my configuration? I know that must be something with the X server don't allow sudo to establish a connection, but I don't know how to change the permissions.


All times are GMT -5. The time now is 01:21 PM.