Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-29-2005, 08:57 PM   #1
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.

Old 01-29-2005, 10:58 PM   #2
Registered: Aug 2003
Location: Richmond, Virginia, US
Distribution: Ubuntu 20.04 / Manjaro
Posts: 439

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-29-2005, 11:13 PM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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-29-2005, 11:31 PM   #4
Registered: Jan 2005
Location: Earth
Distribution: Fedora
Posts: 40

Original Poster
Rep: Reputation: 15
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.


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

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration