LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-29-2005, 09:57 PM   #1
ColKurtz
Member
 
Registered: Jan 2005
Location: Earth
Distribution: Fedora
Posts: 40

Rep: Reputation: 15
Help with root vs. SU, XHOST


I installed SuSE 9.2 and downloaded firefox. I logged in as my normal user account, ran SU, then tried to launch the firefox installer. I got the following error:

xhost: unable to open display :0.0
Xlib: connection to :0.0 refused by server
Xlib: No protocol specified

After a little searching, I found that I could run the installer either by logging on as root, or else logging on as a normal user account, enter "xhost +", then run SU, then run the installer.

My question is:
1) What is the difference b/t root and the su account? I had assumed su was like logging on as root temporarily.

2) What is xhost? I've googled a bit and found many references but few explanations. There are no manpages or --help for it on my system.

3) Why do I have to run "xhost +" *before* I log on as SU. I tried logging on as SU and then run "xhost +" but I was still unable to run the installer.

Thanks.
 
Old 01-29-2005, 11:58 PM   #2
snatale1
Member
 
Registered: Aug 2003
Location: Richmond, Virginia, US
Distribution: Debian Stretch
Posts: 427

Rep: Reputation: 48
SU = Super User = Root

There is no need to log in as root....ever, su'ing when needed is the exact same thing.
I don't run suse but I'm pretty sure it will install from yast.
 
Old 01-30-2005, 12:13 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
To add on: su isn't an account, it's the switch user command. You can use it to switch to any account, but with no arguments, it assumes you want to be root.

You need to run xhost + as the user that launched the X server. By defauly, the X server doesn't allow connections from anyone but the user that launched it (not even from root). Running xhost + disables this restriction.
 
Old 01-30-2005, 12:31 AM   #4
ColKurtz
Member
 
Registered: Jan 2005
Location: Earth
Distribution: Fedora
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by snatale1
There is no need to log in as root....ever, su'ing when needed is the exact same thing.
That's what I thought, too, but the install failed when logged in as SU but worked fine logged in as root. I thought root had all priviledges... I'm suprised a normal user has to explicitly allow others, even root, to interact with X.

Suse 9.2 is the only distro I've tried (out of FC3, LM10.1, Ubuntu 4.1, and Slack 10.1) where I have to run xhost. What is different about SuSE that requires xhost?

Thanks for the replies.
 
  


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
"xhost +root" fails ahz10 Linux - Security 2 11-04-2005 03:41 PM
xhost itsjung Linux - Newbie 4 12-22-2004 06:58 AM
xhost + and 9.1 Mufasa SUSE / openSUSE 1 11-14-2004 12:19 PM
xhost + RoaCh Of DisCor Slackware 3 10-02-2004 05:31 PM
xhost invasian Linux - Newbie 3 08-08-2004 09:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration