LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 05-15-2006, 01:05 AM   #1
kurrupt
Member
 
Registered: Jul 2004
Distribution: Debian, Ubuntu, FreeBSD, RHEL
Posts: 202

Rep: Reputation: 31
sudo + x11


Hello guys,

Iam having issues giving users access in using x11 based programs (ie: ethereal) everytime they execute it.. it wont appear in gui.. gives a display error.

I have been trying to figure out how to do this: I tried 1 thing it was:

Code:
xauth merge ~<yourregularuser>/.Xauthority; export DISPLAY=:0.0
then i tried sudo program

still nothing

Any ideas?
 
Old 05-15-2006, 03:28 AM   #2
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
Hi,
I assume, that you want start a graphical tool from the command line, and that you want to do this within a running X session, using a window manager like kde or gnome.

Can you please post the error message?

sudo is a tool to allow users running programs with other users rights. E.g., to allow a non privileged user to run the "passwd" program for root. Or something like this.

Perhaps the following is your problem:
If you want to run a graphical program as user b, but startet the X-session as user a, the X-server denies user b any access. For security.
The corresponding error message looks like:
Code:
Error: Can't open display: :0.0
User a can allow other users to use his X-Session with
Code:
xhost +
 
Old 05-15-2006, 04:22 AM   #3
taxtropel
Member
 
Registered: Mar 2005
Location: Cascade Mountains WA USA
Distribution: Linux From Scratch (LFS)
Posts: 149

Rep: Reputation: 16
CAUTION!!!! using the command 'xhost +' or 'xhost +all' will open X up to programs started from ANY host

This is a MAJOR security opening, and not advised (especially if you are ROOT..don't run as root...bad bad bad bad *rolls up newspaper*, don't make me use this!)

it's a much better idea to do this:
Code:
 xhost +localhost
or
Code:
 xhost +127.0.0.1
both commands are really the same thing
btw
Code:
xhost -all
will close the hole again
 
Old 05-15-2006, 08:43 AM   #4
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
Yes, big Ack.

Just wanted to mention the mechanism, thought that next step would be man and all deriving implications.
Sorry, pledging amendment.

Err. Just to proof my will to do better: It is generally a good idea, not to start a window manager as root.

Last edited by Clemente; 05-15-2006 at 08:45 AM.
 
  


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
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Sudo and ssh X11 fowarding Mike_the_Man Linux - General 1 05-03-2006 11:04 PM
Core 4 - X11-devel complains about X11-libs which are installed Ephracis Fedora 3 09-05-2005 09:32 AM
Sudo and X11 programs 65_289 Linux - Software 1 05-17-2005 08:42 PM
Roaming X11/Xfree86, X11 proxy zapp Linux - Software 1 09-12-2003 08:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:01 AM.

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