LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-13-2007, 06:00 AM   #16
werner1975
Member
 
Registered: Jun 2007
Posts: 43

Original Poster
Rep: Reputation: 15

Thank you. I tried the two methods and restarted my computer, I'm still getting this error message: "Gtk-Wraning **: Cannot open display:". Any other idea?
 
Old 11-13-2007, 07:13 AM   #17
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Quote:
restarted my computer
The xhost command I gave won't survive a reboot, you have to issue it new with every session. In theory, HappyTux's method should survive a reboot but you might want to check root's .bashrc to make sure.
 
Old 11-13-2007, 10:23 AM   #18
werner1975
Member
 
Registered: Jun 2007
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks. I issued 'xhost localhost && sudo gnome-ppp' but I still get the error message...

 
Old 11-13-2007, 12:38 PM   #19
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Thats odd. Try just issuing xhost localhost on its own and post any output/errors you get back. Also, if you use su to become root in a console, can you then run gnome-ppp? I know that isn't the solution you're after, I'm just trying to get a better handle on where this is going off course.
 
Old 11-14-2007, 06:21 AM   #20
werner1975
Member
 
Registered: Jun 2007
Posts: 43

Original Poster
Rep: Reputation: 15
Hello, "xhost localhost" on its own doesn't report any error message. If I become root using "su -" and then launch "gnome-ppp" it's working fine. But not sudo. Any idea? Thanks.
 
Old 11-14-2007, 07:41 AM   #21
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Quote:
Hello, "xhost localhost" on its own doesn't report any error message.
It should report something. At least on my rig when I run it I get a "localhost being added to access control list" to tell me that it is doing something.

Quote:
If I become root using "su -" and then launch "gnome-ppp" it's working fine.
Do you still have the xauth entry in your root's .bashrc the way HappyTux suggested? Since the - loads root's environment, that might explain why this works but sudo doesn't.

There are a couple of syntax differences for xhost that also might work. Try these and see if one works for sudo:

xhost +localhost
xhost +local:
 
Old 11-17-2007, 02:21 PM   #22
werner1975
Member
 
Registered: Jun 2007
Posts: 43

Original Poster
Rep: Reputation: 15
Hello, I removed /root/.bashrc, I restarted and I tried again. When I run "xhost localhost" or one of your suggestions, I get: "localhost being added to access control list", but when I run "sudo gnome-ppp", I get the same error message

I found here: http://www.gnomefiles.org/comment.php?soft_id=41 that you can use "PAM" (6th comment). I tried it but it didn't work either
 
Old 11-18-2007, 11:51 AM   #23
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Quote:
Hello, I removed /root/.bashrc, I restarted and I tried again.
Removing .bashrc was certainly not needed. All you had to do was comment out the line you added. I also notice you do a lot of restarting. In general Linux doesn't need to do that and in this particular case it may be causing trouble. I know that restarting is the first thing to try in Windows when things don't work, but this isn't Windows.

Quote:
When I run "xhost localhost" or one of your suggestions, I get: "localhost being added to access control list", but when I run "sudo gnome-ppp", I get the same error message
Lets check on something. Try running (as your normal user) echo $DISPLAY. It should return :0.0, but if it doesn't it might be a clue.

Also have a read through this thread, particularly the last couple of posts. They seem to have solved the same problem you're having.
 
Old 11-18-2007, 12:41 PM   #24
werner1975
Member
 
Registered: Jun 2007
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks! Your link solved finally my problem, I just had to add to /etc/sudoers these 2 lines:

Code:
werner ALL = NOPASSWD: /usr/sbin/gnome-ppp
Defaults env_keep+="DISPLAY XAUTHORITY"
Damn, Linux is so difficult, there's so much stuff to learn and so little free time to dedicate to it
 
Old 11-19-2007, 07:20 AM   #25
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Great, I'm glad we finally figured it out.

To be honest, I don't know why this was so difficult. 99.9% of the time the first advice that HappyTux and I gave you works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Compile and run gtk application under SunOS and use it with Hummingbird exceed in win dream2code Solaris / OpenSolaris 6 04-12-2007 05:34 AM
mysql 5 backup user privs michaelsanford Programming 0 04-01-2006 04:56 PM
How to enable root to run graphical application in user log in xgreen Slackware 4 03-07-2005 06:39 AM
Assign Privs to specific user sikandar Linux - Software 13 08-31-2003 02:12 AM
I can run application with root Rex_chaos Linux - General 5 03-28-2002 01:48 PM


All times are GMT -5. The time now is 02:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration