LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-12-2007, 08:36 PM   #1
semtex
LQ Newbie
 
Registered: Jan 2007
Location: Germany
Distribution: Gentoo 2006.1
Posts: 16

Rep: Reputation: 0
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!
 
Old 02-12-2007, 10:47 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
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?
 
Old 02-13-2007, 04:56 AM   #3
semtex
LQ Newbie
 
Registered: Jan 2007
Location: Germany
Distribution: Gentoo 2006.1
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 02-16-2007, 05:42 AM   #4
semtex
LQ Newbie
 
Registered: Jan 2007
Location: Germany
Distribution: Gentoo 2006.1
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
gksu or alternative for fedora 6? shame Fedora 2 11-12-2006 01:50 AM
gksu and xhost Haz2a Ubuntu 2 09-07-2006 04:35 AM
gksu or alternative? shame Slackware 4 05-09-2006 04:25 PM
problems with su, gksu nixer4me Debian 1 03-11-2006 04:39 PM
Error while running gksu Ephracis Linux - Software 0 10-27-2004 05:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration