LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-31-2007, 07:27 AM   #1
a_l_a_n
LQ Newbie
 
Registered: Dec 2006
Posts: 20

Rep: Reputation: 0
Gtk-WARNING **: cannot open display:


Specifically I am trying to launch firestarter as a non-root user on Gentoo. The non-root user that is invoking firestarter is allowed do so w/o password thanks to a line in the sudoers file.

The problem is with the process running in root connecting to the display:

$ sudo firestarter
(firestarter:31698): Gtk-WARNING **: cannot open display:

Have tried:

$ xhost +local:root

without success.

The curious fact is that the following will work:

$ su
$ firestarter

So whats the deal with the error?

Thanks.
 
Old 03-31-2007, 08:27 AM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536Reputation: 536
Perhaps try specifying which display to open firestarter on; for example:
$ sudo firestarter 0:1
$ sudo firestarter :0.1
$ sudo firestarter :0.0

or something like this, I can't quite remember the syntax, and your display number *may* vary, but it works in other similar situations, to get the application to open on one specific display. I don't know enough about the whole thing to guess why it works with the other commands, except that I think X runs as root, so unless you either ARE root, or specify root's display with enough priveleges, it will default to using another display. .

Last edited by GrapefruiTgirl; 03-31-2007 at 08:30 AM.
 
Old 03-31-2007, 08:58 AM   #3
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 5,995

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
The non-root user that is invoking firestarter is allowed do so w/o password thanks to a line in the sudoers file.
Off topic - but what is the line that allows you to do this? I tried messing with visudo to allow myself to use wlanassistant without using the PW, but enentually gave up, I'd like to know the solution! Thanks.
 
Old 03-31-2007, 03:13 PM   #4
a_l_a_n
LQ Newbie
 
Registered: Dec 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tredegar
Off topic - but what is the line that allows you to do this? I tried messing with visudo to allow myself to use wlanassistant without using the PW, but enentually gave up, I'd like to know the solution! Thanks.
Simply
Code:
user    ALL= NOPASSWD:  /usr/bin/firestarter
 
Old 03-31-2007, 03:25 PM   #5
a_l_a_n
LQ Newbie
 
Registered: Dec 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GrapefruiTgirl
Perhaps try specifying which display to open firestarter on; for example:
$ sudo firestarter 0:1
$ sudo firestarter :0.1
$ sudo firestarter :0.0

or something like this, I can't quite remember the syntax, and your display number *may* vary, but it works in other similar situations, to get the application to open on one specific display. I don't know enough about the whole thing to guess why it works with the other commands, except that I think X runs as root, so unless you either ARE root, or specify root's display with enough priveleges, it will default to using another display. .
Thanks but they didnt work. It may well be on the right track, but its a very difficult google query to construct ...
 
Old 03-31-2007, 03:44 PM   #6
a_l_a_n
LQ Newbie
 
Registered: Dec 2006
Posts: 20

Original Poster
Rep: Reputation: 0
Ah ha ... Adding:
Code:
Defaults:user   !env_reset
to sudoers (allows user to export variables) appears to work.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gtk-WARNING **: cannot open display iamjoepesci Red Hat 2 10-17-2008 11:51 AM
GTK-Warning ** cannot open display kgblossom Debian 6 02-18-2007 02:23 PM
Gtk-WARNING **: cannot open display mmisoo Fedora 4 07-24-2006 07:33 PM
Gtk-warning **: Cannot Open Display: davikevi Programming 3 02-18-2005 11:42 PM
Gtk-WARNING **: cannot open display: Larsin Linux - Software 1 02-25-2004 10:47 AM


All times are GMT -5. The time now is 11:15 PM.

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
Open Source Consulting | Domain Registration