LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-04-2003, 05:15 PM   #1
php_rocks
LQ Newbie
 
Registered: Jul 2002
Location: Earth
Distribution: Slackware 9
Posts: 13

Rep: Reputation: 0
xchat and root


hello,

when im logged in as root and need to run xchat i want to run it as another user, i thought the simple solution would be this command:

su -l myusername -c "xchat"

but when i run this is get the error:

Quote:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


(xchat:4394): Gtk-WARNING **: cannot open display:
any help?

thank you,
-sean

Last edited by php_rocks; 05-04-2003 at 05:17 PM.
 
Old 05-04-2003, 05:20 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Why not just log in as a regular user then run the program? You really shouldnt be logged in as root for everyday tasks, its a security risk.

Also, when your getting that error, is this running from a command line without X running or is X running? And is this over a remove connection or you physically at the machine?
 
Old 05-04-2003, 05:21 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
AFAIK you can't run an X app as a different user from the one that is logged in. I think you would need to start a second X session to do that.
 
Old 05-04-2003, 05:28 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah, ideally you shouldn't be in X as root in the first place, but run "xhost +localhost" and it will work fine...
 
Old 05-04-2003, 05:36 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Would that not give everyone logged into the machine root access by running an application on that display?
 
Old 05-04-2003, 05:38 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes. and that's what he wants.... i think xhost +username works too though
 
  


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
XChat RedLinerPCN1987 Linux - Software 4 05-30-2005 04:40 AM
XChat d00msweek Slackware 2 05-16-2005 09:32 PM
Xchat InTraxz Linux - Software 3 10-09-2004 10:48 AM
xchat spidna Slackware 2 09-01-2004 01:30 PM
About new xchat Half_Elf Linux - Software 3 02-27-2004 12:50 PM

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

All times are GMT -5. The time now is 01:56 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