Go Back   The macosxhints Forums > OS X Help Requests > UNIX - Newcomers



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-10-2005, 06:32 PM   #1
Matt32
Registered User
 
Join Date: Jun 2005
Posts: 1
Question Gtk-WARNING **: cannot open display: -- help?

Hi...

Running Ethereal (compiled from darwinports)... when I'm logged in as Admin, I can open up xterm in X11 and run it as 'sudo ethereal' and that's fine. However, I rarely use my Admin account, and it's a pain because I have no need to use Ethereal while I'm logged into my Admin account. Soo... in my normal account, in X11, I can't 'sudo' anything because I'm not in the sudoers file (which is as it should be). So I use 'login' to login as Admin, but when I then try to use 'sudo ethereal' it gives me this error:

Gtk-WARNING **: cannot open display:

I have found this thread http://forums.macosxhints.com/showth...9&page=3&pp=20 but it wasn't much help. The advice there was very confusing (I'm a Unix newbie.. ).

Any help would be really appreciated!

Many thanks,
Matt.
Matt32 is offline   Reply With Quote
Old 06-12-2005, 04:37 PM   #2
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,233
Quote:
Gtk-WARNING **: cannot open display:

If you' want to run 'sudo ethereal' from Terminal.app and you're using bash, write in your ~/.bash_profile file:

Code:
if [[ -z $DISPLAY ]]; then
  export DISPLAY=:0.0
fi
Then, first make sure to start X11 before you run 'sudo ethereal'.

.
sao is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:52 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.
You Rated this Thread: